Use this tag only for questions directly related to changes in version 2.x of Apple's Swift programming language.
The following used to work in Swift 1.2: var recordSettings = [ AVFormatIDKey: kAudioFormatMPEG4AAC, AVEncoderAudioQualityKey : AVAudioQuality.Max.rawValue, AVEncoderBitRateKey : 320000, AVNumberOfChannelsKey: 2, AVSampleRateKey : 44100.0] Now, …
ios swift swift2 avfoundation xcode7I have an UIViewController, I want to disable or enable rotation of the screen in different scenarios Example: if flag { …
ios swift swift2Let's say there are two arrays... var array1 = ["a", "b", "c"] var array2 = ["b", "c", "a"] I'd like the result …
arrays swift swift2I am trying to register my application for local notifications this way: UIApplication.sharedApplication().registerUserNotificationSettings(UIUserNotificationSettings(forTypes: UIUserNotificationType.Alert | UIUserNotificationType.…
ios swift swift2Getting this error in Swift 2.0. Binary operator '|' cannot be applied to two UIViewAutoresizing operands Here is the code: …
ios swift cocoa-touch swift2In Swift 2.0, Apple introduced a new way to handle errors (do-try-catch). And few days ago in Beta 6 an even newer …
swift error-handling swift3 swift2I'm adding from a xib a view into my ViewController. Then I'm putting its constraints to actually fit it override …
ios iphone swift2 nslayoutconstraintI am switching over the syntax of my project toward Swift 2.2 (which xCode helps me do automatically); however, I do …
swift swift2 selector