When customizing (by subclassing) PFLogInViewController; I have a problem with the logo. I use a square picture which for some reason gets distorted, in fact flattened.
Here is the code:
UIImage *logoImage;
logoImage = [UIImage imageNamed:@"myLogo.png"]; // 152 x 152 pixels.
self.logInView.logo = [[UIImageView alloc] initWithImage:logoImage];
self.logInView.logo.layer.cornerRadius = 7.0;
self.logInView.logo.clipsToBounds = YES;
Am I doing something wrong? Or is the issue in a different place?
Setting the image property does not change the size of a UIImageView. Call sizeToFit to adjust the size of the view to match the image. You could also set its frame explicitly to 152x152 with self.logInView.logo.frame = CGRectMake(0,0,152,152); or something similar. The other thing to check out is the image view's content mode. Maybe UIViewContentModeCenter or UIViewContentModeScaleAspectFit.