Skip to content

Commit

Permalink
Word Modification
Browse files Browse the repository at this point in the history
补货->捕获
  • Loading branch information
zzBelieve authored Jan 24, 2019
1 parent 260db09 commit f62b2a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flutter-for-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ MaterialApp(

### 我该怎么监听 iOS 中的生命周期事件?

在 iOS 中,你可以重写 `ViewController` 中的方法来补货它的视图的生命周期,或者在 `AppDelegate` 中注册生命周期的回调函数。在 Flutter 中没有这两个概念,但你可以通过 hook `WidgetsBinding` 观察者来监听生命周期事件,并监听 `didChangeAppLifecycleState()` 的变化事件。
在 iOS 中,你可以重写 `ViewController` 中的方法来捕获它的视图的生命周期,或者在 `AppDelegate` 中注册生命周期的回调函数。在 Flutter 中没有这两个概念,但你可以通过 hook `WidgetsBinding` 观察者来监听生命周期事件,并监听 `didChangeAppLifecycleState()` 的变化事件。

可观察的生命周期事件有:

Expand Down

0 comments on commit f62b2a6

Please sign in to comment.