A collection of conveniences for writing Cocoa in Swift
Have you ever written indexPath < otherIndexPath
and then groaned when it didn't compile? So have we.
While we believe that writing Cocoa and Cocoa Touch usually feels great in Swift (great job Cupertinoites!), there are still holes where common types don't behave correctly under Swift idioms. Until Apple has time to sand down all the rough edges, we hope to provide a community driven collection of patches.
- Compare
NSIndexPath
with<
instead of.compare
- Create
CGAffineTransform
s withCGAffineTransform(rotate:)
instead ofCGAffineTransformMakeRotation(angle: )
CGAffineTransform
:Equatable
identityTransform
constantinit(translatex: y:)
,init(scalex:, y:)
, andinit(rotate:)
- Memberwise
translate
,rotate
,scale
,invert
, andconcat
functions
NSIndexPath
:Comparable
Sosoa is licenced under the MIT Licence. See LICENSE for details.