Create a new .xib file dynamically

26 views
Skip to first unread message

ilx.mac.developers

unread,
Mar 23, 2009, 8:53:26 AM3/23/09
to iPhone SDK Development
Hi friends,


I have to create a dynamic form with a button in it
(Consider that there is a button on the page1, and the new page which
has to be created is the second page). How is it possible?

David Phillip Oster

unread,
Mar 23, 2009, 2:43:26 PM3/23/09
to iPhone SDK Development
You can start with all the buttons on your original .xib, but some of
them hidden, and call [button setHidden:NO] to reveal them.

You can dynamically create a button with button = [UIButton
buttonWithType:UIButtonTypeRoundedRect]; then assign to its frame,
title, target and action.

Generally you do NOT make a .xib at runtime. Why write a file when
your goal is to change the in-memory data structures of your program.

On Mar 23, 5:53 am, "ilx.mac.developers"
Reply all
Reply to author
Forward
0 new messages