Tag Archives: swift
Scroll UIScrollView to focused UITextField in Swift
I had a screen with multiple textfields embedded in a scrollview. When a textfield became first responder I wanted the textfield to scroll to the top of the view. I will explain the way I used to achieve this below, (there probably are other ways, but this way worked for me). The first thing that […]
iOS taking a screenshot programatically – using Swift
On a project I am currently working on I recently had to use one screen as the background of the next screen. In order to achieve this I opted to take a screenshot of the initial screen, save it as a UIImage and then set it as the background image of the next screen. public […]