In my code when i type in
textViewBackgroundImage.contentStretch = CGRectMake(0.5, 0.5, 0, 0);
it shows its been deprecated, Can someone help me in finding me the replacement for this?
In my code when i type in
textViewBackgroundImage.contentStretch = CGRectMake(0.5, 0.5, 0, 0);
it shows its been deprecated, Can someone help me in finding me the replacement for this?
@property(nonatomic) CGRect contentStretch NS_DEPRECATED_IOS(3_0,6_0);
// animatable. default is unit rectangle {{0,0} {1,1}}. Now deprecated: please use
-[UIImage resizableImageWithCapInsets:] to achieve the same effect.
UIImage* cardImage = [[UIImage imageNamed:@"card_resizable.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(72, 0, 60, 0)];
Assuming textViewBackgroundImage is an UIImageView,
[textViewBackgroundImage.image resizableImageWithCapInsets:
UIEdgeInsetsMake(0.5, 0.5, 0, 0)];
So, in place of 'CGRectMake', now we should use 'UIEdgeInsetsMake', and rather than using the 'contentStretch' property, we should use the 'resizableImageWithCapInsets' method. According to apple, the effect will be same.