A highly configurable and out-of-the-box-pretty UI library

Related tags

UI FlourishUI
Overview

FlourishUI

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

Preview of UI

We absolutely love beautiful interfaces! As an organization named Unicorn, we are obligated to be unique and majestic. That is why we have made this highly configurable, out-of-the-box-pretty, User Interface library/kit thingy. It has a minimal set of UI components now, but already packs quite a punch with the UIColor extension, animated Material-inspired buttons, and modal views.

Getting Started

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

Release Notes

Master contains the latest bleeding edge code. Currently master is supporting Swift 3.0 but there are releases for older versions of Swift.

This library was built on iOS 8.x, but does offer decent backwards compatibility. We haven't tested older devices thoroughly however, so if you find a breaking issue, please file an issue on the repo or submit a pull request!

Inspiration

This library was hand-written, but borrowed from concepts in ZFRipple, SLCAlertView and Material. We'd like to thank them for paving the way for some cool concepts and for contributing their code as MIT. Following suit, we have also made this open source and completely void of copyright or restrictions. Just use it already, and make your apps look like sexy unicorns!

Installation

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

pod "FlourishUI"

Or if you prefer to skip cocoapods, you can simply drag and drop the source files directly into your Xcode project.

Usage

Most of the code should be pretty self documenting. FlourishUI uses structs and enums heavily to make an easy-to-read and highly meta approach. Future updates will probably keep the API mostly the same, but switch to a better underlying infrastructure of getters and setters.

Button

The Button class is ready to go with Interface Builder and IBDesignable, just inherit! You can check the demo to see this configured with IB.

Modal

Modals are heavily based on configurations, and thus, are built and called in code. We plan on making them more robust in time, but for now, you'll want to simply treat them like you would an AlertView.

Modal.Overlay.blurStyle = .ExtraLight
Modal.Dialog.shadowType = .Hover
Modal.Dialog.shadowRadius = CGFloat(5)
Modal.Dialog.shadowOffset = CGSize(width: 0, height: 0)
Modal.Dialog.shadowOpacity = 0.1

Modal(title: sender.titleLabel?.text, body: body, status: .Warning).show()

Toggle Switch

Preview of UI

Flourish UI supports Toggle Switches as of 3.x and up! These are drawn entirely with core graphics and animated with UIKit, giving you vector scale and full customization.

//
// Customizing toggle switches
//
let greenColor = UIColor(hex: "#3D8C8E")

let toggle2 = ToggleSwitch()
toggle2.frame = CGRect(x: 20, y: view.frame.height - 100, width: view.frame.width - 40, height: 24)
toggle2.label.setTitle("Custom styled toggle", for: .normal)
toggle2.active = true

// Customize the label associated with the toggle switch
toggle2.label.frame.size.width = 200
toggle2.label.titleLabel?.textColor = .black

// Customize the background which the toggle button slides across
toggle2.slide.activeBackgroundColor = greenColor.adjustValue(percentage: 1.4)
toggle2.slide.activeBorderColor = greenColor.adjustValue(percentage: 1.0)
toggle2.slide.disabledBackgroundColor = UIColor(hex: "#99896F")
toggle2.slide.disabledBorderColor = UIColor(hex: "#99896F").adjustValue(percentage: 0.5)

// Customize the round toggle button
toggle2.button.activeBackgroundColor = greenColor.adjustValue(percentage: 1.3)
toggle2.button.activeBorderColor = greenColor.adjustValue(percentage: 1.1)
toggle2.button.disabledBackgroundColor = UIColor(rgba: [153, 137, 111, 0.8])
toggle2.button.disabledBorderColor = UIColor(rgba: [153, 137, 111, 0.8]).adjustValue(percentage: 0.5)

view.addSubview(toggle2)

UIColor Extension

// Create colors with hex value in string
let red = UIColor(hex: "#ff0000")

// Darken or lighten the value (lightness)
// 1 = 100% therefore > 1 is lighter and < 1 is darker
red.adjustValue(percentage: 1.5)

License

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

Comments
  • Add button programmatically?

    Add button programmatically?

    Hi, how do i create a FlourishUI button programmatically with rounded corners and the effects. I currently have the following:

            let button   = Button.buttonWithType(UIButtonType.System) as! Button
            button.frame = CGRectMake(10, 10, 355, 32)
            button.backgroundColor = UIColor(rgba: "#C2784D")
            button.tintColor = UIColor(rgba: "#ffffff")
            button.setTitle("Logout", forState: UIControlState.Normal)
            button.addTarget(self, action: "logoutBtnTouched:", forControlEvents: UIControlEvents.TouchUpInside)
    

    I appreciate any help. Thanks

    opened by wstudios 2
  • Can't get it working in my app - no errors, just no modal display either

    Can't get it working in my app - no errors, just no modal display either

    Ran the pod install and it's in my project fine, but with this block of code on a button and the import FlourishUI, nothing is happening. I do register a button click on print, but this is very basic setup...

    @IBAction func showModalButtonTapped(sender: UIButton) {
    
            print("This button actually works")
            let title = "TESTING PLEASE"
            let body = "This is the body copy."
            Modal(title: title, body: body, status: .Success).show()
    }
    

    Any ideas? There are no errors, just no modal displaying. Am I missing something?

    Thanks.

    opened by jakeatwork 1
  • Cannot show FlourishUI Modal

    Cannot show FlourishUI Modal

    Hello,

    I just encountered a problem with your control, when calling show(), there is nothing happened. After debugging, I think the problem is in this line:

    Modal.swift - show() - line 250 if let rv = UIApplication.sharedApplication().keyWindow?.subviews.first

    It should be subviews.last in order to make it work for me. I guess maybe because of my view architecture is a bit different, I have showing FlourishUI on a ViewController which is root controller inside a NavigationController.. this NavigationController is presented modally from 2 more ViewControllers.

    Loading ViewController -- present --> Language Setting -- present --> NavigationController (root is SignUp) ---- FlourishUI is having problem on this SignUpViewController.

    I am using storyboard, running on iOS 9, XCode 7.2.1

    Temporarily, I edited your code to make it work for my project, but please fix this and I will use cocoapods to update the fix.

    Thank you for the nice control!

    opened by thanhn08 1
  • Hangs when Button is clicked

    Hangs when Button is clicked

    I did nothing, downloaded and run the demo app.

    Pressed on one of the buttons once and it wount detect anymore touches. This happens everytime I run the demo app

    opened by Jayvd 1
  • Tried compiling in Xcode 6.3 beta 4 and getting Initializer error

    Tried compiling in Xcode 6.3 beta 4 and getting Initializer error

    Getting the following errors on this line of code in modal.swift -

    required override public init() ------> Initializer does not override a designated initializer from its superclass { super.init() ------> Must call a designated initializer of the superclass 'UIViewController'

    opened by lokeuei 1
Owner
Clayton (McIlrath) Unicorn
I'm a contractor and consultant available for hire through @Unicorn. I work on my own products such as @UnicornTV and love teaching and writing!
Clayton (McIlrath) Unicorn
A radio button with a pretty animation

LTHRadioButton Slightly inspired by Google's material radio button. The clip below has 3 sections: full speed, 25% and 10%, but after converting it to

Roland Leth 368 Dec 16, 2022
Full configurable spreadsheet view user interfaces for iOS applications. With this framework, you can easily create complex layouts like schedule, gantt chart or timetable as if you are using Excel.

kishikawakatsumi/SpreadsheetView has moved! It is being actively maintained at bannzai/SpreadsheetView. This fork was created when the project was mov

Kishikawa Katsumi 34 Sep 26, 2022
UIPheonix is a super easy, flexible, dynamic and highly scalable UI framework + concept for building reusable component/control-driven apps for macOS, iOS and tvOS

UIPheonix is a super easy, flexible, dynamic and highly scalable UI framework + concept for building reusable component/control-driven apps for macOS, iOS and tvOS

Mohsan Khan 29 Sep 9, 2022
Simple and highly customizable iOS tag list view, in Swift.

TagListView Simple and highly customizable iOS tag list view, in Swift. Supports Storyboard, Auto Layout, and @IBDesignable. Usage The most convenient

Ela Workshop 2.5k Jan 5, 2023
SwiftUI components and extensions that seem to be highly reusable

SwiftUI components and extensions that seem to be highly reusable

Yusuke Hosonuma 56 Dec 15, 2022
Highly customizable Action Sheet Controller with Assets Preview written in Swift

PPAssetsActionController Play with me ▶️ ?? If you want to play with me, just tap here and enjoy! ?? ?? Show me ?? Try me ?? The easiest way to try me

Pavel Pantus 72 Feb 4, 2022
📖 A simple, highly informative page view controller

TL;DR UIPageViewController done properly. ⭐️ Features Simplified data source management & enhanced delegation. Dynamically insert & remove pages. Infi

UI At Six 1.8k Dec 24, 2022
Easy to use, highly customizable gauge view

GDGauge - Customizable Gauge View Requirements Xcode 11+ Swift 5 iOS 9+ Installation Swift Package Manager .package(url: "https://github.com/saeid/GDG

Saeid 74 Dec 5, 2022
BulletinBoard is an iOS library that generates and manages contextual cards displayed at the bottom of the screen

BulletinBoard is an iOS library that generates and manages contextual cards displayed at the bottom of the screen. It is especially well

Alexis (Aubry) Akers 5.3k Jan 2, 2023
⚡️ A library of widgets and helpers to build instant-search applications on iOS.

By Algolia. InstantSearch family: InstantSearch iOS | InstantSearch Android | React InstantSearch | InstantSearch.js | Angular InstantSearch | Vue Ins

Algolia 567 Dec 20, 2022
A drop-in universal library helps you to manage the navigation bar styles and makes transition animations smooth between different navigation bar styles

A drop-in universal library helps you to manage the navigation bar styles and makes transition animations smooth between different navigation bar styles while pushing or popping a view controller for all orientations. And you don't need to write any line of code for it, it all happens automatically.

Zhouqi Mo 3.3k Dec 21, 2022
Powerful and easy-to-use vector graphics Swift library with SVG support

Macaw Powerful and easy-to-use vector graphics Swift library with SVG support We are a development agency building phenomenal apps. What is Macaw? Mac

Exyte 5.9k Jan 1, 2023
StarryStars is iOS GUI library for displaying and editing ratings

StarryStars StarryStars is iOS GUI library for displaying and editing ratings Features StarryStars' RatingView is both IBDesignable and IBInspectable

Peter Prokop 175 Nov 19, 2022
Lightweight touch visualization library in Swift. A single line of code and visualize your touches!

TouchVisualizer is a lightweight pure Swift implementation for visualising touches on the screen. Features Works with just a single line of code! Supp

Morita Naoki 851 Dec 17, 2022
Wallet is a library to manage cards and passes.

Wallet Wallet is a replica of the Apple's Wallet interface. Add, delete or present your cards and passes. Feel free to use this pod in your project an

Russ St Amant 360 Feb 4, 2022
ScrollViewPlus is a small library that provides some helpful extension and capabilities for working with NSScrollView.

ScrollViewPlus is a small library that provides some helpful extension and capabilities for working with NSScrollView.

Chime 12 Dec 26, 2022
A library to recreate the iOS Apple Music now playing transition

DeckTransition DeckTransition is an attempt to recreate the card-like transition found in the iOS 10 Apple Music and iMessage apps. Hereʼs a GIF showi

Harshil Shah 2.2k Dec 15, 2022
:octocat:💧 A slider widget with a popup bubble displaying the precise value selected. Swift UI library made by @Ramotion

FLUID SLIDER A slider widget with a popup bubble displaying the precise value selected written on Swift. We specialize in the designing and coding of

Ramotion 1.9k Dec 23, 2022
A library, which adds the ability to hide navigation bar when view controller is pushed via hidesNavigationBarWhenPushed flag

HidesNavigationBarWhenPushed A library, which adds the ability to hide navigation bar when view controller is pushed via hidesNavigationBarWhenPushed

Danil Gontovnik 55 Oct 19, 2022