Just last week, I was talking with a friend who was asking for advice on how to architect his iOS app. He wanted to know the best way to do it, and we came up with a few approaches that seemed appropriate. We never did decide on which would be best, so he asked, “how do you normally decide which …
How to get an image to fill an image view – without any clipping
Let’s say you have an image view that fills the entire screen. The screen size varies by device, and therefore, so does your image view. So how do you display an image that fills the screen as much as possible without any clipping? Start by dropping the image view onto your view. Drag an image view from the Object library …
Why you should sketch out your app before you ever open Xcode
As a developer, it’s easy for me to come up with an idea for an app and jump right in to Xcode to start building it. Maybe this is how you work, too – perhaps it’s part of the “developer mindset.” But I’ve learned that this isn’t the best way to actually ship apps – it’s much easier to build …
Should you use Storyboards on more complex apps?
Storyboards are a quick and easy way to start building a simple app. But should you use Storyboards on more complex apps? Or on a team? What are the pros and cons of using them? Do experienced iOS developers use them? Are any mainstream apps built with Storyboards? Let’s start with the simplest questions and move on to the more …
“Can I instantiate multiple instances of the same view controller from a Storyboard?”
You can use instantiateViewControllerWithIdentifier to instantiate multiple instances of the same view controller programmatically from a Storyboard. Each time you call this method, you get a new instance of the view controller. So, for example, if you have a “WebViewController” defined in your Storyboard, you could do the following: let storyboard = UIStoryboard(name: “Main”, bundle: nil) let vc1 = storyboard.instantiateViewControllerWithIdentifier(“WebViewController”) …
Top 10 tools I use to build iOS apps
My editor of choice for iOS development is Xcode. I’ve tried AppCode, too, and while it has some nice features, I just can’t get over the fact that it doesn’t look and feel like a native app on OS X. So in addition to Xcode, these are the top 10 tools I use as I build iOS apps. 1. Alfred …
Land an iOS job by focusing on relationships
A few years ago, I was just getting started with contract iOS development, and barely scraping by. I needed more income and more work, but I didn’t really know how to find it. Then I had a stroke of good luck. Kevin, a friend of mine, asked me if I was looking for work. One of his former coworkers – …
The easy way to dismiss the keyboard in iOS
If you want to dismiss the iOS keyboard programmatically in your app without worrying about which view is the first responder, try the following: Approach #1: Using the Responder Chain In Swift: UIApplication.sharedApplication().sendAction(“resignFirstResponder”, to:nil, from:nil, forEvent:nil) In Objective-C: [[UIApplication sharedApplication] sendAction:@selector(resignFirstResponder) to:nil from:nil forEvent:nil]; This will resign the first responder (and dismiss the keyboard) every time, without you needing to …
What skills would I need for a job as an iOS developer?
Want a job as an iOS developer? Here are some of the skills you’ll need – or, rather, what you’ll need to be able to do with your skills – to land a job as an iOS developer. These are all specific to iOS and the Cocoa Touch frameworks – in addition to these, you’ll also need to know object-oriented …
iOS Essentials: UITableView
Table views are everywhere in iOS. See a list in an app? It’s probably a table view. Social feeds. Recipe ingredients. Historical data. To-do lists. Settings screens. Shopping carts. Favorites and bookmarks. Navigation directions. Reading lists. Playlists. Schedules. Lists are everywhere in iOS, and table views are what they’re made of. For specific examples, look no further than Apple’s own …