UIImageView content will not scale up(or down) even while using UIViewContentModeScaleAspectFit -- iOS8, Xcode 6.0.1
UIImageView content will not scale up(or down) even while using UIViewContentModeScaleAspectFit -- iOS8, Xcode 6.0.1
- Subject: UIImageView content will not scale up(or down) even while using UIViewContentModeScaleAspectFit -- iOS8, Xcode 6.0.1
- From: "Mazzaroth M." <email@hidden>
- Date: Sat, 11 Oct 2014 22:46:31 -0400
Hi all, I eventually want to do an animation like here:
https://www.dropbox.com/s/6e1pyo7o57nl4ph/scrappling_ae_motion_setup.m4v?dl=0
so my plan is to do a CAAnimationGroup that will both scale the
self.sticker image and change its position onscreen, end the animation and
unhide self.stickerDestination. self.stickerBox contains
self.stickerDestination (see dropbox image link below).
I do the layout (using FLKAutoLayout) in -[UIViewController
updateViewConstraints], then I add self.stickerDestination to
self.stickerBox as a subview in there.
Then in -[UIViewController viewDidLayoutSubviews] I set the frame of
self.stickerDestination(because I don't find out the frame of
self.stickerBox before that) in order to make it square(setting width and
height to both width of self.stickerBox).
For some reason, the UIImageView remains at 51x51 points(the images' real
size in points) despite the frame reporting itself as 80x80 and me using
UIViewContentModeScaleAspectFit. I would like it to scale up. Any
suggestions?
I've also found that when using a much larger image, 211x211, the image
doesn't scale down either, it simply draws the UIImage as-is. So it appears
that UIViewContentModeScaleAspectFit has no effect at all, it's as if the
UIImageView never got the setContentMode: message.
CODE:
http://pastebin.com/quKPjEUy
Screenshot of layout of view using false colours:
https://dl.dropboxusercontent.com/u/597030/Pasted_Image_2014-10-11__5_55_PM.png
Michael
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden