开发者

What to do about modal "done" button on iPad

开发者 https://www.devze.com 2023-02-15 16:05 出处:网络
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\

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号