Monday 15 February 2010

objective c - Content area setting not working in UIScrollView in NIB settings -



objective c - Content area setting not working in UIScrollView in NIB settings -

this question has reply here:

how create basic uibutton programmatically? 29 answers

i have setup the content area uiscrollview in nib file can see no more scrollable.

when add together view programmatically, must add together in code (programmatically), place add together uibutton in viewdidload methods in implementation (.m) file, here example:

- (void)viewdidload { [super viewdidload]; // other code... uibutton *newbutton = [[uibutton alloc] initwithframe:cgrectmake(50, 50, 40, 40)]; [newbutton settitle:@"probutton" forstate:uicontrolstatenormal]; // more properties can configurate. see apple doc [newbutton addtarget:self action:@selector(methodtofire:) forcontrolevents:uicontroleventtouchupinside]; // more action can configurate event... [self.view addsubview:newbutton]; // more code... }

objective-c

No comments:

Post a Comment