Hapi - How to parse the payload to JSON?

Swift
So I'm trying to study up on HTTP/TCP/IP Protocols, Nodejs, MongoJS,and MongoDB all at once. So I'm trying to figure out a couple things with the Hapi...
3 years ago

Conversion between CGFloat and NSNumber without unnecessary promotion to Double

Swift
As we all know, CGFloat (which is ubiquitous in CoreGraphics, UIKit etc) can be a 32-bit or 64-bit floating point number, depending on the processor a...
3 years ago

Swift animate UIView with multiple options

Swift
How does swift handle multiple options when animating UIView? I tried UIView.animateWithDuration(0.2, delay: 0.0, options: .Repeat | .Autoreverse, an...
3 years ago

Detect when user stopped / paused typing in Swift

Swift
I've dug around stackoverflow and found the solution which I converted to Swift, it doesn't seem to work and the selector is still being performed. ...
3 years ago

Generic method override not working in swift

Swift
There is a protocol Printable and a struct Printer from a 3rd Party. protocol Printable {} struct Printer { static func print<T>(object: ...
3 years ago

In Swift, how efficient is it to append an array?

Swift
If you have an array which can very in size throughout the course of your program, would it be more efficient to declare the array as the maximum size...
3 years ago

Swift do catch inside function dont work

Swift
Hello i have json code inside function and gives me nil error in url strings my codes here var jsonResponse: NSMutableDictionary? do{ jsonRespons...
3 years ago

Why does having more than one capture group in my regex crash my app?

Swift
Regardless of what the regex is, >1 capture group will crash this code with the following error. Terminating app due to uncaught exception 'NSRangeEx...
3 years ago

Adding Constraint using VFL - iOS Swift

Swift
I am getting myself introduced to VFL and I am trying out something which I need some help. I have the image view aligned like in below image in port...
3 years ago

Convert currency string into float in Objective-C

Swift
My goal is simple, I have a textfield storing a localized currency value ($1,000.00 for instance) and I need to get that value back from the textfield...
3 years ago

I am trying to append PFGeoPoint from parse into array and convert into CLLocationCoordinate2D

Swift
I have multiple PFGeoPoints in parse an I want to import all of them, and append them to an array, so at the end it will be an array of geopoints i.e....
3 years ago

Swift - App Delegate not passing data

Swift
I'm developing an App that it's data is from a URL, here's a sample code that I'm using AppDelegate.swift @UIApplicationMain class AppDelegate: UIRes...
3 years ago

How to hide keyboard in Custom UIView?

Swift
I have UIViewController(FirtViewController) in my Storyboard... In Swift file assigned to this UIViewController i add custom UIView let customView = ...
3 years ago

How to use PHAssetResourceRequestOptions progressHandler/PHAssetResourceProgressHandler

Swift
I'm trying to retrieve/download the video/frames of Live Photo. As for the API documents there is a possible scenario which the Live Photos will be st...
3 years ago

Why does fixing 'initialization of variable 'error' was never used;' result in a new error

Swift
I'm learning from a tutorial that I had to convert to the newest version of Swift. It went mostly well except that I'm stuck with a warning: "Initiali...
3 years ago

Increment integer in NSUserDefaults

Swift
Is there a more elegant way to increment a counter stored in user defaults? let defaults = NSUserDefaults.standardUserDefaults() defaults.setInteger(...
3 years ago

How to pass in a nil type into a paramter in Swift?

Swift
I am converting an iOS app from objective-c to swift. In the objective-c version of the app there was a method, AlertViewShow that gets called, and fo...
3 years ago

Swift: Make control buttons not move with camera

Swift
I'm building a platform game, and I made the camera follow the player when he walks: let cam = SKCameraNode() override func didMoveToView(view: SKVi...
3 years ago

Why is my Image not displaying images as I've specified - In Swift

Swift
So I have a PFQueryTableViewController where date is populated to it from Parse. I have a separate CustomTableViewCell.swift file which manages my cel...
3 years ago

Completion Handlers for Objective-C to Swift

Swift
I am currently rewriting a project from the Objective-C to Swift. Most of the project is done, but I am having problems translating a method that has ...
3 years ago