This is a UI lib for iOS. Effects like shining.

Overview

WCLShineButton

Version License Platform Support  Language

This is a UI lib for iOS. Effects like shining.

Chinese (Simplified):

中文说明

博客介绍

CocoaPods

CocoaPods is the recommended way to add WCLShineButton to your project.

Add a pod entry for WCLShineButton to your Podfile.

pod 'WCLShineButton'

Second, install WCLShineButton into your project:

pod install

Include WCLShineButton wherever you need it with import WCLShineButton.

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate WCLShineButton into your Xcode project using Carthage, specify it in your Cartfile:

github "imwcl/WCLShineButton"

Run carthage update to build the framework and drag the built WCLShineButton.framework (in Carthage/Build/iOS folder) into your Xcode project (Linked Frameworks and Libraries in Targets).

Usage

var param1 = WCLShineParams()
param1.bigShineColor = UIColor(rgb: (153,152,38))
param1.smallShineColor = UIColor(rgb: (102,102,102))
let bt1 = WCLShineButton(frame: .init(x: 100, y: 100, width: 60, height: 60), params: param1)
bt1.fillColor = UIColor(rgb: (153,152,38))
bt1.color = UIColor(rgb: (170,170,170))
bt1.addTarget(self, action: #selector(action), for: .valueChanged)
view.addSubview(bt1)

Complex Usage

Property Description
color Default button color
fillColor Fill button color
allowRandomColor Allow shine color random
animDuration shine anim duration
bigShineColor big shine color
enableFlashing Enable effect like flash
shineCount shine count around button
shineTurnAngle turn angle of shine
shineDistanceMultiple multiple of distance to button
smallShineOffsetAngle angle offset of small shine to big shine
smallShineColor small shine color
shineSize size of shine by pixel
colorRandom shine color random
image button image (png)

Contacts

blog

CSDN

Code Reference

ShineButton

License

WCLShineButton is released under the MIT license. See LICENSE for details.

Comments
  • Crash on 32 bit devices

    Crash on 32 bit devices

    I noticed a crash when running on older devices. This crashes the app on an iPhone 5, but not 5s. Here is a screenshot to help understand where the app crashes.

    screen shot 2017-05-07 at 11 50 33 pm
    opened by ryandailey100 1
  • Button image can now be changed after initially being set

    Button image can now be changed after initially being set

    After initially setting the button image (and layoutSublayers() being called), subsequent changes to the image resulted in a blank view. This fixes that issue.

    opened by nathangaskin 1
  • Closes #14. Added ability to change the click state programmatically with animation

    Closes #14. Added ability to change the click state programmatically with animation

    #14 Added ability to change the click state programmatically with animation.

    • Added: setClicked(_ clicked: Bool, animated: Bool).
    • Added: Button to toggle clicked state of all button in ViewController demo.
    • Changed: Sending valueChanged action when clicked state is changed.
    • Updated README.
    opened by Kleemann 0
  • Closes #14. Added ability to change the click state programmatically with animation

    Closes #14. Added ability to change the click state programmatically with animation

    #14 Added ability to change the click state programmatically with animation.

    • Added: setClicked(_ clicked: Bool, animated: Bool)
    • Added: Button to toggle clicked state of all button in ViewController demo
    opened by Kleemann 0
  • Add ability to change the click state programmatically

    Add ability to change the click state programmatically

    Thanks for a nice project!

    As asked in #8 it would be nice to change the clicked state in code with the animation.

    A use case it that you want to increase the touch area but dont want to increase the button image size. So you make a gesture recogniser that sets the clicked/selected state but still show the animation.

    opened by Kleemann 0
  • WCLShineButton rejection issue

    WCLShineButton rejection issue

    1. on TableViewcell I am clicking a cell WCLShineButton but it refection showing on another cell WCLShineButton.
    2. In ios 14.2 on the tap WCLShineButton it showing some other background color on the image which is I have set for selection and default state.
    opened by neen-tech 0
  • Image is never added to WCLShineButton

    Image is never added to WCLShineButton

    I am using this code to display an image on the button

    if let image = UIImage(named: "heart-smile") {
          likebutton.image = WCLShineImage.custom(image)
    }
    

    This simply does not work but it does if you change your button to a UIButton instead of a WCLShineButton. This is a bug

    opened by Daksh14 1
  • Can't set ShineButton to RightBarButtonItem

    Can't set ShineButton to RightBarButtonItem

    I am trying to add shinebutton to navigation bar but i failed

    let favoriteButton = WCLShineButton() favoriteButton.frame = CGRect(x: 0, y: 0, width: 30, height: 30) favoriteButton.image = .star

    let customFavoriteButton = UIBarButtonItem(customView: favoriteButton) navigationItem.setRightBarButton(customFavoriteButton, animated: true)

    At this point ShineButton is not showing but when clicked it is shining like very small

    opened by bdeppy 0
  • Added Support for React Native Projects

    Added Support for React Native Projects

    Hi @imwcl

    First of all I would like to appreciate for creating such a nice, cool library

    I have created a React Native bridge plugin for using this library with React Native projects

    I have added the same in README. Can you please merge this request so that if someone is looking to use this library for React Native projects can easily do the same

    Please let me know in case any changes are required

    react-native-shine-button

    Thanks Pranav

    opened by prscX 0
Owner
W_C__L
我们都老得太快 却聪明的太迟
W_C__L
Multiple state tap-to-toggle UIButton (like old camera flash button)

Multiple State Toggle UIButton A UIButton subclass that implements tap-to-toggle button text. (Like the camera flash and timer buttons) Usage Just cre

Yonat Sharon 83 Oct 11, 2022
Floaty is simple floating action button for iOS.

Floaty is simple floating action button for iOS. (formerly KCFloatingActionButton) Why change the name? Follow the swift naming convention. KCF

Lee Sun-Hyoup 1.5k Jan 7, 2023
RadioGroup - The missing iOS radio buttons group.

RadioGroup The missing iOS radio buttons group. Usage let radioGroup = RadioGroup(titles: ["First Option Title", "Another Option Title", "Last"]) radi

Yonat Sharon 188 Dec 20, 2022
Animated Social share buttons control for iOS written in Swift

SwiftShareBubbles Animated Social share buttons control for iOS written in Swift. This library is inspired AAShareBubbles. I tried AAShareBubbles with

Takeshi Fujiki 175 Jun 11, 2022
iOS Pod for a Soft UI (Neumorphic) Button for UIKit written in Swift

iOS Pod for a Soft UI (Neumorphic) Button for UIKit written in Swift

Pallav Agarwal 21 Oct 23, 2022
iOS 7-style bouncy button.

SSBouncyButton SSBouncyButton is simple button UI component with iOS 7-style bouncy animation. Take A Look Try It! pod 'SSBouncyButton', '~> 1.0' Use

StyleShare 310 Dec 15, 2022
Flat design pressable button for iOS developers.

HTPressableButton HTPressableButton is designed for iOS developers to be able to spend time developing ideas, not building basic buttons. These stylis

Famolus 859 Dec 12, 2022
Recreating the cool parallax icons from Apple TV as iOS UIButtons (in Swift).

TVButton Recreating the cool parallax icons from Apple TV as iOS UIButtons (in Swift). The effect is triggered by long pressing or dragging. Usage Imp

Roy Marmelstein 1.2k Dec 21, 2022
Interactive and fully animated Material Design button for iOS developers.

WYMaterialButton Inspired by Google Material Design, written purely in Swift 3. WYMaterialButton implemented Material Design on iOS and add more dynam

Yu Wang 76 Oct 7, 2022
Tasteful Checkbox for iOS. (Check box)

BEMCheckBox BEMCheckBox is an open source library making it easy to create beautiful, highly customizable, animated checkboxes for iOS. Table of Conte

Boris Emorine 2.6k Dec 8, 2022
A high-performance button control with rounded corners for iOS.

TORoundedButton TORoundedButton is an open source UI control of a standard user button. Its design consists of displaying text on top of a solid recta

Tim Oliver 480 Dec 26, 2022
📷 multiple phassets picker for iOS lib. like a facebook

Written in Swift 5.0 TLPhotoPicker enables application to pick images and videos from multiple smart album in iOS, similar to the current facebook app

junhyi park 1.8k Jan 2, 2023
A simple and beautiful chart lib used in Piner and CoinsMan for iOS(https://github.com/kevinzhow/PNChart) Swift Implementation

PNChart-Swift PNChart(https://github.com/kevinzhow/PNChart) Swift Implementation Installation This isn't on CocoaPods yet, so to install, add this to

Kevin 1.4k Nov 7, 2022
A simple and beautiful chart lib used in Piner and CoinsMan for iOS

PNChart You can also find swift version at here https://github.com/kevinzhow/PNChart-Swift A simple and beautiful chart lib with animation used in Pin

Kevin 9.8k Jan 6, 2023
Swift String Validator. Simple lib for ios to validate string and UITextFields text for some criterias

Swift String validator About Library for easy and fastest string validation based on сciterias. Instalation KKStringValidator is available through Coc

Kostya 17 Dec 21, 2019
Get a photo which has effects like the system camera’s Portrait mode (on compatible devices).

Blurring background like Portrait mode in the iPhone camera If we want to have the blurring effect like the Portrait mode in the iOS Camera app. What

Kien (Bradley) Hoang 4 Sep 20, 2022
⛓ Easy to Read and Write Multi-chain Animations Lib in Objective-C and Swift.

中文介绍 This project is inspired by JHChainableAnimations! Why Choose LSAnimator & CoreAnimator? You can write complex and easy-to-maintain animations in

木子 1.6k Nov 22, 2022
DeviceGuru is a simple lib (Swift) to know the exact type of the device

DeviceGuru DeviceGuru is a simple lib (Swift) to know the exact type of the device, e.g. iPhone 6 or iPhone 6s Easy to use Light weight From version 5

Inder Kumar 442 Dec 28, 2022
Lightweight lib around NSURLSession to ease HTTP calls

AeroGear iOS HTTP Thin layer to take care of your http requests working with NSURLSession. Project Info License: Apache License, Version 2.0 Build: Co

AeroGear 44 Sep 27, 2022
BadgeLog - A light lib that helps and centralize logs in your application

BadgeLog BadgeLog is an iOS Swift library that helps you manage logs within your

Daniele 1 Feb 2, 2022