uisegmentedcontrol - iOS segmented control with a little triangle on top -
how can draw little triangle above selected item in uisegmentedcontrol
? know open-source extends it?
(if not - pointers of how it)
design should (this in bottom of screen)
i don't believe there's native way that. can either find library allows it, can easily, recommend.
i can think of few out of box ways approach it, here @ 2 think worth mentioning off bat:
1) use uisegmentedcontrol images. make segmented controller have height includes triangle, , have image selected , normal states shows want. normal states have rectangle of transparency on top, wide entire image , tall triangle. selected image include triangle. both images should end same width , height.
2) subclass uisegmentedcontrol , custom drawing in drawrect:
. draw triangle outside (above) bounds of segmented controller, make sure set segmented controller's cliptobounds
property no, layer
's maskstobounds
property.
if you'd more help, or other suggestions, ask.
Comments
Post a Comment