Profile Photo
The pop over controller presenting controller class. The print line in loadInitialValues() shows that the pop over picker view value is not passed to this class, it is an empty value. The presenting segue is setup in interface builder, the pop over presents normally, I can select a picker view value and confirm with the done button with the pop… (Show more)
in Xcode IDE and Editor
Profile Photo
Hi! I'm trying to connect GameScene.swift to GameViewController.swift. In GameScene I have this function:   func pause() {… (Show more)
in Swift
Profile Photo
I'm trying to write an app that will load MIDI files. I've written a Swfit script that works perfectly, but I'm having trouble with putting that into an app.       override func read(from data: Data, ofType typeName: String) throws {         let theMIDIPlayer = try AVMIDIPlayer.init(data: data, soundBankURL: nil)         throw NSError(domain:… (Show more)
in Swift
Profile Photo
Apple's documentations says "define a capture in a closure as an unowned reference when the closure and the instance it captures will always refer to each other, and will always be deallocated at the same time"   But if a closure and a class instance refer to each other and have a strong reference cycle, by definition, they will never be… (Show more)
in Swift
Profile Photo
Apple's documentation says that "Define a capture in a closure as an unowned reference when the closure and the instance it captures will always refer to each other, and will always be deallocated at the same time."  So if I understand this correctly, Apple is saying that, in order to define a capture in a closure as an unowned reference. The… (Show more)
in Swift
Profile Photo
I want to store a received call in my iOS app in a table view. How can I store the data from a received call and display it in a table view using Swift 5 and Xcode 10.3?
in Swift
Profile Photo
Hi guys,   I want to replace colors of an image using color cube. The methods below work pretty well for any color besides black and white, which means, I can't replace black and white color. Can any one help me why this the case? func render() {… (Show more)
in Swift
Profile Photo
Here's one for the "What-the-****-is-it-now?" department. I have a simple view that has some details about my iOS app that I want to display when a toolbar button is touched. The UIViewController is called "AboutViewController". I put a view controller into a storyboard and set its class to AboutViewController. Here's the toolbar button code in… (Show more)
in Swift
Profile Photo
I may have been dreaming, but I have a distinct memory of an Int property that does this:   let one = 1.property  where one would be set to the string "one". I have been googling for ages and can't find any reference to it. I've tried 1.description, but that just comes out as the string "1".
in Swift
Profile Photo
I am creating a quiz app where each question in the quiz is presented by a tableview embedded in a navigationcontroller. I have a score label set in the right bar button item of the navigation controller that I want to update each time a user chooses an answer (tableviewcells). I can't seem to get the score label to update with my code.. Any… (Show more)
in Cocoa Touch
Profile Photo
I've implemented a protocol called DescribedError that is implemented by NSError. I'm creating a URLSession data task thusly:         let session = URLSession.shared… (Show more)
in Swift
Load more items