Top "Swift4" questions

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

Code migration from Swift 2.x to Swift 4

We have big enough project which is built up with Swift 2.x and now Apple has just released Swift 4 so …

swift swift2 xcode8 xcode9-beta swift4
Simultaneous accesses to 0x1c0a7f0f8, but modification requires exclusive access error on Xcode 9 beta 4

my project uses both Objective-C and Swift code. When a user logs in, it calls a set of apis for …

swift crash swift4 ios11 xcode9-beta
iOS 11 Layout guidance about safe Area for iPhone x

My application already in app store, yesterday i have updated my Xcode version to 9 and works fine except iPhone x. …

ios autolayout swift4 xcode9 iphone-x
Programming a UIButton is not working in Swift 4 Xcode 9 Beta 6, Cannot add target

In the past I had no problem creating a UIButton programmatically, but ever since I've been using Xcode 9 and Swift 4, …

uibutton selector swift4 xcode9-beta addtarget
How to use swift 4 Codable in Core Data?

Codable seems a very exciting feature. But I wonder how we can use it in Core Data? In particular, is …

swift core-data swift4 xcode9 codable
hide status bar swift 4

I am trying to hide status bar in one of my UIViewControllers (Swift 4). Firstly, I set View controller-based status bar …

ios swift4
Round Corners UIView in Swift 4

In swift 3 I could do something like this to make my UIView corners round: import UIKit @IBDesignable class DesignableView: UIView { } …

ios swift uiview swift4 ibdesignable
Swift 4 'substring(from:)' is deprecated: Please use String slicing subscript with a 'partial range from' operator

i've just converted my little app but i've found this error: 'substring(from:)' is deprecated: Please use String slicing …

swift substring deprecated swift4
Swift 4 JSON Decodable simplest way to decode type change

With Swift 4's Codable protocol there's a great level of under the hood date and data conversion strategies. Given the …

json swift swift4 codable
iOS view visibility gone

I am new to iOS development.I want to toggle (hide/visible) a subview from parent view.In android there …

ios swift swift3 view swift4