bug并不是必现,在各种型号的机子上进行测试时,不同的机子,有的会有,有的不会有,为了解决这个问题,我也是头疼了好久,最终找到方法,可以调用UIApplicationDelegate class
参考链接http://stackoverflow.com/questions/8072984/hittest-fires-when-uikeyboard-is-tapped
此处做记录,丢完就跑
- (void)applicationWillEnterForeground:(UIApplication *)application {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
for (UIWindow *testWindow in [UIApplication sharedApplication].windows) {
if (!testWindow.opaque && [NSStringFromClass(testWindow.class) hasPrefix:@"UIText"]) {
BOOL wasHidden = testWindow.hidden;
testWindow.hidden = YES;
if (!wasHidden) {
testWindow.hidden = NO;
}
break;
}
}
}
网友评论