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) enter image description here

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

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -