开发者

How to create a label on UIVIewController Dynamically in iphone?

I m working on one project in which I have to select the user from UITableViewController and then that user name will be added to my UIViewController on UILabel on conditional bases that is

1) first time UIVIewcontroller is clean without any label then viewDidload of UIViewController will create a label开发者_运维百科 on screen with that name selected from UITableViewController.

2)next time when user select another name from UITableViewController than in viewDidLoad there is conditon that will check is there any label exist if yes then it will create a new one on different X and Y axis I mean in next line.

what code I have to write in viewDidLoad to solve this problem please give me necessary code to implement the above logic.

Please I really need help .

Thanks in advance


You can check on google some tuto like here to make your UILabel programaticaly: iPhone Hello World Using UILabel

After you have to add some instance variable to your UIViewController to check your different conditions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜