简体   繁体   中英

UITableView accessory view

I have created a UITableView populated by data coming from mysql (using NSJSONSERIALIZATION). Now the problem is one thing. What I retrieved was the product name. I want to have an accessory view (arrow like on the right side of cell). once clicked, new view and load details of that product there.

I know it can be done, but don't know how or where to look for a good tutorial. Any recommendations?

am really new to iOS development.

thanks a lot

Use this tableview delegate.

- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath

...and in cellForRowAtIndexPath: add this.

cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM