Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6835913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:17:24+00:00 2026-05-26T23:17:24+00:00

Are there any restrictions on a UITextField when placed inside a tabview which not

  • 0

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

- (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

- (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

Edit: Uploaded the project file http://www.mediafire.com/?xjuc4udlph78saj – 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 UITabBarController 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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:17:25+00:00Added an answer on May 26, 2026 at 11:17 pm

    After hours of searching, fiddling and experimenting. I have found out the solution.

    This seems to happen when there are more than one UIWindow in the application.
    In my case, i was diong this

    • AppDelegate starts off with its own UIWindow Once i have played some
      startup animations, i try to display another view with a
      tabbarcontroller, and ofcoures a window to hold the UITabBarController

      The second window (even after setting it to makeKeyAndVisible) seems
      to be blocking keyboard events fore UITextField inside the
      UITabBarController.

    The following has worked for me:
    Rather than having the second view with its own window, i had it with a UITabBarController, and a UIView/UIWindow(this is for the sake of having a default view for the nib file). And when i needed to show the tabbarview i have used this

    [[[UIApplication sharedApplication] keyWindow] setRootViewController:TabBar]
    

    I am not sure of a better way, but that have worked for me. In short, i have found that having another UIWindow inside the app causes issues with becomeFirstResponder.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there any restrictions regarding the elements that can be posted inside of the
Are there any restrictions on naming the favorites icon (favicon) file as anything other
Is there any formal restriction as to which characters are allowed in URL parameter
Is there any query which can return me the number of revisions made to
Is there any reason not to use the bitwise operators &, |, and ^
In MySQL are there any restrictions (and/or) practical reasons against using a numbering system
Are there any restrictions for using coherence.jar without any license? coherence.jar is open for
Consider the following code [coder encodeObject: properties forKey:@properties]; Are there any restrictions on what
Are there any restrictions on the names of tables, or issues with certain names
When uploading files to a web server using HTTP post, are there any restrictions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.