Questions tagged as 'swift'

1
answer

Error converting string to date, with dateformatter in swift

In the user registry I have an input with a mask in this format "dd / MM / YY", after getting the input value, which comes as string, I have to convert it to date. The conversion always worked, only with the date 10/25/1992 that it's the problem...
asked by 15.02.2018 / 17:17
1
answer

Lost file in xCode

When I copy a Swift file and paste it from my folder, it does not appear in xCode.     
asked by 05.10.2017 / 16:59
2
answers

Error initializing EvReflection Bool

I have a class: class Ingrediente: EVNetworkingObject { var idIngrediente:NSNumber! var nomeIngrediente:String! var adicional:Bool! var valorAdicional:NSNumber! var empresa:NSNumber! } This class receives data from W...
asked by 23.03.2017 / 16:30
1
answer

How to redirect to a ViewController

For conflicts between two frameworks, I had to pass the facebook login code to an auxiliary class, however I'm not sure how to redirect the user to the main screen of the app once the login is done, Someone there can give me a solution to this?...
asked by 06.10.2016 / 06:35
1
answer

NSNotificationCenter calls the page several times - Swift

I want to do the following: 1st the user is in the app and decides to quit. Clicking on the iphone home button. 2nd the user enters the app and instead of continuing on the page where it was when it left, the app automatically sends the us...
asked by 20.06.2016 / 15:16
1
answer

How to pass to Array JSON information in Swift

When the result comes from the server I use the following code snippet to get the result: if let JSON = response.result.value { print("JSON: \(JSON)") } And the print result is: [{ Nome = Tiago; Idade = 22; Cidade = Minas; },...
asked by 12.02.2016 / 16:23
2
answers

Swift - How to automatically change the Imageview image

I have some images and an ImageView according to the photos I would like to be able to toggle the imageView image, switching from one to another every 5 seconds automatically. How could I do this?     
asked by 19.04.2016 / 19:33
1
answer

Doubt, add value to an array [AnyObject] using Swift?

How would I do this in swift? var jogador02 = ["Teste", 0] jogador02[1] += 1 Result equals jogador02 = ["teste", 1]     
asked by 21.01.2016 / 18:11
1
answer

How to pass a "title" in a "UIAlertController" of type Int with swift?

Good afternoon, guys. I'm calling an alert in my code where I need its "title" to be the return id of a JSON, my json object has id and status, the id is of type Int, and the status is of type String, I tried to convert the id to string, but...
asked by 07.11.2015 / 21:29
2
answers

Why is my request blocking events?

I have implemented an http json request that works fine, but it prevents the user from clicking on it and can access the information only when it is downloaded. Example: I have a UITableView with 3 Items, if I click on one of them and in that...
asked by 28.11.2015 / 21:35