When you use the WKWebView control to render a web page in your iOS application, it doesn’t come with the usual browser controls that users may expect. It renders the webpage without a toolbar or functions like Back, Forward, or Reload. I’m going to show you how to use the iOS UIRefreshControl to reload a […]
As I age, my ability to see small text on my iPhone gets worse. The Dynamic Type feature allows iPhone users to make the text larger on their iPhones. In this blog post, I will show you how to get Dynamic Type to work with a static UITableView.
The design for a recent project called for the contents of the popover view to be emphasized prominently. Specifically, the design wanted all the views behind the popover to be dimmed. By default, iOS will put a radial gradient around the popup to draw attention to it, but I needed something more. In this blog […]
When you create a new project in Xcode, you’re given the option of including two types of tests: Unit Tests and UI Tests. But I’ve often wished that these two weren’t mutually exclusive. There have been times when I’ve wanted to test UI components in isolation, but I wasn’t sure how feasible it was, or […]
On a recent project, I had to add a gradient background to a UINavigationBar. At first, I thought it would be easy, but I soon discovered a problem when I rotated my device to landscape orientation and the gradient on the navigation bar did not resize.
The fifth item in my Swift Tool Belt is a class derived from UIButton that will draw your button with a gradient background. It will also expose the colors of your gradient in the attributes inspector of Xcode and render the gradient button directly in your storyboard.
.NET Core makes it convenient to develop and test C# code across platforms. On my current project, this means we can do much of our work on Macs without ever firing up a Windows VM. Even the best abstraction layers occasionally leak, though. Here’s a story of an OSX-specific issue we encountered, what we learned, […]
I recently had my first run-in with the UIAppearance infrastructure that has been built into iOS for, admittedly, a long time. Given my experience with CSS, I brought along some assumptions of how appearance(whenContainedInInstancesOf:) would probably work. Naturally, these assumptions were very wrong.
The fourth item in my Swift Tool Belt is an extension for UITableViewController. A UITableViewController is a view controller with a table view that takes up the entire screen. My extension provides a couple of methods to resize the header and footer of a table view.
The third item in my Swift Tool Belt is a couple of extensions on UILabel. These extensions will allow easy access to modify the edge insets on a label (the extra padding all around the text). There’s also an extension to add a rotation transform to a label. All of these extensions will be IBDesignable […]