Tag: Xcode

Segue Actions

If you’ve been working with View controllers for a while, you’ve probably dealt with prepareForSegue. In Xcode 11, there’s a new way to handle this that makes a little more sense: Segue actions. Let’s take a look at this feature.   If you download the…

Refactoring

One of the core elements of clean code is having code that is consistent with identifiers. Head to the AppDelegate. Take a look at this code from the tip from last week. I have a few problems with it. I’m not being very consistent…

Replace Segmented Controls with Button Arrays

You’ve probably used the Segmented control before like this one It’s great for some simple uses but lacks flexibility. Besides using only text or single color icon, it doesn’t work in vertical or other arrangements. Let’s look at another solution: Using Button arrays.  In…

Fix Stack View Disasters

Learn how to take a disaster of nested stack views and untangle it into a great user interface.

Sliders as Knobs

You’ve seen other apps rotate views, but you may have no idea how to do it yourself. Let me show you one way to rotate views. We’ll make a simple knob control you might be able to use in your apps. Download the example…

The Settings Bundle

You’ll often want default settings that users can change. iOS provides the settings bundle for storing this information. Let’s look at how to use the settings bundle. Download the starter example file. I created a project which eventually will display the user’s default pizza….

Tip: Image Literals

iOS Development tips weekly is a series you can find at the Lynda.com and LinkedIn Learning libraries. The first week of a week’s tip will be available for free. After that, you will need a subscription to get access to it. Click the image…