Questions tagged as 'swift'

2
answers

Global constant Swift 2

Hello, I would like to know how to create a global settings file. I'm using a Lib to do http query, Alamofire. I'd like it anywhere that in any file I called the constant it would be accessed. Example: Alamofire.request(.GET, FILECONFI...
asked by 15.04.2016 / 23:11
1
answer

Swift - Indicator activity is not showing up

I have code to show activity indicator in Swift, but it is not working properly. activity indicator does not appear, even after all code within func de configuração is loaded correctly. What's wrong? Here is the code...
asked by 19.04.2016 / 21:20
1
answer

Put a line in a UITabBarItem?

How to place a line at the bottom of a UITabBarButton just like in this image: But this line should only appear on the selected button.     
asked by 13.04.2016 / 15:38
2
answers

Picker View - Display an ImageView according to the sum of values

Hello. I'm trying to work with Picker View to display a combination of values. var pickerDataSource = [["a", "b", "c", "d"],["1","2","3","4"]]; Doubt is; how do I get results within a condition? if(row == 0) { self...
asked by 28.03.2016 / 22:55
1
answer

I can not change the rootViewController

Hello, take it easy with me because I am extremely beginner. I'm trying to change the root of an application I'm trying to do. It even worked when I commented on window!.rootViewController = centerContainer But when I do this, the m...
asked by 25.04.2016 / 00:28
1
answer

Swift - How to make and execute an AssyncTask?

I made an Android app and I'm currently making a version of it for IOS, I'd like to know how to implement an AssyncTask in Swift and run it. On Android I did this: public void carregaBanner2(){ new LongOperation3().execute("");} private cla...
asked by 18.04.2016 / 21:24
1
answer

Label moving as a digital marquee

Hello, I would like to know how I do in Swift a sentence moving from right to left and when every sentence passes it is doing the same procedure forever, like a digital marquee.     
asked by 14.03.2016 / 19:20
1
answer

Array per swift parameter

Good afternoon guys, how are you? How do I pass an array per parameter? and I would like the array parameter to be optional Example: func startGame(teste: Array) -> String { let randomIndex = Int(arc4random_uniform(UInt32(wordHa...
asked by 24.01.2016 / 19:55
1
answer

Passing parameters between IOS views

I have a view where I have login forms in my app, if the person choose login or register will be redirected to the same view but depends on the button that is pressed I will present a different screen ... How can I pass the parameter to know the...
asked by 14.01.2016 / 15:36
1
answer

DropDown on swift

I'm using a dropdown type using this 1 project, and now I wanted to select one of the items that is inside it and close the dropdown and the chosen item appears on the button label this all in swift, can anyone help me here? Thank you     
asked by 11.02.2016 / 12:48