适用于SDK 4的自定义iPhone KeyBoard(iOS4操作系统) [英] Custom iPhone KeyBoard for SDK 4 (iOS4 OS)
本文介绍了适用于SDK 4的自定义iPhone KeyBoard(iOS4操作系统)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
旧SDK解决方案:
- (void)modifyKeyboard:(NSNotification *)notification
{
UIView *firstResponder = [[[UIApplication sharedApplication] keyWindow] performSelector:@selector(firstResponder)];
for (UIWindow *keyboardWindow in [[UIApplication sharedApplication] windows])
for (UIView *keyboard in [keyboardWindow subviews])
if([[keyboard description] hasPrefix:@"<UIKeyboard"] == YES)
{
MyFancyKeyboardView *customKeyboard = [[MyFancyKeyboardView alloc] initWithFrame: CGRectMake(0, 0, keyboard.frame.size.width, keyboard.frame.size.height);
[keyboard addSubview: customKeyboard];
[customKeyboard release];
}
}
按照上面的方法,我现在发现iOS4是不同的。不起作用。我确信这是由于命名子视图(或排序)的差异。对于iphone SDK 4,有谁知道如何解决同样的问题?
Following the above method, I now find that the iOS4 is different. It will not work. I am sure this is due to differences in naming subviews (or the sort). Does anyone know how to get around this same problem, for the iphone SDK 4?
推荐答案
你可以查看这篇文章:
http:// www.neoos.ch/news/46-development/54-uikeyboardtypenumberpad-and-the-missing-return-key
You can have a look at this post: http://www.neoos.ch/news/46-development/54-uikeyboardtypenumberpad-and-the-missing-return-key
它解决了问题并且有效适用于所有版本的SDK
It resolves the issue and works for all version of the SDK
这篇关于适用于SDK 4的自定义iPhone KeyBoard(iOS4操作系统)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文