Pinterest Stumbleupon Whatsapp
Advertisement

If you want to try your hand at creating iPhone apps, there are a few different programming languages How To Pick A Programming Language To Learn Today & Get A Great Job In 2 Years How To Pick A Programming Language To Learn Today & Get A Great Job In 2 Years It can take years of dedicated work to become a truly good programmer; so is there a way to choose the right language to start from today, in order to get hired tomorrow? Read More you can learn. But only one of them was created specifically for iOS: Swift. Apple built this language from the ground up for making macOS, iOS, watchOS, and tvOS apps. And it includes a number of features that make it great for beginning programmers.

If you want to try learning and coding with Swift, the best way to do it is through a project. You can read specs all day, but actually using the language to build an app is the most effective way to learn. These projects will help you get started and teach you some really useful skills along the way.

Getting Acquainted with Swift

Swift borrows ideas from a wide range of other programming languages, but is most similar to Objective-C. In fact, you can mix Swift and Objective-C in your code, and your apps will still work. However, Swift was designed to be concise, making it a bit easier to learn and more efficient to use. It’s also harder to derail with coding mistakes, another factor that makes it good for beginners.

swift-logo

For the tutorials listed below, it’s good to have some basic programming knowledge The Basics Of Computer Programming 101 - Variables And DataTypes The Basics Of Computer Programming 101 - Variables And DataTypes Having introduced and talked a little about Object Oriented Programming before and where its namesake comes from, I thought it's time we go through the absolute basics of programming in a non-language specific way. This... Read More , but very little is necessary. You can read Apple’s introduction to Swift if you’d like to get the basics down before you get started. But you can also jump right in and you shouldn’t have much trouble.

What You’ll Need

To get started, you’ll need a Mac with the latest version of Xcode and Swift. You’ll also want the iOS SDK. Beyond that, all you need is some patience and a willingness to learn!

Advertisement

Walk Through the Basics

Apple’s Swift Playgrounds app turns your iPad into a great place to learn to code! No coding knowledge is necessary to get started; even kids can learn to code 10 Tools To Get Kids Excited About Programming 10 Tools To Get Kids Excited About Programming For the average kid, computers and smartphones are fun tools. Education comes much later. Getting a kid excited about programming might take some doing because logic needs a bit of time to develop. It is... Read More with this app. Challenges, templates, live code previews, and Quick Type suggestions make this a great way to get up and running fast. The 3D world is a lot more compelling than looking at a text document, too. And it’s free! This is definitely the best place to get started if you have little or no coding experience.

Build an Image Viewer

hacking-with-swift

This sounds complicated, but it’s meant to be a beginner-friendly tutorial, and Hacking with Swift is great about including a ton of detail to help you understand what you’re doing. The tutorial leads you through loading images, designing an interface, and everything else you’ll need to know. Because it’s designed for beginners, it starts at the very beginning, with how to open a new project in Xcode.

Fire Up a Stopwatch

swift-stopwatch

A stopwatch doesn’t sound very exciting, but this tutorial is great for Swift beginners. It’s also built for iOS 10, so you’ll get to see the latest features of Xcode and Swift. In addition to Swift code, you’ll also get a good dose of using Xcode’s visual tools. These can be invaluable in learning to code and are a huge benefit of using Swift.

Touch and Drag Shapes

shapes-swift-tutorial

Whether you want to built regular apps or games, it’s a good idea to understand how manual interactions with your app will work. This is a very simple tutorial that displays a screen full of colored squares. Each square can be dragged by touching the screen. That’s all there is to it. But you’ll see some of the functions required for this type of action, and that’s going to come in handy when you’re developing your own app.

Build A Tetris Clone with Swiftris

swiftris

This tutorial from Bloc will help you use Swift to build a version of Tetris 30 Years Of Tetris: A History Of The World's Most Beloved Puzzle Game 30 Years Of Tetris: A History Of The World's Most Beloved Puzzle Game This year, 2014, marks the 30th birthday of Tetris. In remembrance of its history, join me as I explore the past and future of the world's most famous puzzle game. Read More . It’s more involved than the previous projects, and there are a few places where the code isn’t explained quite as clearly as it could be. However, all of the materials required are given to you in this tutorial, and the inclusion of screenshots and videos makes it easy to follow. And be assured that, although you have to enter your email address to get access, the whole thing is actually free.

Play War

card-game-war-swift-app

Chris Ching has put together a 15-part series that will take you from the very basics, like an introduction to Xcode playgrounds, all the way through creating an app that lets you play the card game War. By the end of the series, you’ll understand a lot of programming concepts, some of the unique things you need to know about working with touch interfaces, and how to use images in an iPhone app. (Scroll down to the bottom of the linked page to get to the tutorials.)

Make a Ninja Game

swift-ninja-game

This is the most complicated tutorial here, but you’ll be glad you went through it. The game uses SpriteKit, a 2D game-building toolkit that’s used for many iOS games. With the kit, you’ll use assets, create actions, and establish win and lose conditions. It’s pretty complicated, but explained well. If you’re feeling confident, go ahead and build your own game!

Identify Your User

touchid-swift

TouchID is one of the really cool things that comes packed with every new iPhone. Many apps are secured by TouchID (it’s especially useful in mobile banking apps Could Your Mobile Banking App Be a Big Security Risk? Could Your Mobile Banking App Be a Big Security Risk? Mobile banking apps bring convenience to your phone, but could they be a security risk? Banks tend to have pretty solid data security, but how secure are their mobile apps? Read More ) and learning how to take advantage of it can save your users a lot of time when it comes to entering usernames and passwords. This tutorial shows you how to check for TouchID compatibility, authenticate your user, and offer a password screen if they fail.

Make a Digital Scale

iphone-digital-scale

3D Touch Everything You Can Do With 3D Touch on Your iPhone Everything You Can Do With 3D Touch on Your iPhone 3D touch is really just a fancy name for a pressure-sensitive screen, but adds a whole array of extra input options to iOS. Read More is another cool feature of iOS devices, and Swift makes it really easy to include it in your apps. This tutorial will walk you through creating a simple digital scale that will display the amount of pressure the user is putting on the screen. The app can also be used to actually weigh things, which is pretty cool!

Enable Push Notifications

swift-notifications

You may find push notifications annoying, but there are some apps that make great use of them. If you want to learn how to use push notifications in your own app, you’ll have to learn about creating your app ID and enabling those notifications for it. It’s a bit of a roundabout process, but going through this step-by-step tutorial makes it much easier. This is a long tutorial, and a lot of it is administrative stuff that’s not very exciting. But if you’re serious about developing your own app, it’s full of important things you’ll need to know.

Go Learn Some Swift!

These tutorials will give you a solid understanding of how to use Swift, and they’ll help you create some real apps along the way. Remember to read the comments for each one if you come across a problem, as others have probably dealt with it, too. And above all, have fun with it! Programming can be tough 6 Signs That You Are Not Meant To Be A Programmer 6 Signs That You Are Not Meant To Be A Programmer Not everyone is cut out to be a programmer. If you aren't completely sure that you're meant to be a programmer, here are some signs that may point you in the right direction. Read More , but learning through examples like these should be enjoyable.

Swift not your thing? You can learn to develop apps for Android So, You Want To Develop Android Apps? Here's How To Learn So, You Want To Develop Android Apps? Here's How To Learn After so many years, one would think that the mobile market is now saturated with every app imaginable to man - but that's not the case. There are plenty of niches that still need to... Read More  instead.

Have you learned to use Swift? Were there any specific tutorials that you found to be useful? Share your favorites in the comments below!

Leave a Reply

Your email address will not be published. Required fields are marked *