Questions tagged as 'swift'

2
answers

How to pass the value of a variable through a button to another class in Swift

I have a login screen, with the fields email and password. I need to use in another viewController the email that was used to log in to the system. But I can not pass the typed email in the viewController Login to another viewController.     
asked by 16.05.2016 / 01:17
1
answer

Get index of the element in Swift

I'm trying to use the indexOf to know the index of an object inside the array but I do not know which parameter (s) to pass. My code: /// Struct that define the track model
asked by 16.12.2015 / 18:33
1
answer

"OK" button in the alert message -

Someone can help me What is the right shape in Swift 2? asks to remove the "Let okAction", but then I lose the reference and the alert goes without button.    let okAction = UIAlertAction (title: "OK", style: UIAlertActionStyle.Default, ha...
asked by 10.03.2016 / 19:47
2
answers

Swift - how to find out the size of JSON?

I'm getting a Json from a link. How do I find its size and thus how do I assign the "image" key to a String vector - var img = [String]() ? JSON example: [{"imagem":"textoX","link":"link da webX"}, {"imagem":"textoY","link":"link da...
asked by 02.05.2016 / 18:57
1
answer

Problem with Core Data on iOS 7

I have a problem between iOS 8 and iOS 7. I am using Core Data, I have an entity called Pessoa ( NSManagedObject ), but when performing an update on the data happens a EXC_BAD_ACCESS , only this, no further description or erro...
asked by 20.02.2015 / 11:54
1
answer

Has not initializers - Swift IOS

Good morning, friends. For some reason, I'm having this error, since I'm new to this platform, I can not identify the problem, could someone help me please? Thank you!     
asked by 21.01.2016 / 13:42
2
answers

How to feed a tableView of a screen with information from another screen?

Good evening, I have 3 screens in my app to buy passwords, the last one has a tableView powered by the passwords purchased by the user on a previous screen. He must choose a password and it appears in the summary of his request on the next scree...
asked by 13.11.2015 / 03:08
2
answers

Parse project with black bands

I'm using the Parse.com project in version 7 of Xcode, however, the app has a black stripe at the top and another at the bottom as shown in the image: I'm using the swift version of the project. Could anyone tell me what this means? I'v...
asked by 25.09.2015 / 22:43
1
answer

Display alert if you are not connected to the internet

How do I display an alert to the user if they are not connected to the internet?     
asked by 13.04.2016 / 04:15
2
answers

How to create a variable that only increases equal to an ID in swift 4?

I need to create a variable, idAtual every time I add a new department, the ID must be idAtual + 1 , every time I create idAtual in the DepartmentViewController, it restarts with the value I declared, how do I make that value constant and jus...
asked by 21.08.2018 / 21:40