Corona中文站

强大、易学的跨平台(iOS/Android)开发框架。QQ群1:74390406(满) 群2:221929599

导航

如何自定义view controller及动态切换view [复制链接]
构造、添加View并在View之间切换是IPhone开发最常见的问题。一般来说,要构造一个View需要以下几个步骤:

1.
添加新的Controller类型。具体方法是File–>New File–>Cocoa Touch Class–>UIViewController subclass。

2.
添加xib文件。具体方法是File–>New File–>User Interface–>View Xib 。

3.
在新的xib文件中制定需要使用的Controller。具体方法是用IBuilder打开对应的xib文件,选择File’s Owner,将其Class Identity –> Class 属性改成对应Controller。而后,将File’s Owner的”view” Outlet连接到View对象(按住Command,将File’s Owner)拖到View上,放开,选”view”。
...
«1»

日历

<< 2014-10 >>

Sun

Mon

Tue

Wed

Thu

Fri

Sat

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

最近发表

Copyright 2011-2015 BuildApp.Net. All Rights Reserved.