Swift-Useful-Extensions

程序名称:Swift-Useful-Extensions

授权协议: MIT

操作系统: iOS

开发语言: Swift

Swift-Useful-Extensions 介绍

Swift-Useful-Extensions 是使用 Swift 重写许多的有用的 Objective-C 类集合。

Int

扩展

isEven:Bool 
isOdd:Bool 
isPositive:Bool 
isNegative:Bool 
toDouble:Double
toFloat:Float
digits:Int

[](https://github.com/yingogobot/Swift-Useful-Extensions#double-

extension)Double 扩展

roundToDecimalDigits(decimals:Int) -> Double

[](https://github.com/yingogobot/Swift-Useful-Extensions#string-

extension)String 扩展

length:Int
containsString(s:String) -> Bool
containsString(s:String, compareOption: NSStringCompareOptions) -> Bool
reverse() -> String

UIView

width:CGFloat
height:CGFloat
size:CGSize

origin:CGPoint
x:CGFloat
y:CGFloat
centerX:CGFloat
centerY:CGFloat

left:CGFloat
right:CGFloat
top:CGFloat
bottom:CGFloat

setX(x:CGFloat)
setY(y:CGFloat) 
setCenterX(x:CGFloat)
setCenterY(y:CGFloat)
roundCorner(radius:Float)

NSDate

daysInBetweenDate(date: NSDate) -> Double
hoursInBetweenDate(date: NSDate) -> Double
minutesInBetweenDate(date: NSDate) -> Double
secondsInBetweenDate(date: NSDate) -> Double

[](https://github.com/yingogobot/Swift-Useful-

Extensions#uiimageview)UIImageView

roundImage()

UIImage

croppedImage(bound : CGRect) -> UIImage

Swift-Useful-Extensions 官网

https://github.com/yingogobot/Swift-Useful-Extensions

相关编程语言

Acapela TTS 是一个为 iPhone 和 iPad 开发的 TTS 引...
二维码(QR Code)扫描静态库,扫描效率较高。
RegexKitLite 是一个轻量级的 Objective-C 的正则表...
一款基于ASIHttpReques开源的仿迅雷多线程断点续传功...
实现动态检测网络(wifi)状况,不需要用户手动刷新...
使用iphoneSDK官方NSXMLParserDelegate做的简单xml解...