i have a master detail application where in the detail view there is a text field with some information taken from a plist file store in bundle in viewdidload i define
self.description.text=[self.myobject objectForKey:@"description"];
now i would like to put a segmented control so as when user clicks first the "description" will be shown taken from plist as for second segmented i also have a key in plist file called "medical" with the help of if statement i have made an IBAction for the segmented control
- (IBAction)changeText:(id)sender {
if (segmentedControls.selectedSegmentIndex == 0) {
description.text=[self.botan objectForKey:@"description"];
}
else if(segmentedControls.selectedSegmentIndex == 1){
meddescription.text =[self.botan objectForKey:@"medical"];
}
}
have also added the outlet to the.h file
IBOutlet UISegmentedControl *segmentedControls;
but when i run the app the segmented control change to the second segment but without changing the text from the plist the key medical that i mentioned earlier any ideas?