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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T23:02:30+00:00 2026-06-18T23:02:30+00:00

I have a delete button inside a UITableView cell. The function of this button

  • 0

I have a delete button inside a UITableView cell. The function of this button is to delete the content of that specific cell out of Core Data. This process cannot be undone; so, I added UIAlertView to let users confirm their decision before proceeding into deletion.

It seems that I need to code all the deletion logic inside…

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex

However, this is a delegate method. The Indexpath of the table cell is missing? How do I access the UITableViewCell data after the UIAlertView button is clicked?

One of the idea I have in mind now is to traverse up using alertview.superview until I find UITableViewCell, and access its indexPath property. But this does not seem to be elegant. Should there should be another way to fix this issue?

  • 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-18T23:02:31+00:00Added an answer on June 18, 2026 at 11:02 pm

    Because the UIAlertView is modal I don’t see any problems in saving the indexPath of the UITableViewCell before presenting the UIAlertView in a (global) variable (and maybe clearing that variable in - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex (just to be on the safe side).
    At least this is what I did when I had this issue.

    ps. It’s far from best practice but as long as you do some basic checks you should be ok.

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

Sidebar

Related Questions

I have a razor view that I added a delete button to inside of
So I have a button inside a list row that is used to delete
I have a in-line delete button, I want to append more data to the
i have a custom cell i want to delete it when a button is
I have a button inside a listview to delete selected item.when i click on
Inside the grid I have a delete button inside a grid and have a
I am using DevExpress gridview that have a command button inside. I want to
I have a delete button on a table and a jquery on click eventlistener
I have a delete button on my web site which I want to add
I have a delete button and on clicking cancel on the confirm box, it

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.