1

Im making anApp which has a address which has a listing page and a detail page .

LISTING PAGE OF TH ADDRESS BOOK

DETAIL PAGE OF THE ADRESSBOOK

If i click on email address of the detail page , it pops to the listing page. i want to show a tick on the listing page whose email is selected.(like shown below). The cell has a image (tick)

enter image description here

.I want change the outlet of the image in the cell when the lising page is reloaded. The cellforrowatindexapath is obiously not called when table is reloaded.Is there any way that i can get the index path of the cell .so that i can change the outlet of the cell when table is reloaded.Thank you....

Priyan Haridas
  • 183
  • 2
  • 7

1 Answers1

1

Why don't you change the accessory view type? Set the accessoryViewType property on UITableViewCell to one of:

UITableViewCellAccessoryDisclosureIndicator
UITableViewCellAccessoryDetailDisclosureButton
UITableViewCellAccessoryCheckmark    // you want this one

The default value is UITableViewCellAccessoryNone.

You may have to called [tableView reloadData] when appropriate to reload the table data.

There are lots of questions on SO relating to accessory views, e.g. custom accessory views: Using a custom image for a UITableViewCell's accessoryView and having it respond to UITableViewDelegate for example.

Community
  • 1
  • 1
occulus
  • 16,959
  • 6
  • 53
  • 76