0
是否有任何方式通過編程關閉鍵盤拆分。以編程方式關閉拆分鍵盤
是否有任何方式通過編程關閉鍵盤拆分。以編程方式關閉拆分鍵盤
從我的小知識,你不能鎖定默認的iPad鍵盤滾動運動。
您可以管理其他功能,如鍵盤類型,也可以創建自定義uikeyboard。
請檢查this post這是討論有關創建自定義uikeyboard
但是,請把這個代碼來看看,並嘗試實現自己的目標
//The UIWindow that contains the keyboard view - It some situations it will be better to actually
//iterate through each window to figure out where the keyboard is, but In my applications case
//I know that the second window has the keyboard so I just reference it directly
UIWindow* tempWindow = [[[UIApplication sharedApplication] windows] objectAtIndex:1];
//Because we cant get access to the UIKeyboard throught the SDK we will just use UIView.
//UIKeyboard is a subclass of UIView anyways
UIView* keyboard;
//Iterate though each view inside of the selected Window
for(int i = 0; i < [tempWindow.subviews count]; i++)
{
//Get a reference of the current view
keyboard = [tempWindow.subviews objectAtIndex:i];
//Check to see if the className of the view we have referenced is \"UIKeyboard\" if so then we found
//the keyboard view that we were looking for
if([[keyboard className] isEqualToString:@\"UIKeyboard\"] == YES)
{
//Keyboard is now a UIView reference to the UIKeyboard we want. From here we can add a subview
//to th keyboard like a new button
//Do what ever you want to do to your keyboard here...
}
}
你說的鍵盤滾動平均運動? – 2013-03-20 18:33:03
我編輯了我的問題。請再檢查一次 – Tariq 2013-03-20 18:34:14