Swift is a powerful and fun language. Its protocol-oriented nature allows you to do retroactive modeling and promotes composition over inheritance. In this series of posts, I will share Swift snippets that I’ve used across projects that I feel are really helpful in rapid development.
Protocol-Oriented TableView and CollectionView in Swift
Working with the UITableView and UICollectionView is verbose and inconvenient; also the API’s are inconsistent with each other. In this post, I’d like to reconcile the two API’s and add some sugar to make it more pleasant to work with these commonly used controls.
Protocol Conformance Extensions in Swift
Swift is a unique language that has some revolutionary ideas. One of which is protocol conformance extension. This concept allows you to take an existing type and force it to adopt another protocol it never knew it existed before.
Creating Cross-Platform Swift Frameworks for iOS, watchOS, and tvOS via Carthage and CocoaPods
In this post, I’d like to show you how to create a Swift framework for iOS, watchOS, and tvOS and get them distributed via Carthage and CocoaPods. It’s a technique I use to share frameworks across all my apps and with the community.
Reading values from any plist file or bundle in Swift
It is convenient to keep your settings or default values in a `.plist` file or settings bundle for your project. In this post, we will explore how to attach an extension off the NSBundle class this make it super easy to read those values.
Getting Started with Swift Class Inheritance
Swift has a unique and elegant class inheritance system. In this post, I’d like to shed light on all the inheritance goodies in Swift, such as designated, convenience, failable, automatic, and required initializers. Not only are these powerful concepts, but they also enforce safe and intentful code.
Unit Testing in Swift, Xcode, and Beyond
Unit testing has a stigma of slowing you down while you’re trying to rock some code. The truth is unit testing doesn’t have to be so dry. Once you start flipping the script, unit testing can be an opportunity for refactoring, refreshing, and finding bugs. Besides, who wouldn’t want to see a bunch of green checkmarks next to their code?: A beauty […]
Updating Query String Parameters in Swift
Adding, updating, and removing query string parameters is a common use case, but very tedious. This Swift function will help make it easy and pleasant leveraging NSURLComponents.
Multidimensional Typed Arrays in Android Resources
Android has a convenient XML-based resources architecture that allows you to define strings, booleans, colors, dimensions, ID’s, integers, integer arrays, and typed arrays. Take this one step further by storing multidimensional arrays for complex objects.
Top 10 Swift-friendly CocoaPods
CocoaPods are a must for any serious iOS project. Why reinvent the wheel when the community has produced robust and feature-rich plugins? In this post, I’d like to highlight the best CocoaPods I’ve used in real-world project that are also Swift-friendly.
- « Previous Page
- 1
- 2
- 3
- 4
- 5
- …
- 9
- Next Page »