Category Archives for NSLayoutConstraint

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

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

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

How To Access Storyboard and Xib Constraints in Code

A reader commented on a previous tutorial about not having realized that you can access a constraint (NSLayoutConstraint) in code just like you can any UIKit component such as a button or label. Let’s

Continue reading