Articles tagged with 'UIKit'

  1. UIFont Updates in iOS 17
  2. 7 Jun

    Typography is a key design element across all Apple platforms, supported by customised fonts that are included specifically for user interfaces across iOS, macOS, watchOS and more. Starting with the San Fransisco typeface introduced in iOS 9, Apple has iterated on the standard font to include support for compressed and expanded variants, as well as introduced new typefaces to support monospaced, rounded, and seriffed fonts. As well as different visual styles, Apple platforms have a set of built in semantic font types, allowing fonts to be chosen based on their purpose, rather than specific point sizes. This allows fonts to automatically update to match the user's preferred text size settings - a feature known as Dynamic Type. It is this feature that has seen an update in iOS 17. Read more…

  3. Blazingly-fast User Interface Testing for Fun and Profit
  4. 31 Oct

    The user interface is the only part of your app that your users actually see and interact with, therefore it is important to make sure that it works. The world's greatest networking layer or expertly crafted data-storage solution will all be for nothing if your UI is broken. Despite this, view testing is often overlooked by developers, and for good reason - it can be far easier said than done, particularly given the tools specifically provided to do it. Today we will explore a solution that makes testing your UI quick and simple, using the tools you already use for testing the business logic of your app. Read more…

  5. Recreating the iPadOS Settings App Navigation Bar Style
  6. 4 May

    With the release of iPadOS in 2019, Apple confirmed their commitment to treating the iPad as a serious computing platform in its own right. Additions to the user interface such as slide-over and split-view multitasking, App Exposé, redesigned sidebars, and Multi-Window UIs all demonstrate how Apple is focussed on transitioning iPad from a content consumption device to a "traditional computer" replacement for many users. As their technical underpinnings are identical, iPadOS is primarily differentiated from iOS via changes to the user interface of the operating system. Read more…

  7. Fixing Multi-Level UINavigation​Controller Menu Layouts in UISplitView​Controller on iOS 14
  8. 20 Jan

    With the release of iPadOS 14, Apple introduced a new sidebar style for app navigation, designed to provide quick access to top level collections of application content. Sidebars allow users to quickly navigate to the data that they care about, and also provide a user interface that easily adapts to macOS when built using Catalyst. Building a sidebar-style app starts with using a UISplitViewController, so let's begin by taking a look at the new APIs added in iPadOS 14 to facilitate this new kind of app design. Read more…

  9. Advanced Multi-window UIs on iPadOS with Drag & Drop and State Restoration
  10. 2 Jan

    WWDC 2019 saw the introduction of a new operating system - iPadOS - for iPad. The first features of iPadOS listed on Apple's webpage that distinguish it from iOS are Slide Over, Split View, Apps in Multiple Spaces, and App Exposé. All of these features are powered by iPadOS's multi-window user interface, and today we are going to explore how to leverage these features in your apps using the powerful new "scene" APIs introduced with iPadOS. You will see that with a relatively small architectural change, your app will benefit from multi-window support. With a little bit more work, your app can support multiple scenes to support the various different workflows of your power users. Let's get started! Read more…

  11. Simplifying UICollectionView Usage With UICollectionView​DiffableDataSource
  12. 11 Dec

    Both UICollectionView and UITableView received significant updates at this year's WWDC, one of which was a new way to supply said views with the data that they display. This new data-providing functionality is afforded by two new classes - UICollectionView​DiffableDataSource and UITableView​DiffableDataSource. Most of the examples of using these new classes that Apple focussed on emphasised the benefits that apply to particularly complex collection and table views where the data being displayed is frequently changed, which in the past has been a source of headaches for developers when trying to update the view to match the new data. However, we also get worthwhile improvements to our code when using UICollectionView​DiffableDataSource for simple collection views whose data isn't frequently updated in complex ways. Read more…

  13. Synchronising CALayer and UIKit Animations
  14. 26 Nov

    When building custom views on iOS with advanced and complex animations, we often have to delve in to the lower-level CALayer and CAAnimation Core Animation APIs in order to gain full control over the animations that are produced. However, the drawback of this approach is that it means our animations exist outside of the bounds of UIKit's animation API, meaning our custom views cannot be animated using UIKit's simpler block-based animation API. Instead, we have to provide separate functions on our views to allow the calling code to trigger the animations that we have provided. This adds an extra layer of complexity to our custom view's API, and makes it difficult to synchronise animations between different views. Read more…

  15. UIFontDescriptor​.SystemDesign
  16. 7 Nov

    As of late, Apple has been making use of a wider range of fonts in the apps that it ships with iOS than it has in previous years. This began in iOS 12 when support for Apple Card was introduced in the wallet app. A rounded type face, similar to that used on Apple Watch, was used in several places throughout the UI. Read more…

  17. Supporting Dynamic Type with Custom Fonts on iOS
  18. 19 Oct

    One way in which designers look to imprint branding on an app is to use a custom typeface throughout the user interface. Whilst this can give an app a distinctive look, it often comes at the expense of accessibility. This is because a key element of iOS's support for visually impaired users is the Dynamic Type system, which allows users to increase or decrease the size of text rendered across the system. Whilst it is easy for apps to support Dynamic Type when using the built-in system typeface, doing so with a custom font requires additional dev effort which is all to often overlooked. Read more…

  19. iOS Dynamic Type Without the Dynamism
  20. 10 Oct

    Back in 2013 when Apple released iOS 7, they introduced a typographical system of semantically named fonts that allows app developers to produce text in their apps that is sized and weighted appropriately for any given context. Apps can specify what the text they display represents (a heading, title, body text etc) and iOS vends an appropriate font for the job. Read more…

  21. Supporting 3D Touch Application Shortcuts
  22. 4 Mar

    As discussed last week in Supporting 3D Touch "Peek and Pop", implementing hardware specific features is a great way to differentiate your app and support the iOS ecosystem: Read more…

  23. Supporting 3D Touch "Peek and Pop"
  24. 26 Feb

    Supporting specific hardware features that ship with iOS devices is one of the primary benefits of developing completely native applications. By taking advantage of the latest hardware that Apple ships you make your app in to a first-class citizen on the platform. When more applications take the time to utilise these new hardware components it acts as encouragement for users to upgrade their devices, which supports the whole iOS ecosystem. It is also a great way to make your applications stand out from the competition. Read more…

  25. Modern View Layout on iOS 9
  26. 7 Jan

    In iOS 6 Apple released Auto Layout, which gave developers a declarative API for laying out user interfaces, saving us from hours of laborious and bug-prone setFrame: coding. Since then, Apple has added complementary technologies such as Size Classes and UIStackView to aid the development of adaptive user interfaces (see Adaptive User Interfaces with UIStackView). Developing interfaces that adjust gracefully to different sized devices as well as features like Split-Screen Multitasking would be practically impossible without Auto Layout, therefore any modern approach to developing user interfaces must be based on Auto Layout. Read more…

  27. Unit Testing with UIGesture​Recognizer
  28. 30 Dec

    With Xcode 7, Apple introduced UI Testing to make it easy to add black-box user interface tests for our apps. While these allow us to automate much of our UI testing, the black-box nature of this environment means that we cannot test the underlying code in our applications while running these kinds of tests. If we want to do that, we need to rely on good old-fashioned unit tests. Read more…

  29. Adaptive User Interfaces with UIStackView and UICollectionView
  30. 17 Dec

    Starting with iOS 8, Apple began encouraging developers to build "adaptive user interfaces" - interfaces that can happily scale from the iPhone 4s all the way up to much larger devices like the recently released iPad Pro. Technologies like Auto Layout made creating scalable interfaces much simpler, and iOS 8's UITraitCollection finally decoupled the device type (iPhone or iPad) from deciding how to layout an interface. With iOS 9, Apple introduced a new view class called UIStackView, which radically simplifies common layouts that would usually be accomplished with boiler-plate Auto Layout Constraints. This new view makes creating and maintaining interfaces much simpler as the nuts and bolts of Auto Layout are hidden away and the UI is described in a much higher-level, declarative manner. UIStackView also allows us to easily change our layout in order to be adaptive to size changes, as I will demonstrate with a small sample project that you can download here. Read more…