Skip to content

Commit

Permalink
Merge branch 'master' into update-faq-translation
Browse files Browse the repository at this point in the history
  • Loading branch information
wendux authored Feb 14, 2019
2 parents aae510f + c3698d1 commit 3e5e831
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ Flutter是一个多范式编程环境。在Flutter中使用了过去几十年中

如果您认为遇到了 bug ,请提交到我们的[issue tracker](https://github.com/flutter/flutter/issues)。我们鼓励您使用 [Stack Overflow](https://stackoverflow.com/tags/flutter)来处理“HOWTO”类型的问题。有关讨论,请加入我们的邮件列表 [[email protected]](mailto:[email protected])


### Flutter是开源的吗?

是的,Flutter是开源技术。你可以在[GitHub上](https://github.com/flutter/flutter)找到这个项目。
Expand Down
4 changes: 2 additions & 2 deletions flutter-for-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ Widget build(BuildContext context) {

Flutter 也有类似的实现,使用了 `Navigator``Routes`。一个路由是 App 中“屏幕”或“页面”的抽象,而一个 Navigator 是管理多个路由的 [widget](https://flutter.io/flutter-for-ios/technical-overview/#everythings-a-widget) 。你可以粗略地把一个路由对应到一个 `UIViewController`。Navigator 的工作原理和 iOS 中 `UINavigationController` 非常相似,当你想跳转到新页面或者从新页面返回时,它可以 `push()``pop()` 路由。

在页面之间跳转,你有一对选择
在页面之间跳转,你有几个选择

- 具体指定一个由路由名构成的 `Map`。(MaterialApp)
- 直接跳转到一个路由。(WidgetApp)
Expand Down 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 3e5e831

Please sign in to comment.