I have a view with a UINavBar in it, and a scrollview beneath that. The nav bar has a segmented button which I want to use to toggle between 2 images to be presented in the scrollview. Both of the images are in the same scrollview but one is hidden to start.
I was trying to do this like so:
-(IBAction)segmentedControlIndexChanged{
switch (self.segmentedControl.selectedSegmentIndex)
{
case 0:
bvpiimg.hidden = NO;
mppiimg.hidden = YES;
case 1:
bvpiimg.hidden = YES;
mppiimg.hidden = NO;
break;
default:
break;
}
}
It isn't doing anything when I switch the segmented control though.. Also, these images are HUGE pngs.. Is there a better way than show/hide that would be easier on the memory/performance.