Button border color - Objective C - Swift

Swift
I want to change my border color to a specific hex color(#21CE99), can you guys please help me? I've already known how to change it to a basic color,...
1 year ago

Convert string to bool - swift2

Swift
How can I convert string to Bool in swift2? When I do the convertion as below. I get the error: "Cast from 'String' to unrelated type 'Bool' alwa...
1 year ago

SwiftyJSON to implement json string to swift object

Swift
How to implement json string mapper swift object? class User{ var name:String var age:Int } Easy way to convert User object to a json s...
1 year ago

How to dismiss VIewController iOS Swift

Swift
I am new to iOS development. I am developing an application using iOS Swift. I have 3 view controllers viewController1, viewController2, viewControlle...
1 year ago

Working with Tableviews

Swift
Hi I am a little new to Swift and tableviews I am working on a final project at school and I am using Alamofire to make my request and SwiftyJSON to p...
1 year ago

How do I save dictionary (map object) to DynamoDB using Swift

Swift
I’m trying to save dictionary to my DynamoDB table field using low level API. I couldn’t figure out how to do it with object mapper. There is no examp...
1 year ago

Cannot assign a value of type ViewController to a value of type UITextFieldDelegate?

Swift
Here's the error when I wrote the line self.MessageTextField.delegate = self: /ChatApp/ViewController.swift:27:42: Cannot assign a value of type '...
1 year ago

ARC not working properly when using NSNotificationCenter

Swift
Why doesn't deist get called on an object that has used NSNotificationCenter, I have included below a simple version of my code. Where I create an obj...
1 year ago

How do I convert a Swift Array to a String?

Swift
I know how to programmatically do it, but I'm sure there's a built-in way... Every language I've used has some sort of default textual representatio...
1 year ago

Swift optional inout parameters and nil

Swift
Is it possible to have an Optional inout parameter to a function in Swift? I am trying to do this: func testFunc( inout optionalParam: MyClass? ) { ...
1 year ago

"The file "MyApp.app" couldn't be opened because you don't have permission to view it" when running app in Xcode 6 Beta 4

Swift
Whenever I try to run my app in Xcode 6 Beta 4 I am getting the error: The file "MyApp.app" couldn't be opened because you don't have permission to v...
1 year ago

Implicitly unwrapped optional values and using its value if nill

Swift
Apple Documentation says the following about implicit unwrapped optional. NOTE If an implicitly unwrapped optional is nil and you try to acce...
1 year ago

Swift: Binary search for standard array?

Swift
I have a sorted array and want to do binary search on it. So I'm asking if something is already available in Swift library like sort etc.? Or is ther...
1 year ago

How do I call a webservice in Swift?

Swift
How do I call a RESTful web service in Swift? In Objective C I've used the following code, but haven't been able to find details of how to do the sam...
1 year ago

Error with fetching value from CFArray

Swift
I'm trying to fetch contacts from address book. My code is working properly in Objective C, but when I converted it to swift I'm getting error Could...
1 year ago

How to create triangle in SpriteKit (Swift 2)

Swift
I did it with SKSpritenode func AddTopTriangels() { TopTriangel = SKSpriteNode(imageNamed:"Top-Triangels.png") TopTriangel.positio...
1 year ago

TableView.reloadData() doesn't work after save data into core data entity

Swift
I'm trying to insert a default record into my core data entity while the tableview first-time loaded and checked there's no data in the entity. The da...
1 year ago

iOS: remove objects or reinitialize arrays in swift?

Swift
I'm new in swift and I want to know if the beast approach to reuse an array is to delete all object inside or reinitialize it. For example if I have:...
1 year ago

How to set the rootViewController with Swift, iOS 7

Swift
I want to set the rootViewController in the app delegate .. func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions:...
1 year ago

NSPredicate with multiple arguments and "AND behaviour"

Swift
I have a function which fetches those objects from a particular entity that fulfill a specified criterion: func fetchWithPredicate(entityName: String...
1 year ago