I’d like to call
[self.view setContentMode:UIViewContentModeScaleAspectFit | UIViewContentModeCenter];
where self is an instance of UIViewController. This doesn’t seem to work; what are the direct alternatives, if any?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
contentModeis not a mask; you can’t use|to combine values, you’ll have to pick one.UIViewContentModeScaleAspectFitshould center the content if it doesn’t fit the view.