I can't seem to get the new iPhone media player to work

I'm working in SDK 3.0, so I can't use the specifics, but anyone using it can understand, hopefully.

I'm trying to load a view that allows you to select from a specific list of items ... but I can't get it to work here's the code I'm using done as generic:

M**********Controller *newpicker = [[M**********Controller alloc] init];

      

I've tried using the options above, but I just can't seem to get it to work. I'm not sure if I will call the right place in my code or if this is even the correct way to do it. The documentation is here (only registered developers can view it). It looks to me like it is using a UIAlertView, but it looks like it is not. It might be overly obscure, but if someone can help it would be appreciated.

0


a source to share


2 answers


It is a subclass of UIViewController, so you display it just like any other UIViewController, meaning you have several options:

If you are in a navigation hierarchy, you will do the following:

[self.navigationController pushViewController: newpicker animated: YES];

      



Or perhaps this:

[self.navigationController presentModalViewController: newpicker animated: YES];

      

If the current controller is not inside a navigation controller, you simply place the new controller view inside another; use newpicker.view

to access it for this purpose.

+1


a source


To add to Jim,

All UIViewControllers also have a view property. Within any view, the controller is on the screen, you can simply:



[self.view addSubview:newPicker.view];

      

+1


a source







All Articles