清单1显示了测试View模式所用方法的代码片段。
Listing 1 shows a code snippet of the method to test the View mode.
清单 1 中显示了 onLoad 方法的代码片段,它指定该方法初始化和加载 iWidget 操作所需的所有依赖项。
The code snippet shown in Listing 1 for the onLoad method specifies that this method initializes and loads all dependencies that are required for the operation of the iWidget.
下面两个代码片段展示了测试这些条件的帮助器方法。
The following two code snippets show helper methods to test for such conditions.
应用推荐