Are there any restrictions on a UITextField when placed inside a tabview which not the main interface. In other words
Working fine scenario 1. A tab based application, with one of the view having a uitextfield. 2. The tabview is the main interface for the application.
This works fine without any glitches
Not-working so fine scenario. 1. A tab based application, but the tab view is not the mainview. 2. There is another view "MainWindow.xib" with some intro animation, which then calls and shows the tabview. 3. UITextfield in such tabviews does'nt seem to work - especially in IOS5. Both methods work fine till IOS 4.3 4. The textfield is visible, but tapping it does not show any keyboard, if i call becomefirstresponder via code, the keyboard is shown but is not responsive.
Any suggestions
The code is pretty standard
in the AppDelegate
PHP Code:
- (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 has a ProfileViewController with a simple textfield.
The textfield works fine if i do this
PHP Code:
- (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;
}
Is there something else that needs to be done for IOS5 when the tab view is not the main interface? I have been cracking my head at this for a few days, all my apps with a uitextfield inside a tabview are not usable in ios5. Any help is highly appreciated
Uploaded the project file
TestKeyBoardWithTab.zip - XCode 4.2 on Lion
It is a simple project with two options, Creating a tabbarcontroller from the delegate itself, and i also have a view(tabView) with a tabbarcontroller. There are 2 views for the tabbar FirstViewController & SecondViewController. In the appdelegate.m if using method 1(create tabbarcontroller inside appdelegate, all is well). If i choose to add a subview of tabView, the uitextfield does not work. I have not really handled the releasing of objects, since this is test project and it is only for proof of concept.
Thanks