Generating a PDF file from UIScrollView content

After taking a short break, I decided to get back to writing by covering an interesting problem that I had to work on in the recent past. I had to generate a one page PDF file that contained content presented in a UIScrollView. PDF file generation process The process of generating a PDF file using UIKit’s built-in functions is quite straightforward. The code for generating...

Finding the custom URL scheme of an iOS app

I was recently hired to find out if an app has a custom URL scheme. Using the URL scheme the developer would be able to implement deep linking and launch that app from his own app. The process of finding the URL scheme was quite simple, so I decided to write a tutorial on how to do it. Downloading the IPA of the app There...

Storing NSAttributedString with UIImage in Core Data

I have recently worked on solving a bug in a simple note-taking app. It allowed the user to save notes that could contain text together with images. The app was built using Core Data and there was a bug where notes that contained images were not saved properly. When the notes were later retrieved, the images were missing and only text was present. Converting NSAttributedString...

How to add Carthage support in existing CocoaPod project

I’ve finally found some free time to review the contributions on AHDownloadButton repo and prepare a new release. Before releasing a new version I wanted to add support for Carthage, because the project is currently only supporting CocoaPods. Carthage is a great lightweight dependency manager and if you haven’t used it yet, I suggest you read up on it on. Even though I’ve used Carthage...

Determining the content size of a WKWebView

In one of my recent projects, I had to use a web view to display an HTML string with local CSS and custom font. The web view had to be embedded inside a scroll view along with a couple of other views. It also had to have a height adjusted to the content it was displaying. My goal was to create something like this: I...