Coder Social home page Coder Social logo

beeth0ven / tfbubbleitup Goto Github PK

View Code? Open in Web Editor NEW

This project forked from futuredapp/tfbubbleitup

0.0 1.0 0.0 284 KB

Custom view for writing tags, contacts and etc.

License: MIT License

Ruby 4.52% Objective-C 2.24% Shell 35.18% Swift 58.07%

tfbubbleitup's Introduction

TFBubbleItUp

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

preview

Usage

Just place UIView in your controller wherever you want and make it as TFBubbleItUpView subclass. It is configured as IBDesignable so it will show up. The content size is calculated by the view itself, no need to use height constraint. Just set in Interface builder Intrinsic size to placeholder - width check None and height choose what suit you best.

Intrinsic size

Configuration

BubbleItUp is highly configurable. There is configuration file called TFBubbleItUpViewConfiguration with class variables for configuration.

/// Background color for cell in normal state
public static var viewBackgroundColor = UIColor(red: 0.918, green: 0.933, blue: 0.949, alpha: 1.00)
/// Background color for cell in edit state
public static var editBackgroundColor = UIColor.whiteColor()

/// Font for cell in normal state
public static var viewFont = UIFont.systemFontOfSize(12.0)

/// Font for cell in edit state
public static var editFont = UIFont.systemFontOfSize(12.0)

/// Font color for cell in view state
public static var viewFontColor = UIColor(red: 0.353, green: 0.388, blue: 0.431, alpha: 1.00)

/// Font color for cell in edit state
public static var editFontColor = UIColor(red: 0.510, green: 0.553, blue: 0.596, alpha: 1.00)

/// Corner radius for cell in view state
public static var viewCornerRadius: Float = 2.0

/// Corner radius for cell in edit state
public static var editCornerRadius: Float = 2.0

/// Height for item
public static var cellHeight: Float = 25.0

/// View insets
public static var inset: UIEdgeInsets = UIEdgeInsetsMake(5, 5, 5, 5)

/// Interitem spacing
public static var interitemSpacing: CGFloat = 5.0

/// Line spacing
public static var lineSpacing: CGFloat = 5.0

/// Keyboard type
public static var keyboardType: UIKeyboardType = UIKeyboardType.EmailAddress

/// Keyboard return key
public static var returnKey: UIReturnKeyType = UIReturnKeyType.Done

/// Field auto-capitalization type
public static var autoCapitalization: UITextAutocapitalizationType = UITextAutocapitalizationType.None

/// Field auto-correction type
public static var autoCorrection: UITextAutocorrectionType = UITextAutocorrectionType.No

/// If true it creates new item when user types whitespace
public static var skipOnWhitespace: Bool = true

/// If true it creates new item when user press the keyboards return key. Otherwise resigns first responder
public static var skipOnReturnKey: Bool = false

Requirements

TFBubbleItUp uses Swift 2.0. Target deployment iOS 8.0 and higher.

Installation

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

pod "TFBubbleItUp"

Author

Ales Kocur, [email protected]

License

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

tfbubbleitup's People

Watchers

beeth0ven 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.