Questions tagged as 'swift-3'

4
answers

swift 3 - How to persist objects

I'm an Android developer and I'm trying to learn some things for iOS as well. I have knocked myself a little on simple things, like saving persisting an object of mine to catch it again another time. On Android I would use a SharedPreference...
asked by 19.06.2017 / 20:36
1
answer

Doubt with creation of For in Swift 3

I'm following an iOS course and the course shows for this way: for var i = 1; i <= 10; i++ { } But I have an error message, has that changed? How could this be done in the new way?    error: CreatingLoop.playground: 6: 1: erro...
asked by 12.05.2017 / 14:49
1
answer

Change font size of pickerview

Good afternoon. 09/05/2017 I have the following pickerview: As you can see immediately the first item of the two lists does not appear the whole name. I think because of the size. On the left side the full name is: "BEER OF THE BOA" On...
asked by 09.05.2017 / 21:35
1
answer

How to use the Search Bar with the class person - swift 3

Good morning .. I have the class person class pessoa { var nome : String = “”; var idade : Int = 0; var foto : UIImage!; } extension pessoa { class func Gerar_Registros(pQtd : Int) -> Array<pessoa> { var v...
asked by 20.04.2017 / 17:19
1
answer

How to mount an array dynamically

I would like to make a func to return the array that follows, however I do not know the return type or how to dynamically mount this array: vDataSource_Detalhe = NSArray(objects: NSArray(objects: "Cerveja 01","Cerveja 02"), NSArray(o...
asked by 05.05.2017 / 20:49
0
answers

Example Login with basic auth authentication using Alamofire?

I'm trying to make a login screen where I use Alamofire to make the request, but with the examples from the Alamofire website itself, it's not working. If someone can help with a sample code, I would appreciate it a lot !! What's the probl...
asked by 06.03.2017 / 22:58
1
answer

JSON object with Array. Migration from swift 2 to swift 3

Previously in my app when I was making a call to the server and if there was an error I would do the following: Alamofire.request(mutableURLRequest).responseJSON{ response in if let JSON = response.result.value{ if JSON.count != 0{ let errorLi...
asked by 18.01.2017 / 16:38
1
answer

startMonitoringSignificantLocationChanges Does not work in the background

I'm making an app that uses the device's location service. It necessarily needs to be capturing the positions when there is a change of location and must capture in all situations ( background / foreground / killed), so I am using the startMonit...
asked by 12.04.2017 / 22:50