All Projects → JT501 → Cfnotify

JT501 / Cfnotify

Licence: mit
A customizable framework to create draggable views

Programming Languages

swift
15916 projects
swift4
162 projects

Projects that are alternatives of or similar to Cfnotify

Sclalertview
Beautiful animated Alert View. Written in Objective-C
Stars: ✭ 3,426 (+599.18%)
Mutual labels:  carthage, alert, alertview
Statusalert
Display Apple system-like self-hiding status alerts. It is well suited for notifying user without interrupting user flow in iOS-like way.
Stars: ✭ 809 (+65.1%)
Mutual labels:  carthage, uikit, alert
Cdalertview
Highly customizable alertview and alert/notification/success/error/alarm popup written in Swift
Stars: ✭ 1,056 (+115.51%)
Mutual labels:  carthage, alert, alertview
Spalert
Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets.
Stars: ✭ 1,014 (+106.94%)
Mutual labels:  uikit, ui-components, alert
Alertift
Swifty, modern UIAlertController wrapper.
Stars: ✭ 242 (-50.61%)
Mutual labels:  carthage, uikit, alert
monalisa-ui
MonalisaUI ✨ React Native UI Library
Stars: ✭ 37 (-92.45%)
Mutual labels:  uikit, ui-components
sodium-ui
Sodium is a simple, modular and customizable web component library to build elegant and accessible UI pieces for your React Application.
Stars: ✭ 23 (-95.31%)
Mutual labels:  uikit, ui-components
Ezswiftextensions
😏 How Swift standard types and classes were supposed to work.
Stars: ✭ 2,911 (+494.08%)
Mutual labels:  carthage, uikit
Chakra Ui
⚡️ Simple, Modular & Accessible UI Components for your React Applications
Stars: ✭ 22,745 (+4541.84%)
Mutual labels:  uikit, ui-components
Material Bread
Cross Platform React Native Material Design Components
Stars: ✭ 287 (-41.43%)
Mutual labels:  uikit, ui-components
Uix Kit
A free UI toolkit based on some common libraries for building beautiful responsive website, compatible with Bootstrap v4.
Stars: ✭ 318 (-35.1%)
Mutual labels:  uikit, ui-components
BalloonPopup
Forget Android Toast! BalloonPopup displays a round or squared popup and attaches it to a View, like a callout. Uses the Builder pattern for maximum ease. The popup can automatically hide and can persist when the value is updated.
Stars: ✭ 32 (-93.47%)
Mutual labels:  alert, alertview
unity-ui-manager
🎫 A Simple UI Manager for rapid prototyping and ease of collaboration
Stars: ✭ 44 (-91.02%)
Mutual labels:  uikit, ui-components
laravel-starter-kit
A minimal starter kit for Laravel 8 using Bootstrap 5 and Webpixels CSS.
Stars: ✭ 23 (-95.31%)
Mutual labels:  uikit, ui-components
JDToaster
🍞 Toasty iOS alerts
Stars: ✭ 25 (-94.9%)
Mutual labels:  alert, uikit
taiga-ui
Angular UI Kit and components library for awesome people
Stars: ✭ 2,251 (+359.39%)
Mutual labels:  uikit, ui-components
Popupdialog
A simple, customizable popup dialog for iOS written in Swift. Replaces UIAlertController alert style.
Stars: ✭ 3,709 (+656.94%)
Mutual labels:  alert, alertview
Overwatch Ui
A UI library of Overwatch, built with Vue.js
Stars: ✭ 365 (-25.51%)
Mutual labels:  uikit, ui-components
Stepslider
StepSlider its custom implementation of slider such as UISlider for preset integer values.
Stars: ✭ 391 (-20.2%)
Mutual labels:  carthage, uikit
Hokusai
A Swift library to provide a bouncy action sheet
Stars: ✭ 431 (-12.04%)
Mutual labels:  carthage, uikit

CFNotify

Travis branch GitHub issues Swift GitHub forks GitHub stars GitHub license Carthage compatible CocoaPods

CFNotify is written in Swift. Using UIKit Dynamics as animator. It can make ANY UIView object draggable and throwable. This library mainly use for in-app notification and alerts. Let's notice and alert your users in more playable and fun way !

Demo1 Demo2 Demo3

Features

  • [x] Work with ANY UIView object !
  • [x] Using UIKit Dynamics. Light and Smooth !
  • [x] Highly Customizable
  • [x] Included three ready to use views: CyberView, ClassicView, ToastView
  • [x] Simple to implement

Requirements

  • Swift 4.0+
  • Xcode 9
  • iOS 9.0+

Change Log

Please read CHANGELOG.md.

Installation

  • Carthage (Recommended)

    Add the following lines into Cartfile

    #CFNotify
    github "JT501/CFNotify"
    

    Run carthage update and then add CFNotify.framework and CFResources.bundle into your project

  • Cocoapods

    Add the following lines into Podfile

    pod "CFNotify"
    

Getting Started

There is an example project inside the source code. You are suggested to have a look first and get familiar with this framework.

The Basics

This is the basic function with all default settings, design your own UIView or use CFNotifyView to create one easily.

CFNotify.present(view: UIView)

If you need more custom settings, create your own Config and use the following function.

CFNotify.present(config: Config, view: UIView)

if you want custom tap action, use the following function. (If you use tapHandler, it will override the default tap to hide action)

CFNotify.present(config: Config, view: UIView, tapHandler: (()->Void)?)

CFNotify will put all the views to be shown in queue (First In First Out). You can hide the view programmatically using the following functions.

CFNotify.hide() // hide the current view

CFNotify.hideAll() // hide all the views in queue (Clear the queue)

CFNotifyView

You can create an alert view quickly and easily by using CFNotifyView class.

CFNotifyView included 3 views currently: Cyber, Classic, Toast.

Each style has 4 themes: Info, Success, Fail, Warning

Each theme has 2 styles: Light and Dark

  • Cyber

    CyberView
    // Use Pre-set theme
    let cyberView = CFNotifyView.cyberWith(title: "Title",
                                            body: "Body",
                                           theme: .info(.light))
    
    //More customizations
    let customCyberView = CFNotifyView.cyberWith(titleFont: UIFont,
                                                titleColor: UIColor,
                                                  bodyFont: UIFont,
                                                 bodyColor: UIColor,
                                           backgroundColor: UIColor,
                                                 blurStyle: UIBlurEffectStyle)
    
  • Classic

    ClassicView
    // Use Pre-set theme
    let classicView = CFNotifyView.classicWith(title: "Title",
                                                body: "Body",
                                               theme: .success(.light))
    
    //More customizations
    let customClassicView = CFNotifyView.classicWith(titleFont: UIFont,
                                                    titleColor: UIColor,
                                                      bodyFont: UIFont,
                                                     bodyColor: UIColor,
                                               backgroundColor: UIColor)
    
  • Toast

    ToastView
    // Use Pre-set theme
    let toastView = CFNotifyView.toastWith(text: "Text",
                                          theme: .fail(.dark))
    
    //More customizations
    let customToastView = CFNotifyView.toastWith(text: String,
                                             textFont: UIFont,
                                            textColor: UIColor,
                                      backgroundColor: UIColor)                                    
    

Config

You can config CFNotify using Config class. Config class included lots of properties, the following three are the most common:

  • initPosition : where the view is born
  • appearPosition : where the view appear position
  • hideTime : the view will automatically hide after hideTime (default is 3 sec)

Example:

var classicViewConfig = CFNotify.Config()
classicViewConfig.initPosition = .top(.random) //the view is born at the top randomly out of the boundary of screen
classicViewConfig.appearPosition = .top //the view will appear at the top of screen
classicViewConfig.hideTime = .never //the view will never automatically hide

Delegate

CFNotify provides Delegate methods for some of common events. You need to conform to the CFNotifyDelegate.

func cfNotifyDidAppear() {}

func cfNotifyStartDragging(atPoint: CGPoint) {}

func cfNotifyIsDragging(atPoint: CGPoint) {}

func cfNotifyEndDragging(atPoint: CGPoint) {}

func cfNotifyDidDisappear() {}

func cfNotifyIsTapped() {}

To-Do List

  • [ ] Add SPM support
  • [ ] Improve the example app
  • [ ] Add alert view with buttons
  • [ ] Full documentation

Bugs and issues

If you find any bugs or encounter some issues regard to this framework, please feel free to open a new issue in Issues page.

Contribute

You are welcome to contribute into this project, feel free to Pull Request.

License

CFNotify is released under an MIT License. See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].