MDCFloatingButton is a subclass of MDCButton that implements the Material Design floating action button style and behavior. Floating action buttons should be provided with a templated image for their normal state.
// Note: you'll need to provide your own image - the following is just an example. let plusImage = UIImage(named: "plus").withRenderingMode(.alwaysTemplate) let button = MDCFloatingButton() button.setImage(plusImage, forState: .normal) MDCFloatingActionButtonThemer.applyScheme(buttonScheme, to: button)
// Note: you'll need to provide your own image - the following is just an example. UIImage *plusImage = [[UIImage imageNamed:@"plus"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; MDCFloatingButton *button = [[MDCFloatingButton alloc] init]; [button setImage:plusImage forState:UIControlStateNormal]; [MDCFloatingActionButtonThemer applyScheme:buttonScheme toButton:button];