Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jogendra/JSLabel
A simple designable subclass on UILabel with extra IBDesignable and Blinking features.
https://github.com/jogendra/JSLabel
Last synced: 3 months ago
JSON representation
A simple designable subclass on UILabel with extra IBDesignable and Blinking features.
- Host: GitHub
- URL: https://github.com/jogendra/JSLabel
- Owner: jogendra
- License: mit
- Created: 2017-07-12T14:13:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-10T15:02:25.000Z (over 6 years ago)
- Last Synced: 2024-07-30T10:09:20.827Z (3 months ago)
- Language: Swift
- Homepage: http://konfire.com
- Size: 149 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - JSLabel - A simple designable subclass on UILabel with extra IBDesignable and Blinking features. (UI / Label)
- awesome-ios-star - JSLabel - A simple designable subclass on UILabel with extra IBDesignable and Blinking features. (UI / Label)
README
# JSLabel
[![Version](https://img.shields.io/cocoapods/v/JSLabel.svg?style=flat)](http://cocoapods.org/pods/JSLabel)
[![License](https://img.shields.io/cocoapods/l/JSLabel.svg?style=flat)](http://cocoapods.org/pods/JSLabel)
[![Platform](https://img.shields.io/cocoapods/p/JSLabel.svg?style=flat)](http://cocoapods.org/pods/JSLabel)
![Language](https://img.shields.io/badge/language-Swift%203-orange.svg)
[![Twitter](https://img.shields.io/badge/[email protected]?style=flat)](https://twitter.com/imjog24)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
## Demo
```bash
pod try JSLabel
```...or clone this repo and build and run/test the `JSLabel` project in Xcode to see `JSLabel` in action. If you don't have [CocoaPods](http://cocoapods.org) installed, grab it with `[sudo] gem install cocoapods`.
```bash
$ cd Example
```
```
$ pod install
```
```
$ open JSLabel.xcworkspace
```## Requirements
- iOS 8.3+
- Xcode 7+
- Swift 3## Installation
JSLabel is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "JSLabel"
```
### Manual InstallationJust drag the `JSLabel.swift` files into your project.
### IBDesignable
`JSLabel` includes `IBInspectable` annotations to enable configuring the label inside Interface Builder. However, if you see these warnings when building...
```
IB Designables: Failed to update auto layout status: Failed to load designables from path (null)
IB Designables: Failed to render instance of JSLabel: Failed to load designables from path (null)
```...then you are likely using `JSLabel` as a static library, which does not support IB annotations. Some workarounds include:
- Install `JSLabel` as a dynamic framework using CocoaPods with `use_frameworks!` in your `Podfile`, or with Carthage
- Install `JSLabel` by dragging its source files to your project## Usage
### Use Blinking feature```Swift
import JSLabellet BlinkLabel = JSLabel()
BlinkLabel.startBlinking()
BlinkLabel.stopBlinking()```
![](https://github.com/obuseme/BlinkingLabel/blob/master/blinkinglabel.gif)
### Creating a view from the storyboard- If you already have a Label where you want to use then set it's `class` to `JSLabel` in identity inspector.
- Or drag a **Label** from object library and then change it's `class` to `JSLabel` in identity inspector.
- Set the `module` property to `JSLabel`.
- Customize the view properties in the attributes inspector.
## Author
Jogendra Singh
## What's next
- Any suggestions?
## Contribution
- If you found a **bug**, open an **issue**
- If you have a **feature request**, open an **issue**
- If you want to **contribute**, submit a **pull request**
- If you have any issue or want **help**, please drop me a mail on [email protected]## License
JSLabel is available under the MIT license. See the [LICENSE](LICENSE) file for more info.