开发者

Facebook dialog not rotating when keyboard up

开发者 https://www.devze.com 2023-03-29 22:26 出处:网络
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

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];
    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号