开发者

iOS Drag-and-Drop Alignment Guides [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 6 years ago.

Improve this question

I'm looking to develop an iOS app that includes drag and droppable interface elements, but with alignment 开发者_高级运维guides like those in Keynote or OmniGraffle or Interface Builder (the yellow lines in Keynote) such that when you drag something near enough to vertical or horizontal alignment with another object in the canvas, it displays a guide line and automatically snaps into to alignment.

So far, I haven't been able to find any published API to implement this. Does such a thing exist anywhere? It's a little bit difficult of a concept to Google successfully. If not, any pointers on rolling my own with a minimum of pain?


There is no standard API provided by iOS. You have to implement it yourself.

This isn't exactly what you want, but I threw together a little sample app that lets you drag icons around the screen that snap into place like on the iPhone home screen: Tiles. It doesn't draw any guide lines, so you'll have to figure that out yourself.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜