I am making a utility application, and I have a label on my main view. Depending on the user's selection, that label should say one of two things. How can I use a segmented control to change the label text?

viewWillAppear? do you mean viewDidLoad? because just doing what you said, nothing happens if I change the selection on the flipside view
–
iamataptoolAug 17 '11 at 0:02

no, viewWillAppear - because the view may be kept in memory when you flip back your view (try logging something in viewDidLoad and see if it appears when you flip back your view)
–
Alex CoplanAug 17 '11 at 0:04

well, by default, the application does not have a viewWillAppear method. So, do I need to call it? If so, where?
–
iamataptoolAug 17 '11 at 0:09

all view controllers have viewWillAppear - you just need to implement it. after your viewDidLoad in your main controller start typing - (void)viewWill... and it will show you the method!
–
Alex CoplanAug 17 '11 at 0:14

alright. that function is being called. but i added NSLogs that say which segment is highlighted, and no matter what, it says 1, and the text is never changed
–
iamataptoolAug 17 '11 at 0:20