Pass objects to another view controller in a tab application
This question already has an answer here:
Passing Data between View Controllers
Solutions Collect From Internet About “Pass objects to another view controller in a tab application”
This can be easily solved by using one of the three following solutions:
- The delegate pattern
- The observer pattern
- Blocks or closures
You should take some time and go through this tutorial:
1. vc1 has vc2 as delegate and calls the methods define in the delegate protocol.
2. vc1 posts a notification and vc2 listens for it
3. vc1 calls a block on vc2 (very close to the delegate pattern)
I’m simply going to point out that your user experience is broken in this example.
You’d be much better off having and ‘add’ button on the top right of your table view controller and presenting a new view controller modally to capture the ToDo values.
- UITableView's reloadRowsAtIndexPaths: (NSArray *) indexPaths failing to cause a reload unless you call it twice?
- UIImagePickerController stuck at compressing Video
- Drawing app on iPad using OpenGL
- iOS crash 'NSInternalInconsistencyException', reason: 'statement is still active' Core Data cache related?
- AudioServicesPlaySystemSound muted on simulator xCode 6 GM
- Missing Marketing Icon Xcode bug?
- My button's titleLabel become “…” on iOS10
- Easiest way of getting reverse geocoded current location from iOS
- How to draw a transparent NSScroller
- How to archive and unarchive custom objects in Swift? Or how to save custom object to NSUserDefaults in Swift?
- On mac, g++ (clang) fails to search /usr/local/include and /usr/local/lib by default
- MonoTouch – better console output in XCode's organizer
- Integrate Comments with Facebook iOS SDK (iPhone)
- Strange constraints behaviour on iPad
- : object cannot be nil – how determine where is the error?