Suppose we have an UIImageView with name imageView and have to set this in center dynamically then we can follow the below step
[imageView setImage:[UIImage imageNamed:@"imageName.png"]];
imageView.autoresizingMask = UIViewAutoresizingNone;
imageView.contentMode = UIViewContentModeCenter;
No comments:
Post a Comment