Questions tagged as 'swift3'

1
answer

Error NSAttributedString when switching to Swift 3

I have this code used to convert this type of characters: simbólica to this: simbólica . do { let encodedData = actualLabel.text!.data(using: String.Encoding.utf8)! let attributedOptions: [String: AnyObject]...
asked by 21.09.2016 / 09:45
3
answers

How to obtain the model of a UITableViewCell

I would like to know if someone has a way to get the value of a class UITableViewCell . class EncuestaRespuestaC: UITableViewCell { @IBOutlet weak var lblDescription: UILabel! @IBOutlet weak var ivStart01: UIButton! @IBOutlet...
asked by 13.07.2017 / 02:37
1
answer

Stack's at the UIViewController of iOs

I am mixing a lot of things about the way the different controllers navigate. When I do a func present(UIViewController, animated: Bool, completion: (() -> Void)? = nil) , is there a stack in which my controllers are added? If so,...
asked by 18.11.2016 / 00:37
2
answers

preferences management in IOs with SWIFT

Good morning, I'm starting with swift , and I have a question about how to manage preferences. In android , when I deal with them, if the user has not modified it, I have one by default: String correo = prefs.getString("email", "por_defec...
asked by 05.10.2016 / 12:10
2
answers

Detect when a text does not fit in a UI Label?

In my app I put a UILabel and inside I put a text, but apparently the text is longer than it can fit, and I would like to know if you can detect when a text is too long, so you can download the size of the font using code with while...
asked by 22.02.2017 / 19:06
2
answers

like hide keyboard when you play outside and inside a textfield when you have a scrollview

the problem is the following, I am developing an apps in the other view that I have achievement hide the keyboard perfectly but when I am using one with a scrollview I can not hide it in the others I use .resignFirstResponder() and...
asked by 04.08.2017 / 19:48
2
answers

Access an array within a Json in Swift 3

Good afternoon, I'm using the Spotify API, I try to access this Json: I was able to successfully access the "name" value, but I would like to access the "images" array and its "url" value, so, specifically, my question would be, how to acces...
asked by 14.06.2017 / 20:54
1
answer

Subtract dates in swift

I need to subtract two dates and get the number of days that pass from one to another. I have this code in which I get the fields of the date, so I can put it in any format: let arrayFechaDesde = AppDelegate().explode(caracter: " ", cadena:...
asked by 09.11.2016 / 10:33
3
answers

Pass data between controllers within a tab bar IOS swift3

Hi, I'm starting to program in Swift3 on iOS and I need to do a tab bar but I do not know how I can pass data between the controllers, can someone help me?     
asked by 16.03.2017 / 15:35
2
answers

Push Notification in backgroud IOS 10, Swift 3.0, XCode 8

I commented that I have migrated my swift app 2.3 to 3.0 and I am working with Xcode 8. with the previous versions I could capture the payload of a push notification using the function: didReceiveRemoteNotification. I have been trying for sev...
asked by 06.10.2016 / 00:23