Using a RefreshControl to Reload a WKWebView

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 web page rendered in a WKWebView. Read more on Using a RefreshControl to Reload a WKWebView…

How to Dim the Background of a Popover on iOS

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 post, I’ll show you how you can dim not only the view behind the popover, but also the status and navigation bar. Read more on How to Dim the Background of a Popover on iOS…

Swift Tool Belt, Part 8: Extending UIButton with Background Color for State

The eighth item in my Swift Tool Belt is an extension for UIButton. This extension adds a bit of functionality that is sorely missing from UIButton, giving you the ability to set the background color for different button states.
Read more on Swift Tool Belt, Part 8: Extending UIButton with Background Color for State…

Swift Tool Belt, Part 7: Extending UIBarButtonItem

The seventh item in my Swift Tool Belt is an extension for UIBarButtonItem. This extension will add a couple of inspectable properties to help you set accessibility properties from Xcode’s interface builder. They also add the ability to hide a bar button item.
Read more on Swift Tool Belt, Part 7: Extending UIBarButtonItem…

Swift Tool Belt, Part 5: Adding a Gradient UIButton

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. Read more on Swift Tool Belt, Part 5: Adding a Gradient UIButton…

Swift Tool Belt, Part 4: Extending UITableViewController

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. Read more on Swift Tool Belt, Part 4: Extending UITableViewController…

Swift Tool Belt, Part 3: Extending UILabel

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 and IBInspectable for easy modification from Xcode’s Interface Builder. Read more on Swift Tool Belt, Part 3: Extending UILabel…