示例代码:
UIVIEwController* modalController = [[UIVIEwController alloc]init];modalController.modalTransitionStyle = UIModalTransitionStyleCrossdissolve;modalController.modalPresentationStyle = UIModalPresentationFormSheet;CGPoint frameSize = CGPointMake([[UIScreen mainScreen] bounds].size.wIDth*0.95f,[[UIScreen mainScreen] bounds].size.height*0.95f);CGRect screenRect = [[UIScreen mainScreen] bounds];CGfloat screenWIDth = screenRect.size.wIDth;CGfloat screenHeight = screenRect.size.height;// Resizing for iOS 8modalController.preferredContentSize = CGSizeMake(frameSize.x,frameSize.y); // Resizing for <= iOS 7modalController.vIEw.supervIEw.frame = CGRectMake((screenWIDth - frameSize.x)/2,(screenHeight - frameSize.y)/2,frameSize.x,frameSize.y);UIVIEwController *vc = [[[[UIApplication sharedApplication] delegate] window] rootVIEwController];[vc presentVIEwController:modalController animated:YES completion:nil];总结
以上是内存溢出为你收集整理的在iOS 8上调整UIModalPresentationFormSheet的大小全部内容,希望文章能够帮你解决在iOS 8上调整UIModalPresentationFormSheet的大小所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)