A couple of Swift UIButton
with a flat appearance, released as a Cocoa Touch Framework. The framework contains two button types: FlatButton
and CircularButton
. The first is a squared button with optional rounded corners and border; you can tweak the colors to obtain a filled or outlined style. The circular button is a circle shaped button intended to be used without a title; it also can have a optional border.
For a complete example see the enclosed BMXFlatButtonTest
project.
- designable in Interface Builder
- customizable highlighted color (defaults to normal color but 2% darker)
- customizable border size and color
- customizable corner radius (only for
FlatButton
)
- Add
BMXFlatButton
framework to project inProject > General > Linked Frameworks and Libraries
. - Set Custom Class in Identity Inspector. Choose
FlatButton
for flat squared buttons orCircularButton
for circular buttons.
- Configure the button properties as required in Attribute Inspector.
- Xcode 6 beta 4 fixed the issues below
- Xcode 6 beta 3: issue below is fixed but to compile the test project you'll need to apply this fix.
- Xcode 6 beta 2: due to a Interface Builder limitation, the Custom Class Class field does not show the
FlatButton
andCircularButton
options in the selection box, you'll need to write them manually.