I have a ball assigned by UIImageView in Interface Builder. The IBOutlet of the UIImageView is connected to the corresponding UIViewController. Image has a white background. When I assign it to a UIImageView in IB, the background is transparent. In IB, I have UIImageView set to a transparent background and fill aspect.
When I assign a UIImageView image at runtime:
self.ball.image = ballImage; //ballImage is a UIImage self.ball.backgroundColor = [UIColor clearColor]; self.ball.contentMode = UIViewContentModeScaleAspectFill;
UIImageView square has a white background where the ball is not displayed. The value of all four angles. What is the difference that the IB version does not show a white background at run time and the software version?
source share