Questions tagged as 'swift'

3
answers

How to retrieve the first letter of a Swift array

I would like to know how to retrieve the first letter of an element from an array var wordEasy = ["uva", "manga"] var teste: String = wordEasy[0] I would like to retrieve only the letter u     
asked by 22.01.2016 / 18:07
2
answers

Development iOS native [closed]

I have a question regarding the languages available for native development. I heard in a podcast, saying that there are still applications that maintenance is done on objective-c. Would it be nice to learn both? Or focus only on Swift?     
asked by 29.08.2018 / 22:50
5
answers

How to make the keyboard disappear when clicking outside of it? Swift

I have a normal TextField, but I would like to know how to make the textField keyboard disappear when I click outside it. I know to make it disappear by clicking return using the textFieldShouldReturn delegate, but I would like to know when I cl...
asked by 29.07.2015 / 18:39
2
answers

Action after back background application

I have a webview on android that always checks if there is internet coming back from the background checking if the connection status has been changed in case the offline application is sent to a "reconnect and try again" screen using the code b...
asked by 31.10.2018 / 14:15
3
answers

Array position in Swift

I would like to know how to find the position of an Array in SWIFT Does anyone know? var nomes = ["Douglas", "Marilia", "Roberto", "Carol", "Lucas", "Iasmim", "João", "Zeca"] nomes.append("Franklyn") print(nomes) for constante in nomes{ p...
asked by 26.09.2017 / 16:38
1
answer

What is protocol-oriented programming?

I wonder, what is protocol-oriented programming? I heard a teacher comment on this type of programming, about this paradigm, but it was a bit vague.     
asked by 29.09.2017 / 04:51
2
answers

Swift 3 - How to automatically resize UITableView

How to automatically resize a UITableView according to the amount of content in it? I want to do something like what I can do with a UiTextView: MyTextView.sizeToFit()     
asked by 17.02.2017 / 15:52
3
answers

How to change the title of the back button of the navigation bar

I would like to change the title of the back button of the navigation bar, change from " I tried the following but did not succeed self.navigationController?.navigationItem.backBarButtonItem?.title = "Voltar"     
asked by 20.08.2016 / 06:55
1
answer

Doubt Encoding Utf8 Swift 3

I'm having a lot of trouble with the encoding of my application. I have an online radio in the United States and I'm trying an application for it. I get the metadata of the LastFM songs. let queryURL: String if useLastFM { queryURL...
asked by 07.07.2017 / 06:34
2
answers

Value of type 'String?' has no member 'Int'

I have the following problem:    Value of type 'String?' has no member 'Int' What is the reason for the error and what is the solution? class ViewController: UIViewController { @IBOutlet var nameField: UITextField! @IBOutlet va...
asked by 31.07.2017 / 22:28