I'm new to objective-c and need some help setting this up. Basically, there's the main view and it opens a pop over view. the pop over has a segmented control with 2 buttons. clicking btn1 should save 0 to a variable in the main view, and btn2 should save 1. Closing the reopening the popover should display the previously selected value.
MainViewController.h
NSInteger data;
MainViewController.m
PopOverViewController.h
PopOverViewController.m
Could someone give me some tips on how to do this?