Coder Social home page Coder Social logo

shndrs / shndstuffs Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 2.0 199 KB

Make your UIView, UIImageView, UIButton, UINavigationBar and etc more AWESOME!!!

License: MIT License

Ruby 2.70% Swift 96.00% Objective-C 1.30%
custom-elements custom-uiview custom-uibutton uinavigationbar custom-uinavigationbar swift podfile cocoapods shndrs animation

shndstuffs's Introduction

SHNDStuffs

swift-version Version License Platform

Example

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

UINavigationBar Gradient

for set UINavigationBar gradient and it's tintColor use the function below in viewDidLoad():

override func viewDidLoad() {
    super.viewDidLoad()
        
    SHNDNavigationBarGradient(firstColor: .darkGray,
                              secondColor: .white,
                              tintColor: .black,
                              isHorizontal: true)
}

example 0 , example 3, example 4

SHNDNavigationCustomTitleView

For set UINavigationBarItem custom title view use the builder pattern below in viewDidLoad():

override func viewDidLoad() {
    super.viewDidLoad()
    let navTitleBuilder = NavigationTitleViewBuilder(title: "SHNDStuffs",
                                                     desc: "Custom Title View",
                                                     titleFont: UIFont(name: "Papyrus", size: 18)!,
                                                     descFont: UIFont(name: "Kailasa", size: 10)!,
                                                     titleTextColor: .purple,
                                                     descTextColor: .black)
    SHNDNavigationCustomTitleView(builder: navTitleBuilder)                                                     
}

shndnavcustomtitleview

so simple, right?! ๐Ÿ˜‹๐Ÿ˜‹

SHNDButton After Tap Animation

if you wanna get an animation(shake, pulsate or flash) after you tapped the button :

@IBAction func buttonPressed(_ sender: SHNDButton) {

    let animationElements = AnimationElements(duration: 0.1,
                                              repeatCount: 3,
                                              autoreverses: true,
                                              animationMode: .shake)
    sender.SHNDButtonAnimation(animationElements: animationElements)
}

SHNDShimmerLabel

Shimmer ,Shimmer ,Shimmer ๐Ÿ˜„, so simple and awesome as it should to be ๐Ÿ˜‰:

override func viewDidAppear(_ animated: Bool) {
    super.viewDidAppear(animated)
    
    let builderObject = ShimmerObject.init(text: "shndRS",
                                           font: UIFont(name: "Papyrus", size: 73)!,
                                           textAlignment: .center, animationDuration: 2,
                                           frame: CGRect(x: 0, y: 0, width: view.frame.width, height: 400),
                                           parentView: view,
                                           mainLabelTextColor: .orange,
                                           maskLabelTextColor: .purple)

    SHNDShimmerFactory.create(builder: builderObject)
}

And this is how it looks:

shndshimmer

SHNDView, SHNDButton, SHNDImageView, SHNDTextField

For using SHNDView, SHNDButton, SHNDImageView just put one of these classes into subclass of your objects, and that's set... you have AWESOME features in your NavigationInspector

shndviewimage

SHNDDynamicGradientView

Have you ever seen Instagram login/sign up page Dynamic Gradient View? Well let me give you some good news, i've got something for you fellas here in SHNDStuffs that you can have that animation in your app, it's quite simple:

let object = SHNDDynamicGradientViewObject.init(colorArray: colorArray,
                                                duration: 8,
                                                shndView: gradientView)

SHNDDynamicGradientView(builder: object).animate()

ps: and colorArray is an array of UIColor tuple like this:

var colorArray:[(firstColor:UIColor, secondColor:UIColor)] = []

go and append whatever colors you want into it:

colorArray.append((firstColor: .purple, secondColor: .gray))
colorArray.append((firstColor: .red, secondColor: .blue))
colorArray.append((firstColor: .orange, secondColor: .brown))

and now you have it ๐Ÿ˜‰

Requirements

iOS 9.0+

Xcode 10.0

Swift 4.0 or later

Installation

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

pod 'SHNDStuffs'

Author

[email protected], [email protected]

License

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

shndstuffs's People

Contributors

shndrs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.