Questions tagged as 'swift3'

1
answer

Inconsistency with Calendar.dateComponents in swift

I have the variable fecha that when doing print shows per console: 2016-11-20 23:00:00 +0000 The problem is that when you do this: let auxCalendar = calendar.dateComponents([.weekday, .day, .weekdayOrdinal, .month], fro...
asked by 21.11.2016 / 11:21
1
answer

Alamofire iOS error only with app archived

Apologies for sending the question in English ... I'm having problems making HTTP requests with the iOS Alamofire library. The strange thing is that when I run the application from the XCode itself I do not get any errors but I compile and insta...
asked by 21.10.2016 / 13:40
1
answer

Take picture or take from swift library 3

How can I put a button when I click on the option to choose a photo from the library or take one directly? At the moment I can only use one of the two options via code. @IBAction func cogerImagen(_ sender: UIButton) { self.imagePicker = U...
asked by 22.09.2016 / 12:14
2
answers

2 Collection View in the same ViewController?

I enclose an image of what I want to do: In the following code, I have a code from a collection where when I click on an image I move with one segue to another VC with the same larger image. How could I change the segue to put the big i...
asked by 08.06.2017 / 10:22
1
answer

JSQMessagesViewController And GeoFire are not compatible?

I am working on an application in Xcode with Swift 3 for IOS where I am using GeoFire to know the location of the users but when I try installing the JSQMessagesViewController pod in my project I get an error with GeoFire:    "Firebas...
asked by 22.02.2017 / 21:45
2
answers

enable or unhide a button in swift 3

I have several buttons inside a view controller, but there is one of them that I want to be disabled if in a textfield there is no written value. If any value is written, it must be re-enabled. import UIKit class AreaOfAnIsoscelesTr...
asked by 02.08.2017 / 01:16
2
answers

IOS user permissions

I'm making an app that asks for access to access the image gallery. So I have to ask the user for access. My question is: If the user the first time cancels the permissions, how can I ask them again? At the moment I have this code that...
asked by 22.11.2016 / 07:45
2
answers

Obtain n characters from a string with swift

I need to get the first 4 characters of a string in Swift. Is there a function for it?     
asked by 03.10.2016 / 09:17
1
answer

uitableviewcontroler with titleForHeaderInsection

Hello my problem is the following I have several cells created, with their respective titles each, but when I try to add more iten to each cell I get error, or does not present the value in the cell this is an example of the app The questi...
asked by 25.07.2017 / 16:25
1
answer

How to register push notifications in Swift 3?

Push notifications in versions prior to Xcode8, worked correctly, but when you migrate to swift 3, you no longer register the Token. My code is as follows: application.registerUserNotificationSettings(UIUserNotificationSettings(types: [.badge,...
asked by 27.10.2016 / 16:34