开发者

Photoshop-like range selection bar in Cocoa/iPhone

I am wondering how to make the typical "ran开发者_JS百科ge selection" bar, as seen in Photoshop and many other applications. Cocoa/Cocoa Touch only provide the very basic slide bar.

alt text http://ivzhao.com/temp/rangeCocoa.jpg


It's just Cocoa, but might be a good starting point (if just for getting an idea on how to subclass Apple's slider as NSSlider and UISlider probably have quite a lot in common I assume): http:// developer.snowmintcs.com/controls/smdoubleslider/

In case you were actually looking for an element for gradient editing, you might like this BSD licensed "gradient compositing" element with support for color stops: http://apptree.net/gcgradient.htm

Both are not for Cocoa-Touch in particular, but porting them (or adopting them for their iPhone counterparts) shouldn't be that hard, I guess.


You could go crazy and handle it all yourself. You could create a UIView, draw on it yourself, and implement touchesDidBegin and touchDidEnd.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜