xaviermerino / XMSegmentedControl

A customizable segmented control with Icons, Text or Icons + Text segments. It is fully customizable and supports several inbuilt styles for displaying the selected segment. Written in Swift for iOS.
MIT License
193 stars 64 forks source link

Is it possible to reduce the widget of the active option background view? #35

Open prakashraman opened 7 years ago

prakashraman commented 7 years ago

Is it possible to reduce the widget of the active option background view?

I am basically trying to create the following.

segment-control

Is this possible using the library?

xaviermerino commented 7 years ago

Yes by handling the radius and corner options of the active background view you can make it a circle. There is no direct way of doing it via the exposed functions but adding a couple of lines to the source code will do.

Sent from my iPhone

On Jun 28, 2017, at 12:25 PM, Prakash Raman notifications@github.com wrote:

Is it possible to reduce the widget of the active option background view?

I am basically trying to create the following.

Is this possible using the library?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

prakashraman commented 7 years ago

Ah, brilliant. Yes, that sounds simple enough. Let me see how to reference the active-background-view. In case I don't find - I shall seek your help again.

Thanks!

prakashraman commented 7 years ago

@xaviermerino I guess I will have to access the property. "highlightview" right?

Also - it seems to have an access control of "fileprivate". Will I be able to access the property from my ViewController?