• Stars
    star
    654
  • Rank 66,541 (Top 2 %)
  • Language
    Swift
  • License
    MIT License
  • Created almost 8 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Send Button for iOS

CRNetworkButton Awesome

[![CI Status](http://img.shields.io/travis/Dmitry Pashinskiy/CRNetworkButton.svg?style=flat)](https://travis-ci.org/Dmitry Pashinskiy/CRNetworkButton) Version License Platform

Header image

Welcome to CRNetworkButton - Advanced Button Click Interaction

Meet a new iOS library from Cleveroad. Just in case you are sick and tired of ordinary button clicks throughout mobile apps, we can offer you something new and unique. From now on, anytime the user clicks on the button that involves addressing to the server, they will see the animation that informs them of the progress and completion. This new engaging button click interaction is made possible with CRNetworkButton library.

Demo image

If you strive to convey a clear message to your app users by means of buttons, you are more than welcome to ingrate your iOS app with CRNetworkButton library. Facilitate userโ€™s interaction with your app!

Awesome

Requirements

  • iOS 8 or higher

Installation

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

pod "CRNetworkButton"

and run pod install in terminal.

import CRNetworkButton

Setup

CLNetworkButton uses all advantage of IB and it's feature of @IBInspectable and @IBDesignable. All of the necessary customization property is declared as @IBInspectable so you can setup it right from your storyboard. Also CLNetworkButton provides default values for all property, so you can just drag and drop it in your view and get ready to user network activity button.

Usage

  • Supports storyboards;

  • Set StartText and EndText, it will shows on before animation and after, also you can set text for error state this text will be shown as a title in case of calling stopByError() by default this text is "Error".

  • Set shouldAutoreverse to back in start state automatically.

  • Set animateOnTap to true(by default is true), that allows you to start animation mechanism automatically then Touch Up Inside event react or use it manually

    @IBAction func buttonTapped(sender: CRNetworkButton) {
        sender.startAnimate()
    }
  • Set progressMode to true, and use updateProgress(progress: CGFloat) to update current progress

    func downloadProgress(progress: CGFloat) {
        networkButton.updateProgress( progress )
    }
  • To stop animation, call stopAnimate(). If proccess ends with error, call stopByError(). It will cause animation to stop with error style.

    @IBAction func buttonTapped(sender: CRNetworkButton) {
        SomeNetworkManager.performRequest(withSuccess: { (result) in
            sender.stopAnimate()
        }) { (error) in
            sender.stopByError()
        }
    }

Example

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

Support

If you have any other questions regarding the use of this library, please contact us for support at [email protected] (email subject: "CRNetworkButton. Support request.")


## License * * * The MIT License (MIT)
Copyright (c) 2016 Cleveroad Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

More Repositories

1

SlidingTutorial-Android

Android Library for making animated tutorials inside your app
Java
2,486
star
2

FanLayoutManager

Using Fan Layout Manager you can implement the horizontal list, the items of which move like fan blades
Java
2,056
star
3

AdaptiveTableLayout

Library that makes it possible to read, edit and write CSV files
Java
1,903
star
4

WaveInApp

Live Audio Equalizer with wave effect
Java
1,768
star
5

MusicBobber

Awesome Audio Widget for any Android Music App
Java
879
star
6

LoopBar

Tap Bar with infinite scrolling. Make the navigation menu right at fingerprints, in a tab bar.
Java
741
star
7

FireworkyPullToRefresh

Let's try to refresh your data with our library!
Java
640
star
8

BubbleAnimationLayout

You donโ€™t want your apps look and feel boring, do you? Add some bubbles!
Java
576
star
9

CycleMenu

Custom LayoutManager for the inner RecyclerView
Java
573
star
10

CRPageViewController

While a standard page view allows you to navigate between pages by using simple gestures, our component goes further
Objective-C
395
star
11

PlayWidget

Break the monotony and make your music player unique!
Java
367
star
12

Bitutorial

Crumbling tutorial for Android Apps
Java
357
star
13

CRParticleEffect

A CocoaPod that simplifies creation of the particle effects.
Objective-C
349
star
14

Android-Marshmallow-Boot-Animation

Java
244
star
15

DroidArt

Android library that allows perform manipulations with text and easily combine it with images.
Kotlin
209
star
16

BlurTutorial

Library for creating blur effects under Android UI elements
Kotlin
155
star
17

flutter_sliding_tutorial

User onboarding library with smooth animation of objects and background colors
Dart
128
star
18

CRRulerControl

Customizable component, created by Cleveroad iOS developers, is aimed at turning a simple ruler into a handy and smart instrument
Objective-C
112
star
19

ARFaceDetection

AR-based library for Android which is capable of detecting faces and overlaying images above the userโ€™s head
Kotlin
51
star
20

slidingtutorial-ios

iOS Library for making animated tutorials inside your app
Objective-C
49
star
21

Bootstrap

This set of libraries is designed to help developers accomplish various tasks easier and faster
Kotlin
40
star
22

CRRollingLabel

Objective-C
30
star
23

cr_calendar

Highly customizable, feature-packed calendar widget for Flutter.
Dart
28
star
24

CRCellCollectionView

With this component, pictures in your apps collection view will look like honeycomb instead of the boring standard variant
Objective-C
28
star
25

ColorDetection

ColorDetection is an app built with OpenCV and using computer vision at its core. Itโ€™s able to detect and change colors of objects using a camera of iOS devices.
Objective-C++
21
star
26

cr_logger

Dart
9
star
27

cr_file_saver

Kotlin
3
star
28

CRRefreshControl

2
star
29

CRPlotView

1
star
30

CRPinCodeControl

1
star