微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐