Category: Swift

SIGTRAP: Decoding A Cryptic Objective-C + Swift Crash

In 2015, Raizlabs switched over to Swift for all iOS development. The move has been rewarding; Swift’s commitment to type safety and optional handling decreased our overall defect and crash rates (and increased developer happiness.) While this increased safety is awesome for Swift-only apps, it can introduce some hiccups in legacy Objective-C + Swift hybrid […]

Read More

A table showing a summary of the interactions between reference types and modifiers and their effect on Swift method dispatch.

Method Dispatch in Swift

Method Dispatch is how a program selects which instructions to execute when invoking a method. It’s something that happens every time a method is called, and not something that you tend to think a lot about. Knowing how method dispatch works is vital when writing performant code, and can illuminate some of the confusing behavior […]

Read More

Introducing RIGImageGallery

RIGImageGallery is a component from the Raizlabs Interface Guidelines, which is a set of UI components that offer sensible defaults to help a project get off the ground quickly and feel native to the platform, and with easy-to-use customization options. RIGImageGallery is designed to display a gallery of images with the expected behaviors established by […]

Read More

A desk with a computer, pen, and other tools.

Tools We Love – iOS and Android

This time of year is often associated with greeting cards and chocolate, but the team at Raizlabs is showing the love by opting out of flowers and into sharing our favorite tools. We love developing impactful products that change lives. Our favorite tools help us spend more time writing code, and less time in the […]

Read More

Spicing up xcode

Spicing Up Xcode

At the third Raizlabs Lightning Talks, I ate a Scotch bonnet pepper and presented 13 tips and tricks about Xcode. If you missed the talk, or wanted to know about one of the slides in more detail, here’s a video and a written version of everything I mentioned, plus a few extras. Spicing Up Xcode was inspired by […]

Read More

computer with typing image

XCTest and Optional Unwrapping

XCTest is the default test harness on iOS and Apple’s other platforms. It provides support for organizing test cases and asserting expectations in your application code, and reporting the status of those expectations. It’s not as fancy as some of the BDD frameworks like Quick and Cedar, but it has gotten much better than it used to be, and is my […]

Read More

computer code and notebooks

Localized Pluralization with Stringsdict

It’s harder to create user-facing strings that contain numbers than it should be. This post should make it easier, with tips on localization and pluralization. This post is not about all the good reasons to do localization (l10n) and internationalization (i18n). For that, I recommend the following excellent posts: Mattt Thompson on NSHipster Josh Johnson on Objective […]

Read More

UIStackView Demystified

UIStackView was released to the public with iOS 9. It is a container view that internally handles layout of its subviews. The layout can be configured by changing its properties axis, distribution, alignment, and spacing. It lets you remove tedious NSLayoutConstraint setup code. Below is a very simple implementation of a UIStackView that contains 4 […]

Read More

IB Free In Practice Logo

IB Free in Practice 1: Managing a Modal

This series of blog posts will provide examples of how we develop Swift applications without IB and demonstrate some general strategies for app architecture. For this first post, I’m going to cover presenting and dismissing a modal view controller over a home view controller. Even though the example is relatively simple, I am going to […]

Read More