Data dodania Pytanie
2017-03-04 08:03 getting error while grabing JSON in swift3 »
class Get { class func JSON(url:String,callback:@escaping (NSDictionary)->()) { requestJSON(url: url,callback: callback) } class func request...
(1) odpowiedzi
2017-03-04 07:03 Instantiate View Controller Swift 3 Tab Bar Controller »
How can I segue to a tab bar controller? Theres 2 view controllers on tabs with navigation controllers and a navigation controller on the tab bar cont...
(1) odpowiedzi
2017-03-04 03:03 Facebook Graph Request is returning name but not email »
I'm using the graph api to return my name and email from a Facebook login. This is the code I use - name comes back fine, but email is nil: func getU...
(2) odpowiedzi
2017-03-03 18:03 Swift: Using switch statement in touchesBegan »
I want to clean up my touchesBegan(..) in SKScene. I wanted to make a case statement instead of my if .. else chain. However, I get errors when imple...
(3) odpowiedzi
2017-03-03 05:03 How to write swift 3 method with throws statement and return value that can be used in Objective C? »
Below Swift 3 method is translated into Objective C like: func doSomething(param: String) throws // Swift 3 - (BOOL)doSomething:(NSString * _Nonnull...
(2) odpowiedzi
2017-03-03 05:03 Custom textfield inside a cell text is blank when Ui Tableview Scrolled »
I am using a table view inside a view controller.In My table view multiple sections, and section=0 is custom text fields when scroll table view then ...
(2) odpowiedzi
2017-03-02 22:03 Why is `var objCArray = array as NSArray` legal? »
It's easy to cast between Swift arrays and NSArrays. I found a case that I don't think should compile: let doubleArray = [1.1, 2.22, 3.333, 4.4444, 5...
(4) odpowiedzi
2017-03-02 19:03 No matching provisioning profiles found (None of the valid provisioning profiles allowed the specified entitlements) »
I am getting an error when archiving: Code Sign error: No matching provisioning profiles found: None of the valid provisioning profiles allowed the s...
(2) odpowiedzi
2017-03-02 10:03 Check if two nodes are the same color when they touch each other »
I'm new to Swift so apologies if I have made a rookie error. I am trying to get two boxes to disappear when they touch if the two boxes are the same c...
(2) odpowiedzi
2017-03-02 00:03 Swift 3 - Working with UnsafePointer<CFDictionary>? »
I'm currently reading Chris Adamson's "Learning Core Audio" and try to follow along in Swift 3 (instead of Objective-C). The first code example make...
(1) odpowiedzi
2017-03-01 21:03 Objective C class cannot find definition for Swift protocol »
I have a Swift protocol, like so: @objc protocol Linkable { func presentLink(link: MyLink) } I also have an Objective-C class that isn't playin...
(0) odpowiedzi
2017-03-01 21:03 Taking Facebook values (email, name, etc) from one view controller and transferring them to another one »
So I'm currently designing an application and am working on the account registration. I've implemented Facebook login into it but I am having trouble ...
(1) odpowiedzi
2017-03-01 14:03 Sprite subclass detecting touches despite actually touching empty space »
I'm subclassing nodes to use for touch detection. I have a box parent which has a line child directly next to it, with the gray space being just empty...
(2) odpowiedzi
2017-03-01 14:03 Swift3 JSON Error - Cannot subscript value of type AnyObject »
Getting an error (Cannot subscript value of type 'AnyObject') in conversion from swift2 to swift3. The code is from monopoly game from github written ...
(1) odpowiedzi
2017-03-01 10:03 Change value after period of time in Firebase »
I have a lobby in which I want the users to be in sync. So when a user turns off his internet while the app is running, he should be removed. I know F...
(1) odpowiedzi
2017-03-01 09:03 Check character in documentContextBeforeInput in Custom keyboard »
///Here is my Function for Button press @IBAction func keyPressed(_ button: UIButton) { var buttonTap = button.titleLabel!.text...
(1) odpowiedzi
2017-02-28 22:02 <unknown>:0: error: type 'Key' constrained to non-protocol type 'String' »
Migrating to Swift 3 from 2.3 and am running into this issue. The error is traceable to a view controller. I do not see any extensions/protocols w...
(1) odpowiedzi
2017-02-28 16:02 Why does an @objc enum have a different description than a pure Swift enum? »
Consider two Swift enums: enum Foo: Int { case bar } @objc enum Baz: Int { case qux } If I were to print each case of these enums, I would...
(0) odpowiedzi
2017-02-28 14:02 Retaining parameter types when using Objective-C block in Swift »
I have just started implementing some of our new features in Swift rather than Objective-c, all ok so far but the one thing thats confusing me is how ...
(1) odpowiedzi
2017-02-28 12:02 How to discontinue old versions of apps? »
I'm making an app and am planning for the future. If for example the first version of my app didn't work with my back end in the future. Is there a wa...
(2) odpowiedzi
2017-02-28 10:02 Collection View confuses minimum line spacing and minimim interitem spacing under iOS 9 »
I just ran into a very strange issue regarding the behavior of a UICollectionView and I think both the collection view and I are pretty confused. I h...
(0) odpowiedzi
2017-02-27 23:02 Swift generate random number without arc4random »
I want to generate a random number in Swift within a function deployed to OpenWhisk on IBM Bluemix. Because it's a Linux runtime, I can't use arc4ran...
(0) odpowiedzi
2017-02-27 11:02 Trigger Local notification to the killed/Quitted App on iBeacon Detection »
I have triggered a Local Notification whenever the application comes into the region of iBeacon. I used CLLocationManager to continuously Monitor the ...
(1) odpowiedzi
2017-02-27 09:02 TestCase : SwiftHTTP library not making the HTTP call »
Important Fact I forgot to mention an important factor in the question. I am running this in a TestCase. I think this issue has something to do wi...
(1) odpowiedzi
2017-02-26 23:02 How to split json data into 2 different arrays? »
Currently we have an array which contains all the contents of the JSON Object: var castArray: [CastData] = [] CastData.updateAllData(urlExtens...
(1) odpowiedzi
2017-02-26 16:02 How to instantiate a new view controller programmatically »
I have a ViewController with two UIButtons and UIlabels. In order to make similar ViewController of this, I would like to instantiate a new view con...
(1) odpowiedzi
2017-02-26 05:02 Automatically have += defined when defining +? »
I have a type that has a custom + defined for it. I was wondering if it was possible for Swift to automatically write a definition for +=, namely a +=...
(1) odpowiedzi
2017-02-26 05:02 fetch only particular data from firebase »
I am using firebase in my swift 2 project. { 'Registration' { 'SomerandomkeyofuserID': { 'Car': { ...
(1) odpowiedzi
2017-02-25 22:02 How to check if value type is Dictionary<String, Any> »
I created a function in Swift that loop through a dynamic dictionary, however when I try to check if the value is a Dictionary type the type compariso...
(1) odpowiedzi
2017-02-25 22:02 How to save a uiimageview on top of another uiimageview (swift3) »
Right Now I have two image views. All the button does is save the photo with the red box over the blue box and it will save image2 in the blue box and...
(2) odpowiedzi
2017-02-25 15:02 The best way to call a function inside another class? (Swift) »
So, I've got a fairly simple question regarding Classes and Functions in Swift. Let's say I make an app with SpriteKit. I have a GameScene (SKScene)...
(3) odpowiedzi
2017-02-24 16:02 Xcode Localization: Keep translation in sync with Storyboard »
Here's our localization workflow: Build stuff in interface builder Export project for localization Translator looks at xliff files and applies trans...
(0) odpowiedzi
2017-02-24 12:02 Swift Protocol Limitation »
I have come across a limitation with swift protocols: protocol P { } protocol Q: P { } protocol R { var p: P { get set } } struct S: R { ...
(0) odpowiedzi
2017-02-24 10:02 Google Sign in server auth code nil iOS? »
We have Google sign in our application.We are providing serverClientID at the time of request of login. We are getting user.serverAuthCode as nil. O...
(1) odpowiedzi
2017-02-24 08:02 Where is UIView convenient initializer »
I am new to ios development. In Xcode, I can find UIView has two initializer. @available(iOS 2.0, *) open class UIView : UIResponder, NSCoding, UI...
(2) odpowiedzi