I have a UIActionSheet and I set it’s view like this:
[popup showInView:[[UIApplication sharedApplication] keyWindow]];
this works fine in portrait mode, but when I switch to landscape, it stays portrait. What am I doing wrong?
Thanks.
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.
You’re showing it in the window (which is not rotated), rather than in a view controller’s view (which is). Pass the main view of your currently-visible view controller instead, or use
showFromTabBar:orshowFromToolbar:on iPhone orshowFromBarButtonItem:animated:orshowFromRect:inView:animated:on iPad.