如何实现和iPhone主屏一样的效果
我想添加一些自定义按钮并实现像iPhone主屏幕一样的效果。我能想到的是计算每个按钮的位置并将它们添加到视图中。还有其他方法可以做到这一点吗?例如,向桌面视图添加按钮
I want to add some custom buttons and realize the same effect like the iPhone's home screen. What I can think of is to calculate the position of each button and add them to the view. Are there any other ways to do this? e.g. add buttons to the tableview
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从 Three20 检查
TTLauncherView
,Check
TTLauncherView
from Three20,我在普通表格视图中使用自定义单元格(内部有 4 个 UIButton)实现了照片应用程序中缩略图的相同视图(原则上仅因为背景颜色和按钮的圆形效果而有所不同)。
就我而言,这是因为我需要上下滚动,在您的具体情况下,应该有一种方法可以“锁定”表格滚动。顺便说一句,出于这个原因,在界面构建器中设计自定义视图可能会更简单,设计这样的视图非常快,然后创建自定义控制器以提供简单的方法来将图标和操作分配给 UIButtons动态地。
您还可以查看已经建议的 Three20 库,它已经实现了,但是如果您这样做,您的应用程序很容易被 Apple 拒绝。
I realized the same view of the thumbnails in the photo app (which in principle differs only because of the background color and the rounded effect of the buttons) using a custom cell (with 4 UIButtons inside) in a normal tableview.
In my case, this is because I need to scroll up and down, in your specific case there should be a way to "lock" the table from scrolling. By the way, for this reason, it could be simpler to design the custom view in the interface builder, it is very quick to design such a view, and then create a custom controller to provide simple methods to assign icons and actions to the UIButtons dynamically.
You could also look at the Three20 libraries as already suggested, it is already implemented, but you app will easily be rejected by Apple if you do so.