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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:54:10+00:00 2026-05-22T02:54:10+00:00

I have created a uitext view as below: in the h.file @property (nonatomic, retain)

  • 0

I have created a uitext view as below:

in the h.file
@property (nonatomic, retain) NSString *strDescription;

in the m file

@synthesize strDescription;

- (void)viewDidLoad
{
   GRect frame = CGRectMake(0, 0, 320, 369);
    tblAddEquipment = [[UITableView alloc] initWithFrame:frame style:UITableViewStyleGrouped];
    tblAddEquipment.delegate = self;
    tblAddEquipment.dataSource = self;
    //avoid reusable
    [self.view addSubview:tblAddEquipment];
    self.tableView.scrollEnabled = YES;
    //self.tblAddEquipment.scrollEnabled = NO;
    [tblAddEquipment release];
    [self.tableView setSeparatorColor:[UIColor clearColor]];

}
- (void)textViewDidEndEditing:(UITextView *)textView
{
    strDescription = textView.text;
    NSLog(@"strDescription textView#####################--> %@", strDescription);
    [tblAddEquipment reloadData];
 }


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
      NSLog(@"str Description in tableview--> %@", strDescription);

      UITextView *txtDescription;

                   cellRectangle = CGRectMake( 175, 1, 120, 40 );               
                    txtDescription = [[UITextView alloc] initWithFrame: cellRectangle];
                    txtDescription.font = font;
                    //txtDescription.scrollEnabled = YES;
                    txtDescription.textColor = [UIColor blackColor];
                    txtDescription.autoresizingMask = UIViewAutoresizingFlexibleHeight;
                    [cell.contentView addSubview:txtDescription];   
                    txtDescription.returnKeyType = UIReturnKeyDone;
                    txtDescription.delegate = self;
                    txtDescription.tag = 10;
                    NSString *strDesc = strDescription;
                    NSLog(@"strDesc in tableview--> %@", strDesc);
                    txtDescription.text = strDesc;
                    [txtDescription release];


}

When I complete entering the text in the textview, textViewDidEndEditing method gets called.

In that, I get textView text input. I store it in the strDescription variable. I’m able to print it over there. It shows the text assigned to it correctly.

But when the cellForRowAtIndexPath method is called, I tried to print the strDescription variable, but it crashes and shows exc_bad_access.

I have been facing this issue for a long time. I don’t know what I’m doing wrong here. Please help me up.

  • 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-22T02:54:10+00:00Added an answer on May 22, 2026 at 2:54 am

    You have retained strDescription but in your code it seems me, you are not using that,
    because the below statement will not increment the retain count,

    strDescription = textView.text;
    

    Use below instead

    self.strDescription = textView.text;
    

    Use below code

    - (void)textViewDidEndEditing:(UITextView *)textView
    {
        self.strDescription = textView.text;
        NSLog(@"strDescription textView#####################--> %@", strDescription);
        [tblAddEquipment reloadData];
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have created a new property list, and deleted the original .plist (same filename). Deleted
Here is the situation: I have created a custom view class with UITextView as
I have a basic View created in IB containing a UITableView and a UITextVIew.
I have a table view, with an added headerview created in IB to display
I have a UITextview in my Screen,I created textview in drag and drop on
I have created a QWidget with a bunch of QToolButtons in it and I
I have created 3 classes as following Ext.mine.TextParent - Inherting from Textfield Ext.mine.child.TextChildA -
I have created some JQuery that will expand a div 'popup' on hover and
I have created a JSP / servlets application running in Tomcat 7. It runs
I have created an EDMX in visual studio 2010 SP1. It has been built

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.