Questions tagged as 'swift-playground'

2
answers

How to access a Cocoa Touch Framework module in the Swift Playground

I created a Cocoa Touch Framework module in Xcode 6.0.1 with Class implemented in Swift and I get it imported into my View Controller and use it normally. The problem is that I can not use the same code in the Playground created in the same pr...
asked by 05.10.2014 / 17:15
1
answer

How to improve this method that compares three numbers?

Can you help me improve this little code so it's less extensive and clean? The code compares three numbers and shows which one is the largest of them: @IBAction func comprar(_ sender: Any) { if pNumero.text! > sNumero.text! {...
asked by 03.02.2017 / 00:26
2
answers

how to add white space between Strings

Good, I have 2 fields: First and Last name. in the exit the 2 names leave glued without space between them. Of this I thank you for the help.     
asked by 28.09.2016 / 16:21
2
answers

How to insert link in button

Good, How do I insert a link into a button I tried as below and did not work. @IBAction func urlDisplay(_ sender: AnyObject) { UIApplication.sharedApplication().openURL(NSURL(String:"http://www.quatenus.co.ao")!) }     
asked by 01.10.2016 / 03:30
2
answers

How do I make an Alert message UIAlertController

Good, How do I make an alert? the way I did it seems to be all right except for the function error. Some help, thank you in advance.     
asked by 09.10.2016 / 01:28
1
answer

How to find and display repeated elements within an Array in Swift 4

I'm new to StackOverFlow and also a newbie to Swift programming. Could anyone more experienced tell me how I can identify repeated elements within an array without using Extensions? Only using for and if. Thanks for the help and hugs to...
asked by 06.07.2018 / 15:24
1
answer

Swift 4 http get and iterate the JSON response

Hello, I'm learning Swift and I'm doing a GET request via URL that returns me a JSON with this structure. { "data": { "response": [ "https://s3.amazonaws.com/meusite/minhapasta/banners/banner-01.png", "https://s3.amazonaws.com/meusite/minh...
asked by 10.12.2017 / 17:21
1
answer

UIResponder Signal

Good afternoon, I made a small app with swift 2.3 Xcode 7.3.1. with the update of swift 3 and Xcode 8 began to present the error below. some help please.     
asked by 15.09.2016 / 18:21