IPad使用UIModalPresentationFormSheet时隐藏键盘
2012-06-29 20:53:26 来源:WEB开发网核心提示: 普通的做法resignFirstResponder在UIModalPresentationFormSheet的时候不起效 加上如下代码:[passwordField resignFirstResponder]; @try { Class UIKeyboardImpl = NSClassFromString(@&quo
普通的做法resignFirstResponder在UIModalPresentationFormSheet的时候不起效 加上如下代码:
[passwordField resignFirstResponder];
@try {
Class UIKeyboardImpl = NSClassFromString(@"UIKeyboardImpl");
id activeInstance = [UIKeyboardImpl performSelector:@selector(activeInstance)]; [activeInstance performSelector:@selector(dismissKeyboard)];
}
@catch (NSException *exception) {
NSLog(@"%@", exception);
}
Tags:IPad 使用 UIModalPresentationFormSheet
编辑录入:爽爽 [复制链接] [打 印]更多精彩
赞助商链接