|ReleasedLast Release||Jan 2017|
Maintained by Matt Nydam.
A little iOS experiment, a Floating Action Button.
As Cocoapod https://cocoapods.org
pod 'MNFloatingActionButton', '~> 0.1'
Alternatively, add the images and .h &.m files to your project.
Just like a normal button, you instantiate with a frame and add as a subview.
MNFloatingActonButton *button = [MNFloatingActionButton alloc] initWithFrame:CGRect(0,0,50,50))]; [self.view addSubview:button];
As it is a subclass of UIControl, you can add a target to listen to touch events. The touch events that are sent are:
[button addTarget:self action:@selector(createButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
You can also use MNFloatingActionButton in Storyboards and xibs by creating a UIView object and changing it's custom class to MNFloatingActionButton.
There are currently 7 properties that you can modify to customise your button. They are:
I did this because I thought it might be fun for people to play around with. If you like, or you don't like it, then help make it better with a PR!