Questions tagged as 'swift3'

1
answer

Refresh IOS Swift 3 map

Good morning. I'm making an application that shows a map, and receives from a webservice an array with JSOn opbjects, which contain coordinate data, and then add PINs to the map, showing the location of the users. The connection works corr...
asked by 05.04.2017 / 19:44
3
answers

Ternary operators in swift

Is it possible to do operadores ternarios in swift ? I have this type of code that I repeat many times, and I wanted to know if I can simplify it using operadores ternarios . condicion ? resultadoTrue : resultadoFalse...
asked by 17.11.2016 / 14:18
2
answers

convert an object to json in swift

I am currently wanting to convert an object into swift of this class class UsuarioServer{ var username:String? var password:String? var nombreCompleto:String? var direccion:String? var edad:String? init (username: String, password: String, no...
asked by 24.06.2018 / 10:33
1
answer

error when passing JSON parameter

When I pass the parameter that a JSON expects, I get the error that "can not convert value type String to expected argument type JSON" (aka 'Optional Dictionary (String, Any') this is the data var params: JSON = ["token": token, "system":...
asked by 21.03.2018 / 17:36
1
answer

Problem with UIPickerView

I have a problem with 8 UIViewPickers, when moving the first UIPickerView the fifth UIPickerView is also moved without having moved it, taking the same value as the first one, if I move the second one moves the sixth one and so on, do you know h...
asked by 23.02.2018 / 21:47
2
answers

Retrieve position within a CollectionView

I am developing in IOS and I am a first-timer. The idea is that when I started the program I made a collection View of buttons in the following way: @IBOutlet weak var collectionView: UICollectionView! let taille = 45 override func...
asked by 30.01.2018 / 16:24
1
answer

add an item or cell having an array, in a collectionView

Greetings to all! I hope someone can solve my problem, I have my CollectionView, and in it I put a sampleObject, which contains an image and a label and a function to add these examples, this returns an array and I put it in my collection: and w...
asked by 16.12.2017 / 00:44
1
answer

Error in swift NSAttributedString

I have migrated to Swift 4 but I have the following error that I can not solve:    Cannont convert value of type '[String: AnyObject]' to expected aegument type '[NSAttributedString.DocumentReadingOptionKey: Any]' let encodedData =...
asked by 22.12.2017 / 10:20
1
answer

Error sqlite FMDB in swift - Unknown error calling sqlite3_step (5: database is locked)

I have the following code: func downloadImagen() { print("Download Imagen") getOrders() { result, error in if error != nil { print("ERROR: \(error!)") } else { let imagenFondoBbDd: String...
asked by 25.01.2018 / 10:00
1
answer

How can I get the data type of a "null" nil attribute in swift 3?

func Deserialize(_ json:Dictionary<String, Any>) { for (keyName, value) in json { if let type = self.value(forKey: keyName) as? String{ print("El valor con la etiqueta es de tipo estring") }...
asked by 06.10.2017 / 17:16