Tags


Popular iOS-Coding Posts

Swift supports some pretty cool subscript operations, particularly in `for` loops. But what about `String` manipulation? Extensions to the rescue! Here you can find a Swift extension that lets you ...
Often times when you have some kind of a "Done" button in your view controller, you'll have logic where you want to resign the first responder. There are a few different approaches to this, such as (f...
One of the more common parts of web-based client/server app architecture is converting groups of strings into URL-encoded values that can be included in a URL or form data. It's a tedious process, and...
My iOS app version numbers conform to the format "1.2.3 (1004)", where "1" is the major version, "2" is the minor version, "3" is the patch version, and "1004" is the overall build number. "1.2.3" is ...
Here's a convenience String extension that will return a URL-encoded string based on the current string. [You can find the code for my extension on Github](https://github.com/coreyklass/common-swi...
On a `UIView`, you're able to set the `backgroundColor` property to change the background color of the view. This works, most of the time. Unfortunately, when you change the background color when t...
As of this writing, NSFileManager unfortunately doesn't have a Swift-native way of determining if the object at an NSURL is a file or a directory. You can call the `NSFileManager fileExistsAtPath:isDi...
Newer versions of Swift introduced the Selector convention ` #selector(ClassName.FunctionName()) ` to replace the old-style Objective C style Selector conventions. func makeButton() { let but...
I'm proud to introduce my first major iOS app, [BlackBook+](/blackbook). It's currently available for free in the iOS App Store, and is written almost completely in Swift....
MAY BE OUT OF DATE
The iPhone app I'm working on in my spare time lets the user capture photos as part of its functionality. After I receive the image, I need to resize it so that it's a thumbnail size. To make this...