Seorenn's Something Special(?) Frameworks for Cocoa(AppKit) and Cocoa Touch(UIKit).
NOTE: I will separate some modules to independent project. SRChoco now refactoring. ;-)
Helper Module for External Application
TODO: Need more documentation
Regular Expression Modules (likely Python's RE module)
TODO: Need more documentation
Simple Class to generate the UUID.
TODO: Need more documentation
Implementations of 'Launch at Login'.
TODO
Some utility classes and extensions for more conveniences...
let now = Date() let date = now.dateComponents! println("\(date.year) - \(date.month) - \(date.day), \(date.hour):\(date.minute):\(date.second)") let generatedDate = NSDate.generate(year:2014, month:10, day:24, hour:12, minute:25, second:59)! if date == generatedDate { println("date is same with generatedDate") } else if date > generatedDate { println("date is later than generatedDate") } else { println("date is earlier than generatedDate") }
// Join String Array let inputArray = [ "This", "is", "test" ] let outputString = inputArray.stringByJoining(" ") // "This is test"
// Subscript String let string = "123 ABC abc-" println(str[0]) // Character("1") println(str[1]) // Character("2") println(str[-1]) // Character("-") println(str[-2]) // Character("c") // Substring let substring = string[1...3] // "23 " // Trim let trimmedString = string.trimmedString() // Check Containing if string.containString("ABC") { // ... } // Split "This is test".arrayBySpliting() // [ "This", "is", "test" ] "1,2,3".arrayBySpliting(",") // [ "1", "2", "3" ]
let view = UIView() view.x view.y view.width view.height view.origin // CGPoint or NSPoint view.size // CGSize of NSSize view.conterPoint // CGPoint or NSPoint view.moveToBelow(view: anotherView, margin: 5.0)
Something useful features for file URL.
let myDownloadedFile = URL.urlForDownloads + "filename.txt" myDownloadedFile.isExists myDownloadedFile.isFile myDownloadedFile.isDirectory _ = trash(url: myDownloadedFile)
- SRFile: https://github.com/seorenn/SRFile
- SRWindowManager: https://github.com/seorenn/SRWindowManager (Public version is developing with new interfaces)
- SRTextInputSourceManager: https://github.com/seorenn/SRTextInputSourceManager
- SRHotKeyManager: https://github.com/seorenn/SRHotKeyManager
- SRStatusItemPopupController: https://github.com/seorenn/SRStatusItemPopupController
- SRJSON: https://github.com/seorenn/SRJSON