A iOS11 / Swift 4 / xCode9.1 updated version of the "TouchCanvas" iPad Pro sample code.
TouchCanvas illustrates responsive touch handling using coalesced and predictive touches (when available) via a simple drawing app. The sample uses force information (when available) to change line thickness. Apple Pencil and finger touches are distinguished via different colors. In addition, Apple Pencil only data is demonstrated through the use of estimated properties and updates providing the actual property data including the azimuth and altitude of the Apple Pencil while in use.
Xcode 9.1 iOS 11.0 SDK, Swift 4