Using Dynamic Type With Web Views

Sometimes it is convenient to use a web view to show some static HTML content in an iOS app. If you have adopted dynamic type elsewhere in your app it can look odd if that text does not also respect the user’s choice of content size. Luckily there is a way to use dynamic type when displaying text in a web view.

Read On →

Easier Swift Layout Priorities

Working with the priorities of Auto Layout constraints can be a bit of a pain with Swift. You often just want to set a priority that is one more or one less than some other priority. Unfortunately the strong type safety of Swift means you cannot just treat the priority as a number the way you could with Objective-C.

Read On →

Updating Strings For Swift 4

Another year passes and another set of changes to the Swift String API arrives. Swift 4 brings some much needed improvements and simplifications to String. These are my notes on what I needed to change to update my Swift String Cheat Sheet for Swift 4.

Read On →

Supporting iPhone X

When Apple revealed the iPhone X with a top “notch” and bottom home screen indicator the reason behind some SDK changes at WWDC 2017 became clearer. Safe area layout guides may help but there are still some gotchas for table/collection views and the search bar.

Read On →

Xcode 9 Vector Images

Apple added PDF vector images to the Xcode asset catalog in Xcode 6. It is a convenient way to build the image assets at 1x, 2x and 3x resolution without the pain of manually creating each file. What it did not do was give you truly scaleable vector images. Stretching an image above its base size left you with some ugly, fuzzy results.

That changes with Xcode 9 with the possibility to keep the vector data and scale images at runtime. It also adds some accessibility improvements which work well alongside dynamic type.

Read On →
Archives Categories