In the ipad development, there is a very interesting view controller, UIPOPOVERCONTROLLR, its initialization must be set up a "content view", the equivalent of itself just as a "container", and the content of the display needs another view.
Initialization
-(void) Show: (UIButton *) button{
Tableviewcontroller *tb=[[tableviewcontroller Alloc]initwithnibname:nil Bundle:nil];
Tableviewcontroller *popoverviewcontroller = [[Tableviewcontroller alloc]initwithnibname:nil Bundle:nil];
Popoverviewcontroller.title = @ "Choose the color you like";
Uinavigationcontroller *nav = [[Uinavigationcontroller alloc]
Initwithrootviewcontroller:popoverviewcontroller];
Self.poc = [[Uipopovercontroller alloc] initwithcontentviewcontroller:nav];
[Self.poc presentPopoverFromRect:button.bounds Inview:button Permittedarrowdirections:uipopoverarrowdirectionup Animated:yes];
}
Ios-ipad Uipopovercontroller