Ios Development

iOS Development

Using WebKit to call WKWebView Javascript from Swift and Swift from Javascript

Many mobile applications incorporate remote web pages, either as passive (static) content — or as in this case as integral parts of the UI. Using the WebKit/WKWebView techniques presented here, your native apps can be better integrated with web content and provide a superior experience to end-users. Two-way Integration between Swift and JavaScript In this article we’ll […]

Read More
iOS Development

Understanding UI Testing using iOS, Xcode 9 and Swift

Xcode provides a fully-featured, scriptable UI Testing framework. A key to using the framework is understanding its architecture and how to best leverage its capabilities. Understanding an Xcode UI Test When you create a new project in Xcode, the new project wizard asks if you’d like to Include Unit Tests, and whether you’d like to Include […]

Read More
iOS Development

Using Face ID to secure iOS Applications

Biometric security like Face ID and Touch ID help make iOS mobile devices more secure and convenient for users. These technologies can also be used by 3rd-party applications. Touch ID Roots In 2013 Apple introduced a new, biometric means to unlock its mobile devices using a fingerprint sensor incorporated in the home button — Touch ID. Prior to […]

Read More
iOS Development

Configuring a UIScrollView in a Storyboard — with no code!

A delicious developer recipe for setting constraints on Storyboard views to serve up a proper scrolling view for iOS applications. Introduction Configuring a UIViewController with a scrolling content view can be confusing, and — frustratingly — scrolling views usually don’t really work at all until all their constraints are perfect! To understand how to setup a scrolling UIView within […]

Read More
iOS Development

Creating an iOS Chat Bubble with Tails in Swift — the easy way

Virtually everyone who’s used an iOS device has used the iMessage application to send and receive text messages to other iOS users or non-iOS users via SMS. This tutorial will teach you how to create the familiar chat bubble with tail UI element used in the built-in Apple Message application. This tutorial was created using […]

Read More
iOS Development

How to create a static UICollectionView

UICollectionView doesn’t support static content layouts as its sibling UITableView. There is a way to simulate it though, and this article will walk through how to do just that. Tutorial objectives When using a UITableView, we have a choice of either creating a table with static cells or to create cell templates that are used to […]

Read More
iOS Development

Benchmarking Xcode Builds

I recently started working with a fairly large iOS/Swift code base — one which takes several minutes to complete a full build from a clean folder. Since I have several macOS workstations on-hand, I naturally was curious how they compare in my most common use case — developing Swift iOS applications. Is there one that would give me less […]

Read More
iOS Development

Using the System Font Efficiently in iOS

Often an app designer specifies custom fonts out of a perceived need for uniqueness, but very often the built-in iOS system font is entirely appropriate. One advantage of the system-provided font is how simple it is to load them from code. Here’s how to do it: Call systemFontOfSize When using the system font, call the […]

Read More
iOS Development

Testing whether a view is currently visible

When manipulating iOS UI from background threads, or in response to NSNotification messages, you won’t always be sure that the view your controller is working with is on-screen. How can you check? Relatively easy. Here’s a simple check from within the context of a View’s ViewController: if self.isViewLoaded() && self.view.window != nil { // do something […]

Read More
iOS Development

Facebook login using the iOS API with Swift

A common requirement for consumer mobile apps is to allow users to authenticate with their FaceBook credentials. Let’s explore why, and then go ahead and make the integration with iOS and Swift Why use Facebook authentication? Why would we want to use Facebook auth instead of providing our own authentication database? Really it boils down to […]

Read More