开发者

How can I create a slider/selector in my iPhone app like the Mac OS X dashboard widget slider/selector?

开发者 https://www.devze.com 2023-01-06 20:28 出处:网络
Basically, in my iPhone app, I want to have something almost exactly like the widget slider/selector of the Mac OS X dashboard on the bottom of a view window. Users can slide the row of icons and drag

Basically, in my iPhone app, I want to have something almost exactly like the widget slider/selector of the Mac OS X dashboard on the bottom of a view window. Users can slide the row of icons and drag and drop one onto the view. And just like dashboard, the icon animates into something else as the icon is dragged away from the slider/selector. I know that Apple used something similar to this to integrate multitasking into iPhone OS 4, but I don't know if this kind of slider/selector exists as an API.

I am just beginning iPhone application development and am just looking for a little direction to accomplish this, not necessarily the actual cod开发者_如何学Goe. Thanks!


This control does not exist as an API. You will have to make your own.

You might want to look into UIScrollView for the paginated row of icons. As for the drag and drop behavior, you can track a user's touch events. This will probably involve subclassing UIControl. So, in the end you'd probably set up a paginating UIScrollView with a UIControl inside.

For looking into UIScrollView, there's a session from the most recent WWDC (2010) on the topic. Of course, a little Googling will get you plenty of information on most of these topics. Good luck!

0

精彩评论

暂无评论...
验证码 换一张
取 消