Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Swift By Example
  • Table Of Contents Toc
Swift By Example

Swift By Example

By : Giordano Scalzo
4 (2)
close
close
Swift By Example

Swift By Example

4 (2)
By: Giordano Scalzo

Overview of this book

This book is intended for those who want to learn to develop apps in Swift the right way. Whether you are an expert Objective-C programmer or new to this platform, you'll learn quickly, grasping the code of real-world apps to use Swift effectively. Prior experience in development for Apple devices would be helpful, but is not mandatory.
Table of Contents (10 chapters)
close
close

Implementing Cube Runner


After experimenting a bit with SceneKit, let's start implementing our game.

The game skeleton

As usual, let's start by selecting the correct Xcode project template, the Game template in this case, which looks like this:

In the next screen, we add the requested data and select SceneKit as the technology, as shown here:

After selecting only Portrait as the allowed orientation, as shown in the following screenshot, we can run the example project:

The demo app shows a gorgeous rotating 3D airplane, thus showing us what we can achieve using this framework. Here is a screenshot of the plane:

Implementing the menu

For the first task in building the app, we prepare the Podfile, which contains a few pods that we'll use to build the menu view:

inhibit_all_warnings!
use_frameworks!
target 'CubeRunner' do
   pod 'Cartography', '~> 0.5'
   pod 'HTPressableButton', '~> 1.3'
   pod 'BitwiseFont', '~> 0.1.0'
end

After running the usual pod install command, we are ready to implement...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Swift By Example
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon