简体   繁体   中英

Access UITableViewCell from UITableViewController on button click

Got a UIStepper inside a UITableViewCell (IBAction). What I would like is to reset its value property back to 0 from the UITableViewController on a button press (another IBAction).

So how can I access my dynamic cells from an a UITableViewController IBAction?

Eventually I ended up adding a boolean property named shouldResetToZero in the model representing the cell. I would set this to TRUE from the UITableViewController on button press and update the stepper if it's true in cellForRowAtIndexPath.

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