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 8959829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:31:58+00:00 2026-06-15T15:31:58+00:00

I’ve set up a UITextField in Interface Builder and connected it with the property

  • 0

I’ve set up a UITextField in Interface Builder and connected it with the property self.nameField. My problem is that, as is, tapping it does nothing–the user can’t enter any text; there isn’t even a cursor. If I add becomeFirstResponder then the keyboard automatically displays. What I want is for the keyboard to display if and only if the user taps the field to enter text.

The method involved is as follows:

-(void)displayOptOutScreen
{
    if (!self.nameField)
    {
        self.nameField=[[UITextField alloc] init];
    }
    self.nameField.hidden=NO;
    self.nameField.delegate = self;
    self.nameField.returnKeyType = UIReturnKeyDone;
    [self textFieldShouldReturn:self.nameField];
    [self.textView resignFirstResponder]; //This is a UITextView, created programmatically
    //[self.nameField becomeFirstResponder];  //Keyboard automatically displays.
}

For what it’s worth, there’s a UIButton that also isn’t accepting touches. The UITextView is accepting text with no problem.

This is a tabbed application. After reading over other Stack Overflow questions, I’ve tried adding various combinations of the following lines to the app delegate:

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.viewController = [[GHHaikuViewController alloc] initWithNibName:@"GHHaikuViewController" bundle:nil];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];

but I get various errors depending on which lines I include or not, and nothing ends up working. (The view controller the UITextField is on is not GHHaikuViewController but GHComposeViewController, but I get an error when I try to use that instead.)

Any thoughts about what I’m doing wrong?

EDIT: Here are screen shots of the Interface Builder settings. Sorry they’re broken up–I’m working on a MacBook Air 11″.

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

FURTHER EDIT: Here’s the output when I entered po [[[[UIApplication sharedApplication] delegate] window] recursiveDescription] at the debug prompt.

(id) $1 = 0x0ad4bb80 <UIWindow: 0xad48ac0; frame = (0 0; 320 480); autoresize = W+H; layer = <UIWindowLayer: 0xad44010>>
   | <UILayoutContainerView: 0x9e74450; frame = (0 0; 320 480); autoresize = W+H; layer = <CALayer: 0x9e74510>>
   |    | <UITransitionView: 0xaa46f80; frame = (0 0; 320 431); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0xaa47050>>
   |    |    | <UIViewControllerWrapperView: 0x9e90760; frame = (0 20; 320 411); autoresize = W+H; layer = <CALayer: 0x9e907c0>>
   |    |    |    | <UIView: 0x9e8c870; frame = (0 0; 320 411); autoresize = W+H; gestureRecognizers = <NSArray: 0x9e8bbd0>; layer = <CALayer: 0x9e8c8d0>>
   |    |    |    |    | <UIImageView: 0x9e8c790; frame = (0 0; 320 411); clipsToBounds = YES; opaque = NO; autoresize = TM+BM; layer = <CALayer: 0x9e8c7f0>>
   |    |    |    |    | <UITextField: 0x9e82610; frame = (40 189; 240 30); text = ''; clipsToBounds = YES; opaque = NO; autoresize = TM+BM; gestureRecognizers = <NSArray: 0x9e6ea90>; layer = <CALayer: 0x9e83720>>
   |    |    |    |    |    | <UITextFieldRoundedRectBackgroundView: 0x9e73ac0; frame = (0 0; 240 30); userInteractionEnabled = NO; layer = <CALayer: 0x9e73b80>>
   |    |    |    |    |    |    | <UIImageView: 0x9e73cd0; frame = (0 0; 8 30); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x9e73d30>>
   |    |    |    |    |    |    | <UIImageView: 0x9e73d80; frame = (8 0; 224 30); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x9e73de0>>
   |    |    |    |    |    |    | <UIImageView: 0x9e73e10; frame = (232 0; 8 30); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x9e73e70>>
   |    |    |    |    |    | <UITextFieldLabel: 0x9e8afa0; frame = (7 7; 226 15); text = 'Name (optional)'; clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x9e8af20>>
   |    |    |    |    | <UIButton: 0xad6fb00; frame = (236 221; 44 44); clipsToBounds = YES; opaque = NO; autoresize = TM+BM; layer = <CALayer: 0xad6fbf0>>
   |    |    |    |    |    | <UIImageView: 0x9e921c0; frame = (14 14; 16 16); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x9e922d0>>
   |    |    |    |    |    | <UIButtonLabel: 0x9e8a6f0; frame = (0 0; 0 0); clipsToBounds = YES; hidden = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x9e8a790>>
   |    |    |    |    | <UITextView: 0xa3de800; frame = (20 90; 300 480); text = '
I hope to update the May...'; clipsToBounds = YES; gestureRecognizers = <NSArray: 0x9e72ef0>; animations = { transition=<CATransition: 0x9e8eea0>; }; layer = <CALayer: 0x9e5d770>; contentOffset: {0, 0}>
   |    |    |    |    |    | <UIWebDocumentView: 0xa3dec00; frame = (0 0; 300 188); text = '
I hope to update the May...'; opaque = NO; userInteractionEnabled = NO; gestureRecognizers = <NSArray: 0x9e8d5a0>; layer = <UIWebLayer: 0x9e8d220>>
   |    |    |    |    |    |    | <TileHostLayer: 0x9e8d2b0> (layer)
   |    |    |    |    |    |    |    | <TileLayer: 0x9e90fb0> (layer)
   |    | <UITabBar: 0xad41b80; frame = (0 431; 320 49); autoresize = W+TM; layer = <CALayer: 0xad41c70>>
   |    |    | <_UITabBarBackgroundView: 0xad47950; frame = (0 0; 320 49); opaque = NO; autoresize = W; userInteractionEnabled = NO; layer = <CALayer: 0xad47a00>>
   |    |    | <UITabBarButton: 0xad42ff0; frame = (2 1; 76 48); opaque = NO; layer = <CALayer: 0xad453e0>>
   |    |    |    | <UITabBarSwappableImageView: 0xad45670; frame = (14 2; 48 32); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xad45740>>
   |    |    |    | <UITabBarButtonLabel: 0xad42410; frame = (24 34; 28 13); text = 'Home'; clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xad42500>>
   |    |    | <UITabBarButton: 0xad46b10; frame = (82 1; 76 48); opaque = NO; layer = <CALayer: 0xad46460>>
   |    |    |    | <UITabBarSelectionIndicatorView: 0xad5cf90; frame = (0 2; 76 44); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xad5d2f0>>
   |    |    |    | <UITabBarSwappableImageView: 0xad46490; frame = (14 2; 48 32); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xad46510>>
   |    |    |    | <UITabBarButtonLabel: 0xad46790; frame = (15 34; 46 13); text = 'Compose'; clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xad40650>>
   |    |    | <UITabBarButton: 0xad46630; frame = (162 1; 76 48); opaque = NO; layer = <CALayer: 0xad47080>>
   |    |    |    | <UITabBarButtonLabel: 0xad46df0; frame = (29 34; 19 13); text = 'Buy'; clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xad466f0>>
   |    |    | <UITabBarButton: 0xad47270; frame = (242 1; 76 48); opaque = NO; layer = <CALayer: 0xad47770>>
   |    |    |    | <UITabBarButtonLabel: 0xad47330; frame = (15 34; 47 13); text = 'Feedback'; clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xad473d0>>
   |    |    | <UIImageView: 0xad48130; frame = (0 -3; 320 3); opaque = NO; autoresize = W+BM; userInteractionEnabled = NO; layer = <CALayer: 0xad48190>>
(lldb) 
  • 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-06-15T15:31:59+00:00Added an answer on June 15, 2026 at 3:31 pm

    Assuming you’re handling your UIControls correctly (having set all userInteractionEnabled properties to YES, for instance), this sounds as if you have set an invisible UIView on top of your UIControls.

    Once your app is running in the simulator, you can check this manually by pausing the application (using the little pause button under your code) and typing this command in the debug prompt:

    po [[[[UIApplication sharedApplication] delegate] window] recursiveDescription]
    

    This will print out the description of the UIWindow and all of its subviews. You can check if there is a UIView on top of your UIControls somehow.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I
I am currently running into a problem where an element is coming back from
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
I've tracked down a weird MySQL problem to the two different ways I was

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.