相关疑难解决方法(0)

iOS 8键盘隐藏了我的textview

我有一个UIViewController使用self.accountViewController.modalPresentationStyle = UIModalPresentationFormSheet;,现在在iOS 8中,UITextView当它被推高时,最后一个是从键盘隐藏的.怎么避免呢?

cocoa-touch uikeyboard ios uimodalpresentationstyle

23
推荐指数
2
解决办法
9693
查看次数

当键盘出现时,iOS 8 UIView不会向上移动

我正在开发有一个聊天应用程序UITableView和一个UIView包含UITextFieldUIButton在其中.我正在使用以下代码UIView在键盘出现时向上移动.

(void)keyboardWillShow:(NSNotification *)notification
{

    NSDictionary* info = [notification userInfo];
    CGSize kbSize = [[info objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue].size;

    [UIView animateWithDuration:0.2f animations:^{

        CGRect frame = self.inputView.frame;
       UIInterfaceOrientation orientation = self.interfaceOrientation;
    if (orientation == UIInterfaceOrientationLandscapeLeft || orientation ==        UIInterfaceOrientationLandscapeRight)
            frame.origin.y -= kbSize.width;
        else
            frame.origin.y -= kbSize.height;

        self.inputView.frame = frame;
       ;
    }];
}
Run Code Online (Sandbox Code Playgroud)

此代码在iOS 7之前正常工作,但在iOS 8 UIView中没有显示在键盘上方.

任何人都可以建议可能存在的问题,或者iOS 8中有什么变化吗?

keyboard uitableview uitextfield uiview ios8

10
推荐指数
1
解决办法
8831
查看次数