iphone - iOS - Core Animation - How to set origin when transform property is changed -
I have a I changed it to I read an Apple document and found In addition, using a I think you can change the frame after changing it like this: Or change the anchor point before scale: I would suggest conversion on scale , But change the top and left handicap to 0. Or you set up your image barrier like this: I will change center alignment x and y to the center point of the super alignment Perhaps you can tell me how you have set the barriers, I I can do some tests for you at my local level. UIView as a subview in its original view. When the user taps this
UIView , I want to change it, so it takes the whole screen.
property and I was able to match its size to my original view, but its not the position.
frames can not be used with
.
transform is a good idea to do so by altering your barriers, like,
NSLayoutAutriteHit ?
// I am using 5 for the test purpose. BackgroundImageView.transform = CGAffineTransformMakeScale (5, 5); Self.backgroundImageView.frame = CGRectMake (0, 0, self.backgroundImageView.frame.size.width, self.backgroundImageView.frame.size.height);
self.backgroundImageView.layer.anchorPoint = CGPointMake (0.5, 0.5); Self.backgroundImageView.transform = CGAffineTransformMakeScale (5, 5); If you use Autolayout in your UIView, then its solution depends on how you set up your obstacles, for example, if you set your image barriers like this:
Comments
Post a Comment