Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
corin8823 committed Aug 14, 2015
1 parent 205c46b commit 81f18fd
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 7 deletions.
69 changes: 66 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SwiftyExtensions
A set of Swift extensions
A set of Swift extensions

[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Build Status](https://travis-ci.org/corin8823/SwiftyExtensions.svg)](https://travis-ci.org/corin8823/SwiftyExtensions/)
Expand All @@ -16,6 +16,69 @@ You can use [Carthage](https://github.com/Carthage/Carthage) to install `SwiftyE
github "corin8823/SwiftyExtensions"
```

## License
## Contents
- NSMutableAttributedString
- String
- UICollectionView
- UIColor
- UIImage
- UIImageView
- UITableView
- UIView
- UIViewController

## Extensions

## NSMutableAttributedString
- ``init(string: String, image: UIImage?, point: CGPoint = CGPointZero, index: Int = 0)``
- ``init(string: String, lineHeight: CGFloat) ``

## String
- ``insert(#string: String, atIndex: Int) -> String ``
- ``trim() -> String``
- ``textHeight(width: CGFloat, font: UIFont) -> CGFloat``

## Swift
- ``delay(delay: Double, closure:() -> ())``
- ``Localized(key: String) -> String``
- ``StringFromClass(object: AnyObject) -> String``
- ``LOG(_ body: AnyObject! = "", function: String = __FUNCTION__, line: Int = __LINE__)``
- ``dispatch_async_main(closure: () -> ())``
- ``dispatch_async_global(closure: () -> ())``

## UICollectionView
- ``registerNibFromClass<T: UICollectionViewCell>(type: T.Type)``
- ``registerNibFromClass<T: UICollectionReusableView>(type: T.Type, forSupplementaryViewOfKind kind: String)``
- ``registerClassFromClass<T: UICollectionViewCell>(type: T.Type)``
- ``dequeueReusableCell<T: UICollectionViewCell>(type: T.Type,
forIndexPath indexPath: NSIndexPath) -> T ``
- ``dequeueReusableCell<T: UICollectionReusableView>(kind: String, withReuseType type: T.Type,
forIndexPath indexPath: NSIndexPath) -> T``

SwiftyExtensions is released under the MIT license. See LICENSE for details.
## UIColor
- ``init(rgba: String, alpha: CGFloat = 1.0) ``

## UIImageView
- ``template()``

## UITableView
- ``registerNibFromClass<T: UITableViewCell>(type: T.Type)``
- ``registerClassFromClass<T: UITableViewCell>(type: T.Type)``
- ``dequeueReusableCell<T: UITableViewCell>(type: T.Type,
forIndexPath indexPath: NSIndexPath) -> T``

## UIView
- ``loadNib() -> UIView``
- ``roundedCorrner(radius: CGFloat)``
- ``roundedRectangleFilter()``
- ``circleFilter()``
- ``border(width: CGFloat, color: UIColor)``
- ``removeSublayers()``
- ``hasViewClass(targetClass: AnyClass) -> Bool``

## UIViewController
- ``initialLoadStoryboard() -> UIViewController``
- ``loadStoryboard() -> UIViewController``

## License
SwiftyExtensions is released under the MIT license. See LICENSE for details.
4 changes: 0 additions & 4 deletions SwiftyExtensions.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
015B5B0A1B6DD9BF0087F4D3 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 015B5B011B6DD9BF0087F4D3 /* String+Extension.swift */; };
015B5B0B1B6DD9BF0087F4D3 /* Swift+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 015B5B021B6DD9BF0087F4D3 /* Swift+Extensions.swift */; };
015B5B0C1B6DD9BF0087F4D3 /* UIColor+Hex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 015B5B031B6DD9BF0087F4D3 /* UIColor+Hex.swift */; };
015B5B0D1B6DD9BF0087F4D3 /* UIImage+Additions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 015B5B041B6DD9BF0087F4D3 /* UIImage+Additions.swift */; };
015B5B0E1B6DD9BF0087F4D3 /* UIImageView+Addtions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 015B5B051B6DD9BF0087F4D3 /* UIImageView+Addtions.swift */; };
015B5B0F1B6DD9BF0087F4D3 /* UIView+Addtions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 015B5B061B6DD9BF0087F4D3 /* UIView+Addtions.swift */; };
015B5B141B6DDAF10087F4D3 /* UICollectionView+Register.swift in Sources */ = {isa = PBXBuildFile; fileRef = 015B5B111B6DDAF10087F4D3 /* UICollectionView+Register.swift */; };
Expand Down Expand Up @@ -43,7 +42,6 @@
015B5B011B6DD9BF0087F4D3 /* String+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+Extension.swift"; sourceTree = "<group>"; };
015B5B021B6DD9BF0087F4D3 /* Swift+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Swift+Extensions.swift"; sourceTree = "<group>"; };
015B5B031B6DD9BF0087F4D3 /* UIColor+Hex.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+Hex.swift"; sourceTree = "<group>"; };
015B5B041B6DD9BF0087F4D3 /* UIImage+Additions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImage+Additions.swift"; sourceTree = "<group>"; };
015B5B051B6DD9BF0087F4D3 /* UIImageView+Addtions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImageView+Addtions.swift"; sourceTree = "<group>"; };
015B5B061B6DD9BF0087F4D3 /* UIView+Addtions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Addtions.swift"; sourceTree = "<group>"; };
015B5B111B6DDAF10087F4D3 /* UICollectionView+Register.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UICollectionView+Register.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -98,7 +96,6 @@
015B5AE81B6DD8DB0087F4D3 /* SwiftyExtensions.h */,
015B5B111B6DDAF10087F4D3 /* UICollectionView+Register.swift */,
015B5B031B6DD9BF0087F4D3 /* UIColor+Hex.swift */,
015B5B041B6DD9BF0087F4D3 /* UIImage+Additions.swift */,
015B5B051B6DD9BF0087F4D3 /* UIImageView+Addtions.swift */,
015B5B121B6DDAF10087F4D3 /* UITableView+Register.swift */,
015B5B061B6DD9BF0087F4D3 /* UIView+Addtions.swift */,
Expand Down Expand Up @@ -244,7 +241,6 @@
015B5B0B1B6DD9BF0087F4D3 /* Swift+Extensions.swift in Sources */,
015B5B141B6DDAF10087F4D3 /* UICollectionView+Register.swift in Sources */,
015B5B0C1B6DD9BF0087F4D3 /* UIColor+Hex.swift in Sources */,
015B5B0D1B6DD9BF0087F4D3 /* UIImage+Additions.swift in Sources */,
015B5B0E1B6DD9BF0087F4D3 /* UIImageView+Addtions.swift in Sources */,
015B5B151B6DDAF10087F4D3 /* UITableView+Register.swift in Sources */,
015B5B0F1B6DD9BF0087F4D3 /* UIView+Addtions.swift in Sources */,
Expand Down

0 comments on commit 81f18fd

Please sign in to comment.