Data dodania Pytanie
2017-03-08 17:03 swift: how to generate arm7 or arm64 from the command line »
Using the Xcode 8.3 beta incarnation of swiftc, how do you generate an Arm7 or Arm64 binary? I've tried the obvious argument -target-cpu arm64 which ...
(1) odpowiedzi
2017-03-08 14:03 ios unique identifier across installs »
We need to uniquely identify the device and it has to be same across installs (reinstall). We have been using identifier stored in keychain till now s...
(2) odpowiedzi
2017-03-08 03:03 How to make UIButton on ViewController of TabBarController return user to last selected TabBarViewController (not current one) in Swift »
I have a 5 tab TabBarController, with selectedIndex = 2 (3rd TabBarItem) being a full-screen camera embedded within a NavigationViewController with th...
(2) odpowiedzi
2017-03-07 11:03 Retrieve all child value to a label in table view cell »
I want to retrieve all the child values of "Cake" to cake Rate Label. I am trying to retrieve but i can not arrange properly code and also i am entry ...
(3) odpowiedzi
2017-03-07 08:03 Swift Leak even when unowned is used with Protocol in small code example »
Here is my code: I have the ViewWithCollectionView on my story board. It's just a simple empty view created for this example. I have set my delegate ...
(2) odpowiedzi
2017-03-07 00:03 Why may we use "internal argument labels" in type annotations of closures, when they (seemingly) can never be accessed? »
Background This is naturally legal: let closure: (Int, Int) -> () = { print($0 + $1) } closure(1, 2) // 3 Whereas, since the implementation of ...
(2) odpowiedzi
2017-03-06 21:03 Implementing a function with a default parameter defined in a protocol »
Swift protocols can provide default implementations for functions and computed properties by adding extensions to them. I've done that plenty of times...
(1) odpowiedzi
2017-03-06 18:03 Why is Xcode telling me to add .map { $0.rawValue } when I can just do ?.rawValue? »
I have this code: enum Enum: String { case A = "A" } let s: String? = Enum(rawValue: "A") Of course, it does not compile. Normally, I fix it t...
(2) odpowiedzi
2017-03-06 13:03 AVAudiosessionInterruptionNotification in Swift 3 »
This is the code I had in swift 2. How do I use the same thing in swift 3? NotificationCenter.default.addObserver(self, selector: "handleInterruptio...
(1) odpowiedzi
2017-03-06 07:03 How to pass json image data to collection view pinterest style in swift »
Am developing a app using swift 2.2 in my app am using collection view with pinterest style so that am followed a method: https://github.com/chiahsien...
(0) odpowiedzi
2017-03-06 05:03 How to use URLSession with Proxy in Swift 3 »
For an API Request I'm trying to setup an URLSession using a Proxy. For test purposes I'm using a public Proxy and an API responding the IP. func mak...
(2) odpowiedzi
2017-03-05 21:03 Custom transition in Swift 3 does not translate correctly »
I've implemented a Navigation controller to incorporate an rotating-disc type of layout (imagine each VC laid out in a circle, that rotates as a whole...
(2) odpowiedzi
2017-03-05 19:03 Swift How to resize an image inside a stackview »
I have 2 items in a stack view one is an image and the other is a label. I want the image to resize according to its frame size not the size of stack ...
(1) odpowiedzi
2017-03-05 17:03 Programmatically turn off display when hold against the ear »
I'm currently developing a VoIP app. Is there a way to programmatically control the sensors to turn off the display when I hold it against my ear? ...
(1) odpowiedzi
2017-03-05 11:03 What specifies placeholder alignment of the UITextField? »
I have an App in two languages Arabic and English, When flipping the UI using: UIView.appearance().semanticContentAttribute = .forceRightToLeft //An...
(1) odpowiedzi
2017-03-05 05:03 How to share a link post to Facebook via the native share dialog? »
I'm trying to let users share content on Facebook from my app: let composeSheet = SLComposeViewController(forServiceType: SLServiceTypeFacebook) ...
(1) odpowiedzi
2017-03-04 23:03 Swift 3 enums leak memory when the class contains an array »
I found a memory leak in Swift. It gave me nightmares because my code was full of small leaks everywhere, and then I managed to reduce it to this smal...
(0) odpowiedzi
2017-03-04 19:03 How to check for data in a child, in a child in Firebase »
The title maybe looks wrong, but its what I am trying to figure out how to do this. My data structure looks like this: I want to look if there are ...
(2) odpowiedzi
2017-03-04 18:03 How to open calendar and save an event? »
I am trying to save an event to the calendar, but I would like to open the calendar to allow the user to customize the fields. This is what I have so ...
(0) odpowiedzi
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