show code js

2012年9月23日 星期日

simple example


1.open Xcode
2.set project config
3.choose Single View Application
4.open MainStoryboard.storyboard
(A)Add a label to frame in view controllor 1
(B)Add a button to frame in view controllor 1
5.add a view controller is 2
6.create a second page
(A)click and hold right mouse button on button in view controller 1
(B)move mouse fouce to view controller 2 and release mouse button
(C)choose modal
7.create some code
(A)open (name)AppViewController.h
(B)add code in @interface xxx : UIViewController { ....(in here)... } @end
(C)code > IBOutlet UIButton *myButton;
(D)open (name)AppViewController.m
(E)add code in viewDidload{ [super viewDidload];  ....(in here)... }
(F)code > [myButton setTitle:@"Hello" forState:UIControlStateNormal];
8.Run

沒有留言:

張貼留言