STEP 1: Pre-Planning
Before you start developing your app, there are some important decisions to make. You need to pick a great name for your app and choose the best category in the ios App Store. Without a well thought out plan, you’ll be very frustrated when it comes time to submit your app to the App Store.
The next step is to create a mockup of what your iPhone or iPad screen will look like while using the application. This is called wireframing and it’s an extremely valuable part of designing any iOS app.
A wireframe shows how users navigate through an app; however, they don’t show much about what information will be displayed on each page or view of an app (i.e. what the content will be). We use a tool called Balsamiq to create mockups and wireframes for iOS apps.
STEP 2: Designing the User Interface (UI)
Once you’ve got your design sketched out, it’s time to put some life into your app and start designing the UI of your application. There are many great tools that developers use when creating an iPhone or iPad interface such as Photoshop, Illustrator and Fireworks. For this tutorial we’ll be designing with Photoshop because I want to show you how you can add custom graphics (e.g., icons).
Creating rich media elements is also very important in order for any app to stand above its competition; however, when developing for iOS, you really need to focus on the UI of your app. You can use any graphics that you own or find online as long as it follows Apple’s iOS App Store Guidelines: http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG
When designing the UI we only need three screens for this app:
– Main Menu Screen (i.e., home page)
– User Details Screen
– Birthdays Calendar (list of birthdays)
You should design each screen and name all your views before moving on to Sketch 3; however, I’m going to save explaining how to wireframe an iPhone interface until Sketch 4 because we’ll be adding some complexity to our design then.
STEP 3: Sketching the UI
Now that we’ve planned out what we want our app to look like (i.e., wireframing), it’s time to sketch how each screen will actually look using Balsamiq Wireframes. This step may take up more of your time than you expect; however, don’t worry because you’ll save a ton of development time by doing this now and not at the end.
Here is a list of all the views and screens that we’re going to create:
– View Controllers
– View
I recommend adding every possible screen that your application could display before moving on to Sketch 4; however, I’m just going to show you how to create the first six screens (i.e., Main Menu, User Details, Calendar List and Detail) because they are the most important.
When creating your Balsamiq Wireframes make sure that you’re not putting too much detail into them; otherwise, it will be harder to switch views when designing your app with Sketch 3. The main purpose of this step is to identify all the elements that will be displayed on each screen or view in your application.
I used Photoshop for this tutorial because I wanted to demonstrate how you can easily add custom graphics (such as icons) to your design; however, if you prefer using vector-based software like Illustrator or Fireworks then feel free to do so.
STEP 4: Designing the UI in Sketch 3
Sketch 3 provides a way to quickly create and design iPhone apps using layers, icons, symbols and artboards. This is a very powerful tool for designing iOS applications because you can easily reuse layers across multiple screens for faster development time.
Now that we have all of our wireframes laid out in Photoshop, it’s time to put them into Sketch so that we can add some rich media elements such as icons and images. You’ll notice that when you add an image or icon to Sketch it will automatically create a symbol from the file; however, by default only one instance of this object will be used across your entire project.
In order for us to use more than one copy of each image or icon, you’ll need to convert the symbol into a group. This can be done by hitting enter (or return) and typing in “copy x of y”, where “x” is the number of times that you want an image/icon to appear and “y” is the total number of images/icons in your document; for example: “<Ctrl>+<Shift>+G”. Once you’ve got all your rich media elements added to Sketch 3 it’s time to add some depth and structure using Symbols.
STEP 5: Exporting Icons from Sketch
Designing with symbols allows you to easily reuse graphics across multiple screens; however, that doesn’t mean that we don’t need our Photoshop file anymore. As I mentioned earlier we need our Photoshop file to export all of the images that are being used by Sketch’s symbols.
The images that are being used in your app have two different requirements before they can be exported into your Xcode project:
– @1x size for retina displays (i.e., iPhone 4+)
– @2x size for non-retina displays (i.e., older iPhones)
You should always use an image editor like Photoshop or Fireworks in order to create images with retina display support because otherwise you’ll run into some nasty problems when running or testing your app on a device. Fortunately, exporting icons from Sketch is pretty easy once you know where to look;
however, if you’re having some issues then feel free to ask for help in the comments section below.
STEP 6: Wrapping up and exporting
Once you’ve got all of your master screens designed and added to Sketch 3 it’s time to explore Xcode more closely. In order for an iOS app to run smoothly, you need to carefully choose which elements will be displayed on each screen; therefore, I recommend that you take a few minutes and start sketching how each element will look on every screen using Balsamiq Wireframes before continuing on with this tutorial.
Layout – The most important aspect of designing any view is laying out its content correctly so that everything looks good when running on a real device.
Fonts – Use lots of fonts when designing your iOS app in Sketch 3 because you can use different fonts for each layer. This is very important if you’re trying to add some text to a button or any other view object because otherwise it will be hard to read.
Objects – Always add custom objects such as buttons and switches in Sketch 3 so that they look good on every screen; otherwise, Xcode won’t allow you to call them from your code .
Colors – Make sure that you change the colors of every object and layer so that they don’t look ugly or out of place in your design. You can even create color swatches using symbols; however, this feature isn’t perfect yet (fixed in the latest beta) but worth looking into .
As I mentioned earlier in this tutorial, exporting will be done in the next step so don’t worry about running or testing your app until you’ve finished with all of these steps!
STEP 7: Exporting
Remember when I told you to create one image for each app screen using Photoshop? Well now it’s time to go back into that file and export every layer/screen/object into a .png format. Once they’re exported, copy them into your Finder or Windows Explorer and navigate to the folder that houses the Xcode project which was created from your Sketch file. If you can’t find it then take a look at this tutorial again because it should be noted somewhere around here :-).
Once everything has been exported to the Xcode project folder it’s time to test your app using Xcode; however, be very careful because it’s easy to get carried away. Before you try running or testing your app make sure that all of the images/layers/objects are correct and aren’t out of place.
STEP 8: Fixing errors
If everything looks good then great job! However, this is where most people get frustrated with the process because it’s not quick or painless to fix any errors that might pop up . The reason for this isn’t because iOS development is hard but rather due to how Xcode works as a whole .
In order for me to show you how I would go about fixing those pesky issues, I need access to your Xcode project so that I can try and find the errors by switching between Sketch 3 and Xcode. Once you’ve agreed to share your project with me, please take a look at the following screenshots so that you know exactly what needs to be looked at .
As you can see in the screenshot above, there are some serious problems with the Game screen which need fixing before continuing with this tutorial. Unfortunately for us, it’s not always easy to identify these kinds of issues without actually looking at your design files; therefore, let’s go through each problem one-by-one.
The first step is to zoom out on every image/layer/object until they no longer appear pixelated or blurry. This usually happens when an image/layer is too large to fit on a specific screen so it’s sometimes hard to see the bigger picture.
The next step is figuring out what each object or layer is by looking at their name; however, if this method doesn’t work then I recommend searching through all of your Sketch files and finding one that looks like it could be of some help . After you’ve found something similar open up both Xcode and that new Sketch file side-by-side because you’ll need to constantly switch between them; therefore, make sure that they’re both visible at the same time.
AppDelegate
I assume that the issues with this file are due to an object which has been exported from Sketch 3 vice versa . To fix any problems with it, simply delete its name and then change the background color of both views to either blue or purple.
LaunchScreen
Now that we’ve fixed the launch screen we can finally fix the errors on this one . For some reason, there are three sections missing from this file which prevent it from looking right when you test your app in Xcode. Fortunately for us, fixing these problems isn’t difficult at all because all you need to do is add two images (from the previous tutorial) to each empty space in order to make everything look right again.
IBDesignable
The only problem with this layer/object is that it’s too small; therefore, you need to resize it so that it fills up most of screen . Unfortunately, you can’t see it in Xcode’s preview because the image is too small; therefore, it needs to be resized in Sketch 3 before transferring everything across.
The final issue that we need to fix is the color of the text inside both labels . If you open up your original design file then you should notice that there are two different colors present: one for “Moves” and one for “Remaining Moves”. In order to make this work correctly from within Xcode all you need to do is change them from black to white by right clicking on each label and selecting Fill/Stroke….
STEP 9: Compiling & testing in Xcode
Once everything has been fixed, congratulations! You’re just about ready to start testing your app in Xcode. Before you do, I recommend going through this checklist just to make sure that nothing else slips by unnoticed:
Did you transfer all of the images from Sketch 3? If not then fix those problems as soon as possible! Did you delete any files from your original design because they weren’t needed? If so, now is a good time to add those same files back into your project, except now they should be much smaller and easier to fit on a specific screen. Did you check for spelling errors or switch around some words during the transcript creation process?
It’s important that everything looks right because it’ll really help improve the final product! Is there anything missing from inside either file? They’re both quite basic but the last thing that we want is for someone to download/open up your app and then end up confused because something isn’t where it should be.
Did you fix all of the errors that I’ve mentioned? Great! Now you can finally move onto fixing any other error messages that might pop up during the compilation process . Unfortunately, this tutorial won’t cover how to fix each individual problem but I will say that most of them are due to images which need to be resized. If they don’t appear in your Design file at full size then you’ll need to resize them before transferring everything across; therefore, make sure this is done before testing out your app inside Xcode.
STEP 10: Testing
Testing on a device is one of the most important parts of the entire process because it’s really the only way to see how your app will actually work once someone downloads/purchases it.
After testing on my iPhone 6S, I’ve discovered some new issues which I’ll go over here:
The first problem is with the action button on both screens . Once you press it, everything seems fine but when you do so from inside Xcode then you can’t get back to either screen without deleting everything and starting again. To fix this, simply add a connector between each button and its respective label in order to make them connect with one another…. This next problem has nothing to do with the app itself;
instead it’s more about device compatibility. Since this app was created using a compact build, iPhone 6S users are likely to experience an issue where the action button is cut off on the main screen . The only way to fix this problem would be to make everything slightly larger which isn’t really possible without making other parts of the app look bad.
The final problem doesn’t have anything to do with bugs or device compatibility;
Instead it’s more about how this app works in general. Since I’ve designed it so that you must tap on either “Moves” or “Remaining Moves” in order for their respective counters to update. One can simply quit out after they’ve finished their first turn and reduce each by 100 points. This wouldn’t be an issue if both counters started at 1000 points per turn. But they don’t because I’ve set them to start at 500 so that the user has some incentive to play more than one round and thus get used to all of the buttons.
The easiest way for me to fix this problem would simply be by increasing each counter’s. Starting value so that it doesn’t matter how many turns a player takes before quitting out. Either way, their score will always go down by 100 points. However, there is also another possibility which could work just as well….
It’s possible that simply having a “Quit” button on the main screen would work. Just fine even though it wouldn’t change anything during gameplay. Although this option would force users to view the main screen before they can quit out. It would still be a minor inconvenience that would stop people from gaining an unfair advantage.
In conclusion
Testing on a device is always going to be the most important part of developing any app. Because it’s really the only way to find these kinds of issues beforehand…. Even if you’ve tested your app inside Xcode first and thought “This looks fine! How could anything possibly go wrong?”,
there will be times where something goes wrong outside of Xcode simply because you aren’t using a physical device. You should never take shortcuts when it comes to testing. Because having users download an app that doesn’t work. How it should defeats the entire purpose behind making apps in the first place…. Please leave any feedback or questions.