how i can put multiple buttons in scroll view with according to my requirement?
A:
Well, something like this would work:
UIButton *button1 = ... // (allocate this and initialize it)
UIButton *button2 = ... // (allocate this and initialize it)
UIScrollView *scrollView = ... // (allocate this and initialize it)
[scrollView addSubview:button1];
[scrollView addSubview:button2];
This is basically how you add 2 buttons to a UIScrollView
.
Now, if you want to do more, like put them so that only one is visible at a time or something, then position the frame of each button inside the scrollView.contentSize
bounds.
marcc
2009-10-31 07:25:40