开发者

Using Accessory View to display progress through a tableView

I am trying to use the accessory view of a UITableViewCell to indicate progress through a table by having a checkmark appear when the steps on the detail view controller associated with that tableViewCell are comple开发者_运维问答ted. I have found many ways to make all of the cells display the checkmark regardless of their associated steps being completed, but I can't figure out (or find any sample code or documentation) how to make their appearance conditional.

Does anyone have any ideas?


In your detail view you can have it write out to a text file as to the completed state of that subMenu.

ex:

detailview1:0 detailview2:1 detailview3:0

if (detailviewID == 0) cell.checkmark.hidden = FALSE;

Then when your view is popped back to TableView have your viewWillAppear read the text file and determine if the lesson is completed. If it is true have the check mark unhidden.

Remember you will need to write out to this file on appWillTerminate and appWillEnter Background. That way the users progress will be saved on exit.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜