Top "Swift4" questions

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

Picker Error Message on Exit (encountered while discovering extensions: Error Domain=PlugInKit Code=13) With Swift 4 - Xcode 9

Similar to PhotoPicker discovery error: Error Domain=PlugInKit Code=13 and also to https://forums.developer.apple.com/thread/82105 BUT I …

uiimagepickercontroller swift4
Swift 4: 'substring(to:)' is deprecated

I'm having trouble converting my Swift 3 code to Swift 4. I've managed to translate everything else in the app successfully, but …

ios swift swift4
In Swift, can you split a string by another string, not just a character?

In Swift, it's easy to split a string on a character and return the result in an array. What I'm …

swift split swift4
How to Select Range - FSCalendar in Swift?

I am trying to use FSCalendar in one of my project to selecting range of dates. What I found is …

ios swift swift4 fscalendar
sizeForItemAtIndexPath is not found in different swift versions

I am using UICollectionView but following method not found: func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -&…

swift swift3 uicollectionview swift4 uicollectionviewlayout
How to use UnsafeMutablePointer in swift 4

Objective-c has a concept of a pointer to a pointer. If you dereference the first pointer you can access the …

swift swift4 unsafemutablepointer
What is the best way to test if a CharacterSet contains a Character in Swift 4?

I'm looking for a way, in Swift 4, to test if a Character is a member of an arbitrary CharacterSet. I …

swift swift4
Convert to Current Swift Syntax Failed - "No such module" (Swift 4, Xcode 9)

In Xcode 9, I am trying to do the automatic conversion to Swift 4. It fails with the following message: Convert to …

ios swift xcode swift4 xcode9
In Swift 4, how do I remove a block-based KVO observer?

If I store an observer like this: let observer: NSKeyValueObservation = foo.observe(\.value, options: [.new]) { (foo, change) in print(change.…

swift key-value-observing swift4
UIAppearance Swift 4

After updating to Swift 4, I am getting a compiler error: Static member 'appearance' cannot be used on protocol metatype 'UIAppearance.…

ios swift uiappearance xcode9-beta swift4