iOS has a built-in speech transcription system, which allows you to convert any audio recording into a text stream. It takes a few steps to configure, so let’s walk through them.... Continue Reading >>
Apple’s PDFKit framework provides a huge range of code to help us work with PDFs, and one of the most useful is
PDFView – it renders PDFs to the screen and lets users interact with them.... Continue Reading >>
PDFKit comes with a built-in class called
PDFDocument, which allows us to load and parse PDF documents. It’s used when you want to put your PDF into a
PDFView, but it’s also useful when you just want to read text from the PDF: you can loop over each page in the PDF, read its
attributedString property, then append it to an attributed string containing all the text from the PDF.... Continue Reading >>
You can get an instant Cover Flow effect on iOS by using the marvelous and free iCarousel library. You can download it from https://github.com/nicklockwood/iCarousel and drop it into your Xcode project fairly easily by adding a bridging header (it's written in Objective-C).... Continue Reading >>
If you use table views or collection views and you want to take one simple step to make your app both more attractive and more user-friendly, let me tell you what the pros do: we use
DZNEmptyDataSet. This simple, free, open source library is designed to handle the case when your data source is empty by showing some prompt text, and optionally also a button or an image.... Continue Reading >>
SwiftyJSON is a super-simplified JSON parsing library that gives you clearer syntax than the built-in iOS libraries (yes, even more than
Codable), and is free.... Continue Reading >>
Apple’s Quick Look framework lets you embed previewing for a huge range of file types, including iWork documents, Microsoft Office documents, PDFs, images, and more, all without writing much code.... Continue Reading >>
Any iPhones since the iPhone 7 are able to scan any NFC tags you have around, and it doesn’t take much work – iOS even provides default user interface for you.... Continue Reading >>
If you choose to index your app’s content using Spotlight (and you should), you can then use more Core Spotlight code to search your own index from inside your app.... Continue Reading >>
Apple’s PDFKit framework provides a huge range of code to help us work with PDFs, including a dedicated view for rendering thumbnails of PDF pages:
PDFThumbnailView. However, using it takes a little extra work because it doesn’t read PDF directly – you first load the PDF into a
PDFView, then connect that to the thumbnail view.... Continue Reading >>
PDFKit makes it easy to watermark PDFs as they are rendered, for example to add “FREE SAMPLE” over pages. It takes six steps, five of which are trivial and one which involves a little Core Graphics heavy lifting.... Continue Reading >>
CloudKit is Apple’s dedicated back-end service for your apps, allowing you to store user data and assets remotely entirely using Swift. It works similar to Core Data, although it’s much simpler in practice – you can save any kind of Swift data you like, and CloudKit takes care of the rest.... Continue Reading >>
About the Swift Knowledge Base
This is part of the Swift Knowledge Base, a free, searchable collection of solutions for common iOS questions, all written for Swift 4.
Take Swift further!
Your Swift skills let you make apps for macOS, watchOS, tvOS, and more, and for one low price you can learn it all with my Swift Platform Pack!