Since the iOS 7.1 beta 5, I have a strange bug with my little plugin : link
My plugin is a subclass of UIImageView
, inside of this class I have an another UIImageView
called img
.
I have rewrite the setter and getter of image
:
- (void)setImage:(UIImage *)image{
self.img.image = image;
}
- (UIImage *)image{
return _img.image;
}
So NSLog(@"%@",self.image)
return _img.image
, I'm ok.
NSLog(@"%@",[super image])
return (null)
, I'm ok.
The problem is with iOS 7.0 self
don't display an image, but with iOS 7.1 self
display _img.image
.
Visually, I don't want a image for self
, I want the same behavior than iOS 7.0.
So I try a another thing to understand, if I use this setter/getter :
- (void)setImage:(UIImage *)image{
[super setImage:[UIImage imageNamed:@"becomeapanda_tumblr_com_portrait"]];
}
- (UIImage *)image{
return [UIImage imageNamed:@"becomeapanda_tumblr_com"];
}
With iOS 7.0, self
display this image "becomeapanda_tumblr_com_portrait" but with iOS 7.1 self
display this image "becomeapanda_tumblr_com".
If I can have any help to understand why with iOS 7.1 my plugin don't have the same behavior, this could be nice!