How do I go about this task? Basically, I will have an array of "seconds int" listed inside the UITableView. So how can I assign each "seconds int" to countdown to zero? The possible problems I'm seeing is the timers not being updated when the cell is not yet created. And how do I instantiate multiple independent NSTimers updating different ui elements? I'm quite lost here, so any suggestions is greatly appreciated. for visual purposes, I want to have something like this:
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
To have fancy UI stuff in the table like that, you might want to subclass UITableViewCell and create a timer as a property in each. The cell can then own a delegate which responds to TimerWentOff and handles ringing of an alarm or a notification or whatnot. Each timer would update the label in it's cell.
Hope that helps a bit. If you have more specific questions, let me know.
From the image, it looks like your model is a set of actions the user plans to take. I would arrange things this way:
1) MyAction is an NSObject with a name and a due date. MyAction implements something like this:
2) StatusViewController keeps a handle to the model which is an NSArray of MyActions, it also has an NSTimer (just one) that tells it time is passing.