- May 27, 2025
- Mins Read
WYMaterialButton implemented Material Design on iOS and add more dynamic motions, allowing iOS buttons to be more responsive and interactive.
Integrated with Spring animations and enhanced by Facebook’s POP, WYMaterialButton is super animated and programmer-friendly. All settings can be customized in storyboard inspector.
To install via CocoaPods add this lines to your Podfile
use_frameworks!
pod “WYMaterialButton”
Note: Due to CocoaPods/CocoaPods#4420 issue there is problem with compiling project with Xcode 7.1 and CocoaPods v0.39.0. However there is a temporary workaround for this: Add next lines to the end of your Podfile
post_install do |installer|
`find Pods -regex ‘Pods/pop.*\\.h’ -print0 | xargs -0 sed -i ” ‘s/\\(<\\)pop\\/\\(.*\\)\\(>\\)/\\”\\2\\”/’`
end
git clone https://github.com/yuwang17/WYMaterialButton.git
Drag WYMaterialButton
related files into your own project, and install facebook’s POP via cocoapods
Then import the module in your file
import WYMaterialButton
If you’re Objective-C user, please include the header file
#import “WYMaterialButton-Swift.h”
Add a UIButton
in the Storyboard of your project.
Subclass the UIbutton as WYMaterialButton
in identity inspector.
Select a color as Material Color
, the first row in attribute inspector, and let WYMaterialButton do everything else for you. You can also do other setting as well for further customizations.
For most cases, Material Color
is the only property you need to set. Leave others as default.
Pulse Enable
enable defautly, which control the bounce effect.
With Touch Location Enable
enabled defautly, WYMaterialButton tracks your touch location and generate a ripple animation upon that. You can disable to always center the ripple effect on the button.
Material Effect Percent
speicifies the percentage of area of the button will have material effect when being pressed. Default to 0.8
.
You can of course access all these properties and more by using codes. For example:
myButton.materialColor = .blue
git clone https://github.com/yuwang17/WYMaterialButton.git
cd WYMaterialButton/Example
open WYMaterialButton.xcworkspace
Ctrl + R
Light and scrollable view controller for tvOS to present blocks of text Description TvOSTextViewer is a view controller to present ...
TvOSSlider is an implementation of UISlider for tvOS. Description and usage TvOSSlider palliates missing an implementation of UISlider for tvOS as part ...
TvOSScribble, based on CoreML, mitigates the lack of a physical numpad area in Siri Remote implementing a handwriting gesture recognizer. ...
PIN keyboard for tvOS Description TvOSPinKeyboard is a view controller that allows easily asking for PIN codes in tvOs Requirements ...
📺 A tvOS button which truncates long text with '... More'. The TvOSMoreButton is a simple view which aims to ...