zoukankan      html  css  js  c++  java
  • Making a Launch Storyboard for Unity Project in XCode

    Like a lot of things, the process of creating a launch screen for an iOS app has changed over time, and not necessarily for the simpler. Originally I had a launch screen image set in the Asset Catalog. Then I had an Interface Builder (.xib) file.

    Now I’m using storyboard files (don’t get excited — there’s no animation support). Among the New File choices there is now a Launch Screen option. That is actually a storyboard file you can use as the launch screen.

    1_aeHaZWu1iKbB-0-RDHCm7g

    Once you select that, you will have a new storyboard file you can select as the launch screen source in the General tab.

    1_jh8Fehlj5BaLDBbfANylkQ

    Despite Apple’s guideline that launch screens should look like a screen within your app, the default storyboard is a standard name-and-copyright presentation.

    1_caP3rJiWsol9zENOYf8h_w

    I just want my launch screen to show my logo and nothing else, so I Command-Delete the text items and constraints, and create an image set containing my logo an Asset Catalog, with the images sized to fit within the screen (these are around 300pt, so 300/600/900px). You should better rename the images as: logo@x1.png, logo@x2.png, logo@x3.png 

    8s4QX
    Click “Images.xcassets”selected, right click and choose “New Image Set”, then drag your logo files into the image slots!

    1_RlDETS9ONwBoLPrFNc5HWw

    Now I can find my logo in the Object Library and drag it into the storyboard. Or Add an Image View by clicking the button shown in the screenshot below and dragging it to the center of the view.
    8og0d

    In the right panel with Image View selected choose View->Content Mode->Aspect Fit. Also add your image by choosing **Image View->Image

    VcQf1m

    Go to Size Inspector (ruler icon, see screenshot) and choose a width and a height that looks good (this will scale to other screen sizes).

    JeKMUl

    Drag your image into the center of the screen until you see both a horizontal and vertical blue line

    Lastly, under Autoresizing change the window with the arrows, so it looks like in the screenshot above. All outer arrows should be deselected and all inner arrows selected.

    The resulting constraints should show up like this, with the image view centered in its parent view.

    1_pXoZ_qDzv3sedCD4oFXdYQ

    Ref: https://stackoverflow.com/questions/37951817/launch-screen-storyboard-with-centered-image-ios
    Ref: https://medium.com/fugugames/making-a-launch-storyboard-61a97108e318

  • 相关阅读:
    百度面试题:求绝对值最小的数
    数据库工具
    java内存:堆、栈、常量池、方法区
    windows的cmd模式下目录名称中有空格
    Tomcat启动45秒解决问题
    sitemesh
    向eclipse中导入myeclipse项目
    HTTP学习
    springCloud的使用01-----服务的注册和发现
    springboot多数据库及分布式事务配置
  • 原文地址:https://www.cnblogs.com/open-coder/p/12660417.html
Copyright © 2011-2022 走看看