venmo / Static

Simple static table views for iOS in Swift.
http://blog.soff.es/static
MIT License
1.25k stars 87 forks source link

Add a segmented control accessory type #141

Closed yeahphil closed 5 years ago

yeahphil commented 5 years ago

Here's a segmented control accessory, done in the same style as the switch accessory.

I used Static for a table that had a segmented control, and ended up going back and adding it to the library for my convenience. No problem if the idea behind this library is to stay small and not have lots of built-in accessories, but please feel free to include it!

Note that this will probably have the same behavior described in #135

yeahphil commented 5 years ago

Hi @dmiluski, thanks for taking a look! I'm set either way but thought it might be nice to contribute this back to the project. Whether it should be merged might depend on whether you'd like a bigger set of built-in controls, or would prefer Static users add any accessories beyond the basics using the .view case.

If you think the latter makes more sense, I'd be happy to add a quick guide to making accessories to the docs when I have a few free minutes.