开发者

iphone populating dynamic controls

开发者 https://www.devze.com 2023-01-23 09:01 出处:网络
I am working on iphone aaplication.. As I have seen in iphone app, the controls used in app are statically predefined in interface builder and uiviewcontroller...

I am working on iphone aaplication.. As I have seen in iphone app, the controls used in app are statically predefined in interface builder and uiviewcontroller... But I have to deal with situations where I do not know what type of开发者_运维问答 control to create..The controls are known to me at runtime of application.... How do i populate such controls e.g. datepicker, uipicker,textfield, checkboxes, radios etc dynamically

After populating i also need to perform validation on these controls..

BTW,In android, this was very easy using linearlayout and other ui controls.. How can I achieve same in iphone?

Thanks


It may seem confusing at first especially given the focus that Apple places on using Interface Builder in their documentation but IB is just a convenience tool designed to help lower the amount of tedium involved in laying out interfaces in code. There's nothing that it can do that you can't do directly in code. Just look up the necessary classes in the documentation to find out the details regarding instantiating them (e.g. look up UIButton to find out how to create a button).

0

精彩评论

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