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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:27:36+00:00 2026-05-26T14:27:36+00:00

In the tableview the user can tap the upper right button (navigation bar rightside)

  • 0

In the tableview the user can tap the upper right button (navigation bar rightside) and it will pop up the custom alert view and ask user to type in the edittext box with two button cancel and save. As you can see in the code below. When i click on save it will add a row and display ‘label’ to confirm that it is working and now i want to be able to display whatever the user typed in the box. I have read all the tableview apple developer site and search around and they all don’t do the way I want.

- (void) CustomAlertView:(CustomAlertView *)alert wasDismissedWithValue:(NSString *)value
{
    [authorList addObject:@"label"];
    [tblSimpleTable reloadData];
}

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (editingStyle == UITableViewCellEditingStyleDelete)
    {
        // Delete the row from the data source.
        [authorList removeObjectAtIndex:indexPath.row];
        [tblSimpleTable reloadData];
    }
    else if (editingStyle == UITableViewCellEditingStyleInsert)
    {
        // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view.
        [authorList insertObject:@"label" atIndex:[authorList count]];
        [tblSimpleTable reloadData];
    }   
}

UPDATE***

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
    NSString *title = [alertView buttonTitleAtIndex:buttonIndex];

    if([title isEqualToString:@"Save"])
    {
        NSString *any = [NSString stringWithFormat:@"'%@'"];
        [authorList addObject:any];
        [tblSimpleTable reloadData];
    }
}

insert row code

else if (editingStyle == UITableViewCellEditingStyleInsert)
    {
        // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view.
       NSString *any = [NSString stringWithFormat:@"'%@'"];
        [authorList insertObject:any atIndex:[authorList count]];
        //[authorList addObject:any];
        [tblSimpleTable reloadData];

    }   
}
  • 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-26T14:27:37+00:00Added an answer on May 26, 2026 at 2:27 pm

    go to this link

    http://iphonedevelopment.blogspot.com/2010/05/custom-alert-views.html

    in alert view delegate methos u take the value of text

    NSString *string = alertViews.textField.text;

    and then reload table;

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

Sidebar

Related Questions

Currently, I have a table view that the user can add items and delete
I have a tableview where the user can make sections of people using a
In my app I am doing tableView. By clicking row, the new view will
I have a tableview that is blank by default. User can add cells to
I have a custom UIButton class in my IPhone navigation application. When the user
I have a tableView and when the user is selecting one of the cells,
If the user taps and holds on a Foo table view cell for 2
I have a simple table view which is editable. All I need the user
In my iPhone application I have a table view. When user taps any row,
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { if(section != 0) { UIView *view = [[[UIView

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.