Questions tagged as 'swift2'

1
answer

Deselect cell in UitableView

I want to cancel which cell was selected. When clicking on the selected cell, it sends the idCategoria to the next view, but when you return it, the cell is still selected and when you want to click on another category it shows those of the prev...
asked by 10.08.2016 / 05:37
1
answer

Error form in html5 in a webview from swift

This is done by an app that displays a html form within a webview . In the form I have the following fields: Title Description Image (input file) If I do not add an image, everything is fine, but if I select an image thro...
asked by 29.08.2016 / 14:33
1
answer

SKPaymentQueue.defaultQueue (). addPayment (pay as SKPayment) gives EXC_BAD_ACCESS error

I'm doing a game with SpriteKit and I work with SKScene for different scenes within the game. I made a class to make purchases in-App works well with a button, but gives errors with others, I explain: On the cover ther...
asked by 06.07.2016 / 22:27
0
answers

IOS CLLocation in the background

I have been working on an app to send the GPS position of the cell phone to a server through a TCP socket. The application must be able to remain in the background indefinitely. I have part of the echo code, the application sends the packet over...
asked by 07.07.2016 / 00:00
1
answer

Confused with NSURLSession delegate

class ImageTrack { var session: NSURLSession? var delegate: NSURLSessionDelegate? var task: NSURLSessionDownloadTask? func update() { let config = NSURLSessionConfiguration.defaultSessionConfiguration() session...
asked by 22.06.2016 / 01:52
2
answers

Preload while synchronizing data in swift 2

I am getting data from a REST API with Swift 2 and I need a preload to be displayed while loading the information. How can I do it?     
asked by 10.06.2016 / 16:05
1
answer

fatal error: unexpectedly found nil while unwrapping an Optional value

I have the following function to call a URL that is in a REST from Swift 2, but when I send values with space in the NSURL I get the following error:    fatal error: unexpectedly found nil while unwrapping an Optional value class func ge...
asked by 09.06.2016 / 18:16
1
answer

Error NSMutableURLRequest swift

I have this code: let urlString = "https://roads.googleapis.com/v1/snapToRoads?path=" let url = URL(string: urlString) print(url)// Escribe=> nil let request = NSMutableURLRequest(url:url)//Aqui da error the error it gives is: fatal e...
asked by 20.10.2016 / 13:36
0
answers

SpriteKit - Problem with points in Map

I'm programming a game with SpriteKit and I have a map like the one I attached and the protagonist is jumping from point to point, and at each point there is a game. I put the points on the image, but depending on the screen resolution, that poi...
asked by 17.03.2016 / 21:50
2
answers

how to convert anyObject to Int32

I need to convert a anyObject that comes from a JSON of a web service to Int32 I have tried in many ways but none of them have happened to me. The last one I have is this: let puntos = "\(objeto["CATPUNTOS"])" as? NSString...
asked by 25.05.2016 / 23:49