-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Supports full screen for iPhone X and uses Storyboard for launch screen. #18276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cpp-empty-tests done.
cpp-tests, js-tests, lua-empty-test, lua-tests done.
I think we can remove other background images after testing iOS 6+. |
If we don't care about iOS 6, yes, we could remove them. |
Remove the old old age and old old platform images. |
|
* commit 'a5374d0411fd45ffbebe732f579fe302aa95ce04': Fix minor typos (cocos2d#18289) Supports full screen for iPhone X and uses Storyboard for launch screen. (cocos2d#18276) use error macro to replace constant value 1410L (cocos2d#18264) Fix VAO in CameraBackgroundBrush (cocos2d#18278)
How can i do it in the safearea? We must support iOS7! |
@jacket-code , I have no idea of that. Could you upload a demo or code snippet for this issue?
@wjezxujian , as I know, if you wanna you game running on iPhone X, you have to use Storyboard for making a full screen display. |
@wjezxujian , if setting deployment target to 7.0 and run your game in Xcode 9, you will get this error: So, if you wanna iOS 7 support, go back to Xcode 8, if you wanna the big cake of iPhoneX, go to use Xcode 9 and forget about iOS7. |
@dumganhar Our game has been shipped for 2 years。Recently,we need to make new content that for match iphoneX resolution。if it possible our content can be display fully in the safe area of iphoneX?Because some content that can not be displayed in the face id camera。 |
@wjezxujian , this Pull Request just make your game display in full screen (2436 x 1125) including the area being cut out. Currently, Director::getInstance()->getFrameSize() should return 2436x1125 size and Application::getInstance()->getTargetPlatform() return iphone enum. By this two factors, you could indicate it's iPhoneX. And you could hack some code to adjust game UI. |
@dumganhar is there any plan to support ios11 safe area? I think it need to rewrite the RootViewController but i have no idera how to make it right |
@dumganhar,I have no idea,can you give me some suggestion? |
@wjezxujian The engine can not deal with safe area in ios11. In my project, i render my scene to rendertexture with our design size, and put the rendertexutre in center of scene. You can have a try. |
@dumganhar according to the method provided by you,my game launch scene can be displayed in full screen ,but other scenes still have black edges,how can i do it,and i hope you can reply,thanks |
@cnbcloud I think you could refer to safe area at Apple docs set a full screen background to avoid black edges, and put you UI into safe area.
|
@drelaptop Thank you for your reply. my problem has been solved, but I have encountered a new problem. the pop-up of the edit box input on iphone x will affect the ui layout.do you have some idea |
@cnbcloud suggest to new a issue, describe it in detail, and it's better to add some screenshot. |
为什么 我的项目按照这种方式改了之后 黑屏 打不开了呢? 求大神指点迷津。。。。。。。。。。。。。 |
For developer's project, please follow the steps:
LaunchScreen.storyboard
andLaunchScreenBackground.png
toproj.ios
orios
folder.LaunchScreen.storyboard
andLaunchScreenBackground.png
to project, and add them toBuild Phases
->Copy Bundle Resource
too.Launch Screen File
toLaunchScreen
.Discussion: http://discuss.cocos2d-x.org/t/iphone-x-slow-transitions-xcode-bug-and-not-full-screen-solved/38942