I'm having a problem with FBDialog. Apparently after the either the email or the password textFields become first responders and keyboard comes up, the FBDialog view no longer reacts to changing the interface orientation.开发者_开发问答 Except for the case when keyboard is up, all works as expected. Did anyone ever encounter this behavior?
Thanks in advance, Vlad
Try this:
(void)deviceOrientationDidChange:(void*)object
{
UIDeviceOrientation orientation = (UIDeviceOrientation)[UIApplication sharedApplication].statusBarOrientation;
if ([self shouldRotateToOrientation:orientation])
{
[self updateWebOrientation];
CGFloat duration = [UIApplication sharedApplication].statusBarOrientationAnimationDuration;
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:duration];
[self sizeToFitOrientation:YES];
[UIView commitAnimations];
}
}
精彩评论