How do I create a grid of icons like the iPhone home screen?

前端 未结 6 982
悲哀的现实
悲哀的现实 2021-01-30 11:58

How should I go about creating a UI similar to the Springboard (home screen) on the iPhone? I\'d like a grid of evenly spaced buttons with images where I can respond to the butt

6条回答
  •  闹比i
    闹比i (楼主)
    2021-01-30 12:35

    As stated above using UIView and doing math to layout the views is the easiest option.

    check the sample code from developer.apple.com https://developer.apple.com/library/ios/#samplecode/PageControl/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007795

    Depending on your requirement, you might not need to use any external framework.

提交回复
热议问题