简体   繁体   中英

How do I handle Scroll View on iPhone with run time content?

I have an array of Buttons (UIButtons), and I have to display those button on iPad.

If the number of buttons is less than 10, then all the buttons are displayed in good condition. But if the number of buttons increases to more than 15, then only 8 buttons display.

What should I do to display all the buttons using the Scroll View?

Change the contentSize of the scrollview upon the number of the button added on the screen.

Create a counter on the addbtn and set the content size of scrollview with 40*counter

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM