Edit:
After thinking about this again. I realized what I was trying to do was use a modal view controller on the iPad. I was under the impression that according to the HIG, I couldn't use a "done" button in 开发者_运维百科a popover. I obviously need a "done" button on the iPhone but I am trying to handle that modal view in a popover.
yes its possible
create one complete code in iphone size view control.
now when you want to show on that find the device
Example
you create one controller name mytable.m,.h and .xib in iphone size
one button click you want to show this mytable view
button click event is
-(void)btnshowtableclick:(id)sender
{
NSString *deviceType = [UIDevice currentDevice].model;
if([deviceType isEqualToString:@"iPhone"])
{
//navigate to that screen code
}
else
{
//show popover
}
}
Determine device (iPhone, iPod Touch) with iPhone SDK
Apparently using a "done" button to dismiss a modal view controller is allowed since I can set the modalInPopover property and add my "done" button to the navcontroller bar.
精彩评论