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

  • Home
  • SEARCH
  • 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 3948572
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:23:27+00:00 2026-05-20T01:23:27+00:00

So I saw this question: How do you connect the "delegate" outlet of a

  • 0

So I saw this question: How do you connect the "delegate" outlet of a UITextView to a class that implements UITextViewDelegate protocol?

My problem is similar to what booboo is describing in the second response (not the one marked as the answer.)

I have a MyViewController which implements UITextViewDelegate. In interface builder for the nib, inside the view I have selected the TextView and assigned it’s delegate to the File Owner (which is MyViewController.)

MyViewController has implemented

- (void)textViewDidBeginEditing:(UITextView *)textView
{
NSLog(@"TextView EDIT %@",textView);
}

Every single time I test my app though, as soon as I click on the TextView I get an EXC_BAD_ACCESS crash. If I remove the delegate link in IB then the keyboard pops up fine.

I have also tried creating an IBOutlet UITextView to the textview inside MyViewController and linking the TextView to this IBOutlet in the File Owner. In the viewDidLoad then I assign:

myDescriptionTextField.delegate = self;

But this also results in the same issue of an EXC_BAD_ACCESS as soon as I click the TextView.

Inside XCODE at the top when it crashes the stack trace(i think this is what it is ?) of where it crashes says:

objc_msgSend
??

-[UIResponder becomeFirstResponder]
-[UITextView becomeFirstResponder]
-[UITextInteractionAssistant setFirstResponderIfNecessary]

… etc?

Does this help? I’m so lost on what this issue is? Everything seems linked correctly.

  • 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-20T01:23:27+00:00Added an answer on May 20, 2026 at 1:23 am

    I would check how the MyViewController object is created and managed (how you keep the object in your application). It is possible that while your UITextView exists as it becomes a subview of one of your UIView object (addSubview retains the subview), the MyViewController object itself is released from the memory after you build up your view hierarchy.

    myDescriptionTextField.delegate = self;
    

    does not retain self, as retaining a delegate may cause a problem of reference cycles.

    Check this, and if it doesn’t solve the problem try debugging with NSZombieEnabled because it will tell you where exactly you make a reference to an invalid object.

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

Sidebar

Related Questions

I saw this question: If a "Utilities" class is evil, where do I put
Let me preface by saying that I saw this other question on the subject
I saw this question , which focuses on the Brittney Spears problem. But I
I saw this question Simple example of threading in C++ but my problem is
I saw this question and some similar and I think it's not duplicate :
I saw this question (http://stackoverflow.com/questions/1521640/standard-android-button-with-a-different-color) and that works fine for normal buttons. Now I
I saw this question that asks given a string smith;rodgers;McCalne how can you produce
Just saw this question relating to a segmentation fault issue in a C++ class
I saw this question , and I'm wondering what is the problem with this?
I saw this question and it motivated me to look again (without success) at

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.