objective c - Resize content of CPScrollView -


i have cpwindow. in it, have cpscrollview set 284px of width , 434px of height.

this code show how fill out cpscrollview:

for(var = 0; < 50; i++)     {         var supplie = [cparray arraywitharray:[[supplies objectatindex:0] componentsseparatedbystring:@"/"]];          var suppliebutton = [[cpbutton alloc] initwithframe:cgrectmake(0, (i * 30), 160, 25)];         [suppliebutton settitle:[supplie objectatindex:0]];          [[_scrollviewsupplies documentview] addsubview:suppliebutton];          [_listbsup addobject:suppliebutton];     } 

so problem 50 buttons added, can see 22 of them because cpscrollview don't resize itself..

i searched , found cpscrollview class need subclass (i'm not sure if it's better way) don't know how this..

please me ! :)

thank reading !

edit: sorry, said hello @ top of post string "hello !" disappears when save post..

try [[_scrollviewsupplies documentview] setframesize:cgsizemake(284, 30 * 50 + 25)].


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -