34

GitHub - mumty13/MHSoftUI: Extension for Neumorphic Soft UI effect in Swift

 4 years ago
source link: https://github.com/mumty13/MHSoftUI
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

MHSoftUI

[![CI Status](https://img.shields.io/travis/Mumtaz Hussain/MHSoftUI.svg?style=flat)](https://travis-ci.org/Mumtaz Hussain/MHSoftUI) Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

MHSoftUI is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'MHSoftUI'

Requirements

It is prefered to choose a very light color for your controller's background and the same color to your UI components, for example: self.view.backgroundColor = UIColor(red: 241/255, green: 243/255, blue: 246/255, alpha: 1.0)

Usage

For UIView:

Simply call this method with your view object for standard SoftUI Effect:

myView.addSoftUIEffectForView()

For UIButton:

myButton.addSoftUIEffectForButton()

Cutomization

There are parameters to each method that will let you customize the effect of SoftUI:

someButton.addSoftUIEffectForButton(cornerRadius: someButton.bounds.height/2, themeColor: UIColor(red: 241/255, green: 243/255, blue: 246/255, alpha: 1.0))

Author

Mumtaz Hussain, [email protected]

License

MHSoftUI is available under the MIT license. See the LICENSE file for more info.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK