启动画面问题
我正在构建一个应用程序。对于启动屏幕,我刚刚将 default.png 放入资源文件夹中,并将睡眠时间设置到 AppDelegate.m 中。到目前为止,它工作正常,我的应用程序在给定的秒数内通过启动屏幕启动。现在我想改变翻转闪屏的ViewTransition。我怎样才能做到这一点?
谢谢
I am building an application. For splash screen I've just taken the default.png into resources folder and set the sleep time into AppDelegate.m. Till here it is working fine , My Application is getting launch with the splash screen for given seconds. Now I want to change the ViewTransition of Flipping the splash screen. How can I do that ?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
只需使用 uiimageview 添加视图并将其图像设置为 default.png 即可。在开始时加载此视图。当您启动屏幕卸载后,这应该是您查看的内容,然后翻转它。
Just add a view with uiimageview and set its image to default.png. load this view in the beginning. After you splash screen unloads this shuld be the you view and then flip it.
您无法使用 default.png 进行翻转过渡,请尝试在窗口中添加包含该图像的视图并将过渡应用于该视图。
You can't do the flip transition with default.png , try to add a view with that image in window and apply transition to that view.
您不能使用 deafult.png 图像为启动屏幕提供 Transition 样式。使用启动图像创建另一个 UIViewController,只需使用所需的 Transition 样式和时间关闭此视图控制器即可。
You can't give Transition style to splash screen using deafult.png image.Create another UIViewController with splash image, just dismiss this view controller with required Transition style and time.
启动画面加载后。只需将其替换为新的 UIImageView 并设置翻转过渡即可。
After the splash screen loads.Just replace it with your new UIImageView and set flip transition.
上面所有的人在两件事上都是正确的:
i。您无法将过渡添加到 Default.png
二.您需要添加 UIView (或 UIImageView)才能添加过渡。
以下是一些示例代码供您使用:
AppDelegate.h
AppDelegate.m
}
注释
请注意我如何使用上面的 setAnimationTransition:UIViewAnimationTransitionNone 。
另外,一旦完成,您可以使用委托进行自定义(基本上从超级视图中删除splashView)。
all the folks above are correct about two things:
i. You can't add transition to the Default.png
ii. You need to add UIView (or UIImageView) in order to add transition.
Here's some sample code for you to use:
AppDelegate.h
AppDelegate.m
}
Comments
Notice how I have used setAnimationTransition:UIViewAnimationTransitionNone above.
Also, you can use delegate to customize (remove the splashView from super view basically) once done.