當放置在非主界面的TabView中時,對UITextField
有任何限制。換句話說UITextField與iOS5的UITabBarController不兼容
工作細基於情景 1.一種標籤應用,與具有UITextField
視圖中的一個。 2. tabview是應用程序的主界面。
這工作得很好,沒有任何毛刺
不工作的如此精細的場景。 1.基於選項卡的應用程序,但選項卡視圖不是主視圖。 2.還有一些視圖MainWindow.xib
帶有一些介紹動畫,然後調用並顯示tabview。 3. UITextfield
在這樣的tabviews中似乎不起作用 - 特別是在IOS5中。這兩種方法工作正常,直到IOS 4.3 4.文本框是可見的,但點擊它不顯示任何鍵盤,如果我通過代碼呼叫becomeFirstResponder
,鍵盤顯示,但沒有響應。
任何建議
的代碼是非常標準的
在AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
tabViewController = [[tabView alloc] initWithNibName:@"tabView" bundle:nil];
[self.window addSubview:tabViewController.view];
//self.window.rootViewController=tabViewController
[self.window makeKeyAndVisible];
return YES;
}
tabViewController有一個簡單的文本框一個ProfileViewController
。
文本字段工作正常,如果我這樣做
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
tabViewController = [[tabView alloc] initWithNibName:@"tabView" bundle:nil];
profileView=[[Profile alloc] initWithNibName:@"Profile" bundle:nil];
//calling the view directly without using a tab view
[self.window addSubview:profileView.view];
[self.window makeKeyAndVisible];
return YES;
}
是否有別的東西,需要的IOS5做時,標籤的觀點是不是主界面?在這幾天我一直在嘲弄我的頭腦,所有我在tabview中使用UITextfield
的應用程序在ios5中都是不可用的。任何幫助,高度讚賞
編輯:上傳的工程文件http://www.mediafire.com/?xjuc4udlph78saj - 的XCode 4.2獅子
這是一個簡單的項目有兩個選項,創建從委託本身tabbarcontroller,我也有一個觀點(TabView的)與一個tabbarcontroller。有2個視圖的標籤欄FirstViewController
& SecondViewController
。 在AppDelegate.m
如果使用方法1(創建UITabBarController
裏面AppDelegate
,一切都很好)。如果我選擇添加tabView的子視圖,則uitextfield不起作用。 我沒有真正處理對象的釋放,因爲這是測試項目,它僅用於概念驗證。
謝謝