开发者

Facebook dialog not rotating when keyboard up

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜