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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:48:14+00:00 2026-06-06T00:48:14+00:00

I have textView in my cell and sometimes during tableView scroll some weird calls

  • 0

I have textView in my cell and sometimes during tableView scroll some weird calls happen. System make my textView first responder. I’ve found these calls do unwanted behavior:

#0 -[UITextView canBecomeFirstResponder] ()
#1 -[UIView(Hierarchy) deferredBecomeFirstResponder] ()
#2 -[UIView(Hierarchy) _promoteDescendantToFirstResponderIfNecessary] ()

I can’t find out why are these called, so I’ve tried to deal with this by extending UITextView and overriding - canBecomeFirstResponder.

Here is my .h:

#import <UIKit/UIKit.h>

@protocol TextViewDelegate;

@interface TextView : UITextView

@property (nonatomic, assign) id<TextViewDelegate> delegate;

@end

@protocol TextViewDelegate <UITextViewDelegate>

- (BOOL)canBecomeFirstResponder:(TextView *)textView;

@end

And .m:

#import "TextView.h"

@implementation TextView

@synthesize delegate;

- (BOOL)canBecomeFirstResponder
{
    return [self.delegate respondsToSelector:@selector(canBecomeFirstResponder:)] ? [self.delegate canBecomeFirstResponder:self] : NO;
}

@end

This solution works but on the line @property (nonatomic, assign) id<TextViewDelegate> delegate; I’ve got warning and I don’t know why. It says Property type 'id<TextViewDelegate>' is incompatible with type 'id<UITextViewDelegate>' inherited from 'UITextView'.

So why system want to make textView first responder if I do not? Why I’m getting this warning? Is there better solution than mine?

  • 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-06T00:48:16+00:00Added an answer on June 6, 2026 at 12:48 am

    I’m not sure , but I suspect the warning is because the pre-compiler knows about TextViewDelegate but it does not know yet that this protocol is inheriting UITextView protocol. Just declare it above like this:

    @class TextView;
    
    @protocol TextViewDelegate <UITextViewDelegate>
    
    - (BOOL)canBecomeFirstResponder:(TextView *)textView;
    
    @end
    
    @interface TextView : UITextView
    
    @property (nonatomic, assign) id<TextViewDelegate> delegate;
    
    @end
    

    But I’m not sure I understand the question.
    You have a table and in one/more/each cell you have an UITextView, correct?
    Do you want the text view to be editable?
    Because you can simply set [textView setEditable:FALSE];

    Hope this helps.

    Regards,

    George

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

Sidebar

Related Questions

I have a TableView with TextView as cell elements. Currently I can't setup the
I have a tableview cell with a custom textview in it, I am now
I have a custom tableview cell, which contains some object UIImageView, UILabel, and a
Guess that I have a TextView that I want to update it in some
I have a gtk.Textview . I want to find and select some of the
I have TextView and want to use setScaleX()/setScaleY() to make the text zoomable. But
I have a tableview which contains some text and I have a label inside
I have a UITextField set up in a TableView. When you first click on
I have a custom cell (subclass of UITableViewCell) with a textView inside of it.
I have a problem with a tableview and a custom cell. I have the

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.