ios 图片居中裁剪_使用居中图像iOS启动屏幕故事板
1 - I want to use a LaunchScreen.storyboard in my app
2 - In this launch screen I need to insert a brand image in center of the screen
Could anyone help me?
解決方案
I got it!
1 - Set launch file in tab > General
2 - Select LaunchScreen.storyboard in Project navigator, check the option "Use as Launch Screen" in file Inspector
3 - Drag and drop an ImageView inside the Views Controller Scene
4 - Select the ImageView added before, change its width and height. I put w x h 200
First, check the box and after change the size value
Click "Add 2 constraints" button
5 - With ImageView selected, change position to centralize it.
First, check the box and after change the size value
Click "Add 2 constraints" button
6 - It is almost done!!!
Now let's resolve Auto Layout Issues, click the button "Resolve Auto Layout Issues" and update frames
7 - It's time to pick out our image
With ImageView selected go to > Atributes Inspector tab and choose the image u want, remenber to remove its extension (it is the trick, because the image may note appear when building the app on real device, happened with me!!!).
8 - So, CMD+R to build and run your app. Voilá!!!!!
總結(jié)
以上是生活随笔為你收集整理的ios 图片居中裁剪_使用居中图像iOS启动屏幕故事板的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: opencv 梯度幅值_opencv3/
- 下一篇: vue 跳转页面带对象_vue从一个页面