When building User interfaces for mobile, we constantly have to juggle responsiveness of the app and actual work that needs to be performed as a result of a particular user interaction. An example of this is a search functionality that queries a remote server, and displays the results in a table view. In this post, we will use the concept of a debouncer to keep the app responsive, while ensuring that we make as few requests as required to retrieve up to date search results for the user.
Recently I was working on a personal dictionary for Japanese. The Japanese
language comprises three different syllabaries that are used in different contexts. I needed
a robust search that could find a words represented in any of these syllabaries. In this post, we will see how the
String API provides us with enough functionality to do this.
When creating an app that requires information from a user, chances are you use one or more textfields. If we have multiple fields embedded in a scroll view, we want to ensure that the contents of the scroll view do not become inaccessible when the system keyboard is displayed for the user to fill out a field. In this post, we investigate how to handle keyboard presentations in a modular way.
When multiple operations that modify a shared resource are performed concurrently, there is always a risk of losing data integrity. In this post, we are going to create a means of ensuring thread-safety using Grand Central Dispatch (GCD).
Last week, I needed to implement a resizing functionality for a modal displayed on iPad using the
formSheet modal presentation style. Basically,
We had a navigation controller presented modally, and needed a way to expand the modal to fill the screen or remain the default
formSheet size based on what View Controller was being displayed.
Over the past few weeks, I have been doing some work involving rewriting a ton of obj-c code into swift. Ever since I watched the WWDC video on Protocol Oriented Programming, using protocols and value types (a.k.a structs) in place of classes has always been my go to. This week I encountered an interesting problem that spawned as a result of entangling protocols (which, in my opinion, were designed to provide functionality mainly for value types) with class inheritance. Before I get deeper into my observations, It might be a good time to give an intro to protocols.