Swift-Useful-Extensions 是使用 Swift 重写许多的有用的 Objective-C 类集合。
扩展
isEven:Bool isOdd:Bool isPositive:Bool isNegative:Bool toDouble:Double toFloat:Float digits:Int
extension)Double 扩展
roundToDecimalDigits(decimals:Int) -> Double
extension)String 扩展
length:Int containsString(s:String) -> Bool containsString(s:String, compareOption: NSStringCompareOptions) -> Bool reverse() -> String
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)
daysInBetweenDate(date: NSDate) -> Double hoursInBetweenDate(date: NSDate) -> Double minutesInBetweenDate(date: NSDate) -> Double secondsInBetweenDate(date: NSDate) -> Double
Extensions#uiimageview)UIImageView
roundImage()
croppedImage(bound : CGRect) -> UIImage