Questions tagged as 'swift'

1
answer

How to change the color of navbar ios

I'm developing an application, I'd like the navigation bar to have the same body color as the project, I'm trying with the following code UINavigationBar.appearance().barTintColor = UIColor.redColor() This code works, changes to red...
asked by 19.08.2016 / 01:09
3
answers

How to round values of type Double?

I made a function to return the rounding of values of type Double , the function is working, but I do not know if it is the ideal way to get this result, I think there must be a way without having to use the String class. var nume...
asked by 18.11.2015 / 13:58
1
answer

How to count how many characters a string has - Swift

I'm having some difficulties with simple things. How do I count how many letras has a variable? let word = wordEasy[0] for var i = 0; i < word.count ?????     
asked by 22.01.2016 / 18:22
1
answer

Importing an objc control into swift: Error on the one hand (func) of my contole

I decided to make an app in swift this time, and as usual I use my custom control (MenuView). In the objC I know how it works and everything worked, in swift I followed all the steps, import in the bridging-header.h, and put the MenuViewDelegate...
asked by 28.10.2014 / 00:18
2
answers

Retrieving the name of a button on the Swift sender

How do I retrieve the value of a button? For example: I have a button in my layout with the name Test button , but I want to assign the name of this button to be clicked on a variable! Is this possible? Thank you ] 1     
asked by 22.01.2016 / 16:59
2
answers

Popular View with JSON

I use a library called Alamofire-SwiftyJSON to make a request JSON . Example call: Alamofire.request(.GET, "http://httpbin.org/get", parameters: ["foo": "bar"]) .responseSwiftyJSON({ (request, response, json, error) in...
asked by 01.12.2015 / 13:09
2
answers

Map showing place of search swift

Well, I'd like to know how I can get my map to show the place I've been looking for and center the view at this point. I was able to do with the current location as follows: self.mapDisplay.setUserTrackingMode(MKUserTrackingMode.Follow, animat...
asked by 17.01.2015 / 02:38
1
answer

MKMapView circular swift

I wonder if you can leave MKMapView in Xcode in a circular format. I tried to use mapView.layer.cornerRadius, but I still could not do it     
asked by 18.01.2015 / 22:54
2
answers

Swift - how do I find the screen size of the user's device?

I would like to know how to find out the screen size that the user is using or the model of your iPhone via Swift . I know just how to do it in Objective-C Response in Objective-C: CGFloat screenScale = [[UIScreen mainScreen] scale];...
asked by 10.06.2016 / 20:27
2
answers

SWIFT - How to feed a TableView with information from an NSArray?

var nomes:NSArray = [] override func viewDidLoad() { super.viewDidLoad() Alamofire.request(.GET, MyUrl,parameters: nil,encoding: .JSON).response { (_, _, data, error) in self.nomes = try! NSJSONSerialization.JSONObjectWit...
asked by 07.08.2016 / 04:00