Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 11-04-2011, 12:35 AM   #1 (permalink)
Registered Member
 
Join Date: Nov 2011
Posts: 1
swamyveera is on a distinguished road
Default UITextField not working inside a UITabBarController with IOS5

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 allocinitWithNibName:@"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 allocinitWithNibName:@"tabView" bundle:nil];
profileView=[[Profile allocinitWithNibName:@"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
swamyveera is offline   Reply With Quote
Reply

Bookmarks

Tags
cocoa-touch, uitabbarcontroller, uitextfield, xcode 4.2

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 418
17 members and 401 guests
7twenty7, Alex-alex, Apptronics RBC, baja_yu, dre, FrankWeller, gwelmarten, ipodphone, jeroenkeij, jleannex55, matador1978, n00b, pbart, reficul, Retouchable, Sami Gh, usernametaken
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,676
Threads: 94,125
Posts: 402,910
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jleannex55
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:18 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0