Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 1    Views: 63

Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
10/28/12 02:40 PM (13 years ago)

UIPickerView advice

I'm creating an app with a UIPickerView. I want to use a UIButton to change to another view which will change depending on the cell selected in the picker. I'm loading the cells in the pickerview thus.. - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. movieTitles = [[NSArray alloc] initWithObjects:@"Line1", @"line2", @"Line3", nil]; If I wanted to play an mp4 corresponding with each line I can use the following: -(IBAction)playSelectedVideo:(id)sender{ NSURL *movieURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:selectedMovieName ofType:@"mp4"]]; MPMoviePlayerViewController *moviePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:movieURL]; [self presentMoviePlayerViewControllerAnimated:moviePlayer]; } then, load the mp4s thus movieFileNames = [[NSArray alloc] initWithObjects:@"10251-16", @"102510-15", @"1191-1", nil]; } Does anyone know how I can change the button to allow for a change of view, ie secondviewcontroller or thirdview, fourt, etc? thanks awfully!
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
10/28/12 11:47 PM (13 years ago)
Sorry I can't help! It would make an interesting plugin ... UIPickerView to navigate to different screens and content!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.