- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
希望有人能指出我的启动屏幕做错了什么。问题是屏幕以纵向模式显示,而不是横向模式......
- (void)showSplash
{
UIView *modelView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1024 , 748)];
UIViewController *modalViewController = [[UIViewController alloc] init];
[modelView setBackgroundColor:[[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"Splash.png"]]];
modalViewController.view = modelView;
[self presentModalViewController:modalViewController animated:NO];
[self performSelector:@selector(hideSplash) withObject:nil afterDelay:5.0];
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
预先感谢您的帮助。
最佳答案
看起来您正在为 iPad 编写应用程序。如果是这样,你必须同时支持横向和纵向,否则苹果会拒绝它。我建议您应该使用两个不同的图像。图片规范如下:
(我假设如果不向图像高度添加 20 像素,您将显示状态栏)
就是这样,创建这些图像并将其添加到您的项目中。你就可以走了。也不需要编写任何额外的代码..
你成功了
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
关于ios - 为什么我的 ModalView 以纵向模式显示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8070701/
我必须单击“完成”按钮才能以编程方式关闭模态视图。我认为 UIButton 比 UIBarButtonItem 添加 UIControlEventsTouchupInside 更好。 但是对于 UIB
我创建了一个模态视图,加载在我的 tabBar 顶部,作为一个 3 步欢迎屏幕。 虽然一切正常,但我遇到的问题是找到一种只加载一次的方法,这样用户就不必在每次加载时都处理欢迎消息。 我做了一些研究,看
我有一个 segue 类型是模态的,我将它的 presentationstyle 设置为 formsheet。 这是屏幕截图。 当我点击变暗的 View 时,“弹出窗口” View 不会自行消失。在模
我查看了不同的来源以找到答案,并可能尝试了几种方法来 reloadData() 但到目前为止没有运气。 这是我的情况: 我有一个 tabBar,我在 tableView 中显示内容。当您进入该选项卡时
希望有人能指出我的启动屏幕做错了什么。问题是屏幕以纵向模式显示,而不是横向模式...... - (void)showSplash { UIView *modelView = [[UIView a
我想在 viewController 上显示模态视图。 (它有一个导航 Controller )。 在我看来,我有文本和一个显示模态视图的按钮。 我创建了一个包含我的模态视图的 .xib(它是一个带有
异常消息: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: Application tried to p
我有一个 modalView,它由两个不同的 UIViewController A 和 B 呈现。我想做的是检测 modalView 是来自 A 还是 B,并执行一些不同的操作。 我想我可以使用委托(
我在 iOS7 中遇到应用程序崩溃问题,但在 iOS6 上却可以正常工作。在从我的 AppDelegate 调试下一个代码时,我检查了在 iOS7 中是否执行了下一个函数,然后加载了模态视图 Cont
我正在使用 tabBarController 和 navigationController我在 TabBarController 的其中一个 viewController 上显示一个 Half Mod
我有一个问题,我做了这个: Impostazioni *impostazioni=[[Impostazioni alloc] initWithNibName:@"Impostazioni" bundl
我如何将呈现模态视图 (MV) 的 UIViewController (VC) 推送到具有单个从左到右过渡动画的屏幕? 我试过: 设置 MV 的模态过渡样式,然后将两个 Controller 添加到导
我很难弄清楚如何使用 ModalView 小部件内按钮的 on_press 属性正确更改屏幕。 按下 ModalView 中的按钮时,我希望屏幕更改为 Game1HomeScreen 类和其他 Gam
我如何在 tableView4 的 tableViewController 中关闭 tableView4 和 tableView3? 最佳答案 UINavigationController *m
我有点不知所措...... 我有一个基于标签栏的应用程序,开始时带有登录屏幕。在标签栏 Controller 出现之前,登录屏幕应该作为模态视图 Controller 完成。 问题是我只能在 TabB
我有一个带有 tabbarcontroller 和 navigationcontroller 的 iOS TabBar 应用程序。在我的详细 View 中,从我的第一个选项卡 tableviewcon
我正在尝试从一个 viewcontrol 发送标签数据以显示在另一个 View 控件中。 代码从按钮发送信息,我需要了解的是如何发送标签信息。 打开模式: -(IBAction) showModal:
这个问题在这里已经有了答案: 关闭 11 年前。
我使用以下内容创建了一个基于窗口的应用程序 TableViewController(没有 XIB 文件) 一个 ViewController(带有 XIB 文件)<-- 用作模态视图 用于存储一些数据
在我的应用程序中,我呈现多个 View ,一个在另一个之上。 所以当我想从所有 View 中出来时,我必须多次按取消。 例如,HOME->OneViwe(modalView)->SubView(mod
我是一名优秀的程序员,十分优秀!