Category Archives for UIView

Copy Xib To Storyboard

This post describes how you can migrate (or copy) a Xib file into a Storyboard and retain all the components and constraints. In a previous post, I demonstrated a strategy and demo app to migrate an

Continue reading

UIButton With Right Arrow Disclosure Indicator

This post demonstrates a UIButton with a right arrow disclosure indicator, and includes a demo app. Although this user interface paradigm is traditionally something you see for a UITableView, there are

Continue reading

UIStackView For Showing And Hiding User Interface Controls

Let’s take a look at a very useful feature of UIStackView: showing and hiding user interface controls. In an earlier tutorial, I demonstrated how to implement a custom edit button in each row for

Continue reading

UITableViewCell Subclass In Swift For Dynamic Cell Reuse

This tutorial demonstrates implementation in Swift of Dynamic Prototype cells for a UITableView using a custom UITableViewCell subclass. Before we get started, a refresher on what we mean by a dynamic

Continue reading

UITableView Blur Background Including Rotation Support

Let’s build a beautiful UITableView that has a UIVisualEffectView with a UIBlurEffect. Let’s also go further and avoid a common problem of the blur being offset from the underlying image

Continue reading

When To Set Constraint Priority Less Than 1000 – A Case Study

Have you completed an entire app without ever deviating from the default constraint priority of 1000? Let’s take a look at an example of when you can leverage the ability to lower the constraint

Continue reading

setNeedsDisplay And drawRect Explained

In my previous post, I explained the difference between setNeedsLayout and layoutIfNeeded. This post covers another related and important method of UIView, which is setNeedsDisplay. 29 March 2017: Please

Continue reading

setNeedsLayout vs layoutIfNeeded Explained

Let’s take a look at the difference between setNeedsLayout and layoutIfNeeded. This post will explain the difference using a concrete example of animating constraint changes. Before discussing both

Continue reading