Swift is an open-source programming language developed by Apple. Use the tag only for questions about language features, or requiring code in Swift. Use the tags [ios], [osx], [watch-os], [tvos], [cocoa-touch], and [cocoa] for (language-agnostic) questions about the platforms or frameworks.

learn more… | top users | synonyms (3)

0
votes
0answers
2 views

failure in -[UICollectionView registerClass:forCellWithReuseIdentifier:] Error

i have an error on my youtube application that i like to create . after coding i have error like below 2016-10-18 05:16:42.004 youtube[1928:199206] *** Assertion failure in -[UICollectionView ...
0
votes
0answers
2 views

Setting SKVideoNode.isPaused = false immediately starts playing the video

I'm having a hard time understanding how to use SKVideoNode properly. I'm making a simple game where the player has to complete against the "computer" whose moves are rendered in form of a pre-...
0
votes
0answers
6 views

Error [_SwiftValue encodeWithCoder:]: unrecognized selector sent to instance

I know there have been a lot of questions asked like this and all the solutions I've found say that I have to make the class implement the NSCoding protocol. The difference between this question and ...
0
votes
0answers
9 views

Getting screen width with swift 3

This equation supposedly gets the width of the screen but I don't understand how it is accurate when it seems to be adding the value of view.frame.midX (if view.frame.midX is 200 (half way down a ...
-1
votes
0answers
6 views

Does IOS Have “Complete Action With” Dialog like android for opening direction apps

How to achieve "open with" dialog when opening a direction, user can select use apple map, google map, waze and others
0
votes
1answer
10 views

Swift - How to pause a playing audio by clicking the same button?

So I have a list of audio files and when a cell is pressed it plays the audio. This works fine but I am not able to pause it by clicking the same cell again. My code for the table view: override ...
0
votes
0answers
4 views

Getting originalAppVersion from iOS receipt RMStore

I have looked every tutorial i could find online, but i can't figure out how to parse locally a receipt! I would really appreciate some help in understanding the concept of receipt validation!! Can ...
0
votes
1answer
19 views

Add multiple query results to array

I am trying to run 4 queries from my parse database, each pulling just 1 object. I am trying to add each of the objects to an array that can then be used in a collection view. The queries run ...
0
votes
0answers
2 views

#error Unsupported architecture - cdefs.h - Swift BLE project was working fine in Swift 2.3 but gives error in Swift 3.0 only on real device

When the project was Swift 2.3 all worked on the Simulator and my iPhone 6S After Converting to Swift 3.0 and some improvements I receive an error ONLY when running on a real device... Running on the ...
0
votes
0answers
7 views

Cocoapods Acknowledgements - Is it possible to skip licenses of some libraries?

I have a podfile pointing to certain git repos. One of them is my organization specific private repo and i want to skip its license details to be reflected in Acknowledgements. Please help how to ...
1
vote
4answers
23 views

whats wrong with this swift code? indexing a tuple

var xypos: (Int, Int) = (x: 0, y: 0) var nextxy: (Int, Int) = (one: 1, two: 2) if x == 7 { nextxy.one = 0 } else if y == 63 { nextxy.two = 0 } I get an error saying tuple nextxy has no ...
0
votes
0answers
5 views

Saving Records to CloudKit Not Working

I have tried to simply save a CKRecord to my CloudKit database but it doesn't work. I have this line of code: db.saveRecord(itemRecord) { (record:CKRecord?,error:NSError?) -> Void in ... The ...
0
votes
1answer
12 views

invalid redeclaration of 'viewController'

This error appeared recently, and I don't know why because I have been coding in this file for a week without seeing it. It happened after I deleted some breakpoints to try to get the code to run, I ...
0
votes
0answers
5 views

Firing an embeded AVPlayerViewController programatically from a TableView

I am having trouble firing an embedded AVPlayerViewController. More specifically, what I want to do is use a selection from a TableView to launch a video. During the video play, I want the table ...
0
votes
3answers
23 views

Iterating and Manipulating Strings in Swift 3

What I'm trying to do should be simple, but I can only come up with verbose solutions thanks to Swifts handling of string indices and characters. Basically I have a large list of instructions, stored ...

15 30 50 per page