1. 判断设备的类型ipad或者iphone,可在main中定义一个宏来记录。
//开始登录或者注册
- (void)loginOrRegisterUser:(UIViewController *)aViewController;
{
if ([[UIDevicecurrentDevice] userInterfaceIdiom ] ==UIUserInterfaceIdiomPhone ) {
UserLoginViewController *vc = [[UserLoginViewControlleralloc] init];
vc.modalTransitionStyle =UIModalTransitionStyleCoverVertical;
[self.deckControllerpresentModalViewController:vc animated:YES];
[vc release];
}
else {
UserLoginViewController_iPad *vc = [[UserLoginViewController_iPadalloc] initWithNibName:@"UserLoginView_iPad"bundle:nil];
vc.modalTransitionStyle =UIModalTransitionStyleCoverVertical;
[aViewController presentModalViewController:vcanimated:YES];
[vc release];
}
}
2. 调用自带应用
3. 禁止锁屏
4. 设置icon上的数字