Do Swift-based applications work on OS X 10.9/iOS 7 and lower?

I just tested it for you, Swift applications compile into standard binaries and can be run on OS X 10.9 and iOS 7. Simple Swift application used for testing: func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool { self.window = UIWindow(frame: UIScreen.mainScreen().bounds) var controller = UIViewController() var view = UIView(frame: CGRectMake(0, 0, 320, 568)) view.backgroundColor … Read more

@selector() in Swift?

Swift itself doesn’t use selectors — several design patterns that in Objective-C make use of selectors work differently in Swift. (For example, use optional chaining on protocol types or is/as tests instead of respondsToSelector:, and use closures wherever you can instead of performSelector: for better type/memory safety.) But there are still a number of important … Read more

#pragma mark in Swift?

You can use // MARK: There has also been discussion that liberal use of class extensions might be a better practice anyway. Since extensions can implement protocols, you can e.g. put all of your table view delegate methods in an extension and group your code at a more semantic level than #pragma mark is capable … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)