mirror of
https://github.com/zhigang1992/ProMotion.git
synced 2026-06-02 06:49:45 +08:00
Clarified app_delegate code
This commit is contained in:
@@ -111,7 +111,7 @@ gem "ProMotion", "~> 0.6.0"
|
||||
|
||||
Run `bundle install` in Terminal to install ProMotion.
|
||||
|
||||
Go into your app/app_delegate.rb file and add the following:
|
||||
Go into your app/app_delegate.rb file and replace everything with the following:
|
||||
|
||||
```ruby
|
||||
class AppDelegate < ProMotion::Delegate
|
||||
@@ -121,6 +121,9 @@ class AppDelegate < ProMotion::Delegate
|
||||
end
|
||||
```
|
||||
|
||||
Make sure you remove the `didFinishLoadingWithOptions` method or call `super` in it. Otherwise
|
||||
ProMotion won't get set up and `on_load` won't be called.
|
||||
|
||||
Create a folder in `/app` named `screens`. Create a file in that folder named `home_screen.rb`.
|
||||
|
||||
Now drop in this code:
|
||||
|
||||
Reference in New Issue
Block a user