Create a Paging Scroll View using NSLayoutAnchor and UIStackView

Josh KuehniOS, NSLayoutAnchor, Swift, UIStackView1 Comment

Today I wanna show you how to implement a Paging Scroll View programmatically using some cool AutoLayout APIs. You might be asking “Why do this programmatically?”. Truth is, you could do a mix of storyboard or completely in storyboard and get the same result.The reason is that in my next tutorial Adding a Parallax Effect to a UIScrollView using NSLayoutAnchor I … Read More

How to Guard your Secrets Using Git

Josh KuehnGitHub, iOS, SwiftLeave a Comment

Depending on how long you’ve been programming this might seem obvious, or odd. Recently, I’ve been playing with a few APIs and chose GitHub for version control. The problem is on GitHub (because I don’t pay) the code I push is public so how do I keep those API keys secret? The Swift community has a few answers to this … Read More

Optimizing Google Translation API calls for iOS

Josh KuehnAlamofire, API, iOS, SwiftLeave a Comment

Recently, I started working on an app that needed the ability to translate text to different languages. That meant looking and finding the right API. I settled on using the Google Cloud Platform Translation API because of its great documentation and assumed reliability. The catch is that it’s not a free service. Google will charge $20 per 1,000,000 characters it … Read More

Getting Started with NSLayoutAnchor (Swift 4.0)

Josh KuehniOS, NSLayoutAnchor, Swift2 Comments

Displaying views correctly on the screen can be one of the most frustrating parts of building apps. With the addition of more screen sizes, it’s not getting any easier. Thankfully, Apple is also offering us more ways to work with auto layout. Here I’m gonna take an introductory look at the an API introduced in iOS 9, NSLayoutAnchor. I’ll show … Read More

Ternary Conditional Operator

Josh KuehnIndie, iOS, Learning, SwiftLeave a Comment

Getting rid of if-else statements is what the ternary operator was made for. Once you learn about it you’ll be tempted to refactor all your code. But where would you look to refactor? I’m gonna take you through a quick example of what that looks like. Here’s a bit of ugly code that could be improved A LOT! We’re generating … Read More

Swift’s New #selector Syntax Sugar

Josh KuehniOS, Learning, SwiftLeave a Comment

The war between Swift’s strongly typed language features and stringly typed parameters took another blow with the release of Swift 2.2. Before Swift 2.2 you’d write code like this Now I don’t disagree that you and I are perfectly capable of coping and pasting the selectors name but that’s not the point. Swift is here to help reduce the amount of human … Read More

Getting Started with NSLayoutAnchor

Josh KuehniOS, Learning, Swift1 Comment

One of the most challenge parts of creating any app is figuring out how you’re gonna lay out the views on a screen. With the addition of more screen sizes it’s not getting any easier but thankfully apple is also offering us more ways to work with auto layout. Here I’m gonna take an introductory look at the new API … Read More

What are Classes, Structs, and Enumerations?

Josh KuehnIndie, iOS, SwiftLeave a Comment

The aim of this post will be to broadly cover topic of WHAT are classes, structs, and enumerations. I won’t be going into how or when to use them but simply how they fit into programming. I’ll be explaining why they’re used and what purpose they serve when creating a program.

How to Use Protocols and Optionals to Reuse TableViews

Josh KuehniOS, Learning, SwiftLeave a Comment

As a developer one of the core concepts I’ve picked up on is the importance of reusability. You should NEVER write the same line of code twice! Programming is a constant battle against complexity and that means a healthy balance between readability and fewer lines of code! Here I’ll show you how I’ve taken it a step further by reusing … Read More