using public key encryption in swift

Swift
I am trying to use a public key provided to me by web service developer to securely transfer data. I have tried hard but I am not able to find any wor...
1 year ago

How to Resize image in Swift?

Swift
I am making an app for iOS, using Swift and Parse.com I am trying to let the user select a picture from an image picker and then resize the selected ...
1 year ago

swift show alert with custom cell

Swift
I have a custom cell. It has an UIImageView and a button. When I click the button, my app will save my image to Photo Album and show an result alert. ...
1 year ago

UITableViewCell selection challenge

Swift
I created a simple demo app for this problem, which is not vital but I am looking for an elegant solution. I have a grouped tableview with multiple se...
1 year ago

Swift 2.2 on Linux, "use of unresolved identifier 'exit'"

Swift
I am attempting to exit a command line utility with error codes in Swift 2.2 on Linux. I have attempted the solution in this question, but am still ge...
1 year ago

Communicating with a BlueSMiRF device from ios

Swift
I need to use an iPhone to send data to an arduino, which is hooked up to a BlueSMiRF device. Which iOS libraries should I use to send data over the b...
1 year ago

Convert emoji to hex value using Swift

Swift
I'm trying to convert emojis in hex values, I found some code online to do it but it's only working using Objective C, how to do the same with Swift? ...
1 year ago

How to use hex colour values in Swift, iOS

Swift
I am trying to use hex colour values in Swift, instead of the few standard ones that UIColor allows you to use, but I have no idea how to do it. Exa...
1 year ago

Call Swift function from Objective C class

Swift
I have a problem. I have an Old Objective C project and i want to call new Swift function and object, i have create the file "-Bridging-Header.h" and ...
1 year ago

How to check nil for Swift Optionals with out unwrap it?

Swift
I knew that safely unwrapping is as follows var firstName:String? if let firstName = firstName { dictionary.setObject(firstName, forKey: "firstN...
1 year ago

Leading zeros for Int in Swift

Swift
I'd like to convert an Int in Swift to a String with leading zeros. For example consider this code: for myInt in 1...3 { println("\(myInt)") } ...
1 year ago

How to read a variable value in the AppDelegate from a ViewController using Swift

Swift
I would like to read the value of a variable contained in the AppDelegate from a ViewController. The variable contains the Device Token used to enable...
1 year ago

"Press-and-hold" button in Swift

Swift
I have referred to countless other questions about a press-and-hold button but there aren't many related to Swift. I have one function connected to a ...
1 year ago

How to get the front camera in Swift?

Swift
I am trying to get the front camera with live view. I am able to get the back camera using: var backCamera = AVCaptureDevice.defaultDeviceWithMediaTy...
1 year ago

SCNCamera limit arcball rotation

Swift
I have a scene setup with SCNCamera that rotates around an object. What would be the best way to limit the extents of rotation the camera can achiev...
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

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

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

SKEmitterNode isn't removing itself from parent?

Swift
I added SKEmitterNode as a childNode of my mainScene and than expected that It would be removed when particleLifetime ends, described like apple docs....
1 year ago

Programmatically Auto-Layout Functions

Swift
Im having an issue with these two functions. For func 1: func constrainWidth(width: CGFloat) -> [NSLayoutConstraint] { let constraints = NS...
1 year ago