Top "Swift3" questions

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

How to create dispatch queue in Swift 3

In Swift 2, I was able to create queue with the following code: let concurrentQueue = dispatch_queue_create("com.swift3.imageQueue", …

ios swift3 xcode8 grand-central-dispatch dispatch-after
How to program a delay in Swift 3

In earlier versions of Swift, one could create a delay with the following code: let time = dispatch_time(dispatch_time_…

ios swift xcode swift3 dispatch-after
How do I dispatch_sync, dispatch_async, dispatch_after, etc in Swift 3, Swift 4, and beyond?

I have lots of code in Swift 2.x (or even 1.x) projects that looks like this: // Move to a background …

swift grand-central-dispatch dispatch-async swift3 libdispatch
CGRectMake, CGPointMake, CGSizeMake, CGRectZero, CGPointZero is unavailable in Swift

After converting code to latest swift 3.0 I am shown this error. Also tell me solution for CGSize = CGSizeMake(0,0) static var …

uikit swift3 xcode8 ios10
add Shadow on UIView using swift 3

prior swift 3 i was adding shadow in my UIView like this : //toolbar is an UIToolbar (UIView) toolbar.layer.masksToBounds = false …

ios swift3
Swift 3 - Comparing Date objects

I'm updating my app to Swift 3.0 syntax (I know it's still in beta but I want to be prepared as …

ios xcode swift3 beta
Figure out size of UILabel based on String in Swift

I am trying to calculate the height of a UILabel based on different String lengths. func calculateContentHeight() -> CGFloat{ …

ios iphone string swift3 uilabel
How to get time (hour, minute, second) in Swift 3 using NSDate?

How can you determine the hour, minute and second from NSDate class in Swift 3? In Swift 2: let date = NSDate() let …

nsdate swift3
Xcode 9 Swift Language Version (SWIFT_VERSION)

I've recently updated xcode to version 9. Before that in Xcode 8.x whenever I use to do pod update it shows …

ios swift xcode swift3 xcode9
Correctly Parsing JSON in Swift 3

I'm trying to fetch a JSON response and store the results in a variable. I've had versions of this code …

json swift parsing swift3 xcode8