Questions tagged as 'swift'

1
answer

Problem with connections in Swift

I have a problem with a project that I am developing in Swift, it is for class and I am faced with a problem that I can solve with more than I try. I explain: From the FoodTracker project developed in the Apple Developer Guide I am trying t...
asked by 21.04.2018 / 12:38
2
answers

swift UITableView is it possible to set the header of the table and the header of the sections?

I have a table with a header and several sections (each with a header) and I would need both the header of the table and the header of the sections to be fixed ... is that possible using a UITableView? Then I leave the code of my table: fu...
asked by 19.04.2018 / 20:51
2
answers

viewDidAppear does not update the views to the actual measurements according to the device

The first time I install a viewController, the measurements of its storyboard views update me to the real ones of the device. So if I make a self.view.frame.width inside viewDidAppear it gives me the value of that measure adapted according to...
asked by 06.03.2018 / 22:15
1
answer

Table View with height of different cells and adjustable to their contents

I'm trying to make a view that contains a TableView with different cells of different heights that fit their content. But I do not find any example that works well. What I do is implement a tableView with a cell prototype to whi...
asked by 22.09.2017 / 11:11
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
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
1
answer

Display phases in iOs (Constraints)

I wanted to know if someone can explain to me the methods of UIView about how the constraints are updated, of the phase of layout of the UIView , and the one on the display . My question is about what order and how t...
asked by 11.06.2016 / 14:00
1
answer

UIImageView circular in UITableViewCell

I'm trying to put a UIImageview Circular in a UITableViewCell and I'm not having much success: (. In my TableViewCell class class ComentariosTVCell: UITableViewCell { @IBOutlet weak var photoUser: UIImageView! //weak var photoUser: UIIma...
asked by 04.06.2016 / 02:35
1
answer

Initializers in Swift 2

Could someone explain to me in a simple and clear way the difference between designated initializers and convenience initializers? If possible, with some basic example to understand it     
asked by 08.06.2016 / 18:13