Top "Swift2" questions

Use this tag only for questions directly related to changes in version 2.x of Apple's Swift programming language.

Get integer value from string in swift

So I can do this: var stringNumb: NSString = "1357" var someNumb: CInt = stringNumb.intValue But I can't find the way to …

swift swift2
Swift do-try-catch syntax

I give it a try to understand new error handling thing in swift 2. Here is what I did: I first …

swift swift2
Swift Modal View Controller with transparent background

I know this topic is quite popular, but I'm a little iniciate problem in a programming language, the fact is …

ios swift swift2 modalviewcontroller swift2.1
Swift's guard keyword

Swift 2 introduced the guard keyword, which could be used to ensure that various data is configured ready to go. An …

swift2 guard-statement
Simplest way to throw an error/exception with a custom message in Swift 2?

I want to do something in Swift 2 that I'm used to doing in multiple other languages: throw a runtime exception …

ios swift swift2
How to present view controller from right to left in iOS using Swift

I am using presentViewController to present new screen let dashboardWorkout = DashboardWorkoutViewController() presentViewController(dashboardWorkout, animated: true, completion: nil) This presents new …

ios swift swift2 segue
Overriding methods in Swift extensions

I tend to only put the necessities (stored properties, initializers) into my class definitions and move everything else into their …

swift swift2 swift-extensions
print without newline in swift

In swift 2.0, print() automatically adds a newline character. In swift 1.2, println() and print() used to be separate functions. So how …

swift swift3 swift2
The "++" and "--" operators have been deprecated Xcode 7.3

I am looking at Xcode 7.3 notes and I notice this issue. The ++ and -- operators have been deprecated Could some …

swift swift2 increment swift3 decrement
stringByAppendingPathComponent is unavailable

My app shares photo on Instagram, to do this it first saves it on a temporary directory: let writePath = NSTemporaryDirectory().…

ios swift swift2