amirrajan / rubymotion-applied

RubyMotion documentation provided by the community. Submit a pull request to the docs for a free one year indie subscription.
Apache License 2.0
50 stars 9 forks source link

Use Storyboard for launch screen instead of static images in iOS project template #61

Open hboon opened 7 years ago

hboon commented 7 years ago

Since Apple really doesn't like us to use images for launch screens, and it's more work to support (new) devices with different screen sizes:

WARNING! /Users/hboon/Documents/workspace/projects/text-commander/resources/Assets.xcassets:./AppIcon.appiconset/[][ipad][76x76][][][1x][][]: notice: (null) WARNING! /Users/hboon/Documents/workspace/projects/text-commander/resources/Assets.xcassets:./LaunchImage.launchimage/[iphone][2436h][3x][portrait][full-screen][11.0]: notice: This launch image only applies to iOS 6.x and prior but the minimum deployment is 7.0 or later. WARNING! /Users/hboon/Documents/workspace/projects/text-commander/resources/Assets.xcasset s:./LaunchImage.launchimage/[iphone][736h][3x][portrait][full-screen][8.0]: notice: This launch image only applies to iOS 6.x and prior but the minimum deployment is 7.0 or later. WARNING! /Users/hboon/Documents/workspace/projects/text-commander/resources/Assets.xcassets:./LaunchImage.launchimage/[iphone][667h][2x][portrait][full-screen][8.0]: notice: This launch image only applies to iOS 6.x and prior but the minimum deployment is 7.0 or later.

  1. Delete resources/LaunchImage.launchimage
  2. Drop Launch Screen.storyboard into resources/
  3. Add to Rakefile:

    app.info_plist['UILaunchStoryboardName'] = 'Launch Screen'

Launch Screen.storyboard.zip

astechishin commented 6 years ago

@hboon agree but do we need to make the ib gem a default then? I have been essentially doing this on my last few projects and having it as the default is superior but do we need to give a mechanism to edit/update?

hboon commented 6 years ago

You don't need the ib gem if you use storyboards only for launch screens. You can still double click on the storyboard to open it in Xcode for editing.