You are on page 1of 10

TIPS TO

SPEED UP
YOUR IOS
DEVELOPMENT

Shubham Singh
@shubham_iosdev
Some tips that will
help you to reduce
the time required for
your iOS Development

Shubham Singh
@shubham_iosdev
1 By diligently adding
comments to your code
Writing comments is an integral part of a
project’s codebase. Good comments doesn’t
just explain the code, they clarify it’s
intention.

They save a lot of time in the long run, and


you should definitely hone this art.

Write them wherever you think it makes


sense.

Shubham Singh
@shubham_iosdev
2 By using Annotations &
the Xcode Minimap
Annotations are unique comments that you
can use for your development. Xcode
understands them, and it allows you to keep
track of multiple things, like features that
needs a redo in the future and so on.

Swift supports annotations like- TODO,


MARK, FIXME.

Let’s have a brief look at how they’re used.

Shubham Singh
@shubham_iosdev
i) TODO - Used to keep track of functionalities
that you need to add later in the project.
ii) MARK - Used to put your code under a named
section.

ii) FIXME - Used to identify code that needs a fix


before running, could be also used for to fix
something that might break in the future.

As you can see, the MARK annotation looks quite


distinctive even among other annotations.

Shubham Singh
@shubham_iosdev
+ + +M
Opens Minimap

Minimap shows an overview of your current code,


and you can easily check out the MARK annotations.

+6 TODO
Opens View MARK

Controller Outline FIXME


Each Annotation has a separate icon, so that you can find them
easily.

Shubham Singh
@shubham_iosdev
3 By creating custom
code snippets
Code snippets are reusable lines of code.
You can create custom code snippets and
save under a name, so that they can be used
in the future.

You can also set the platform(iOS, macOS


etc.), and the snippet availability( inside
classes, functions etc.) for the code snippets.

Let me quickly show you how to create one.

Shubham Singh
@shubham_iosdev
i) Write or pick some code that you want to
add to the snippet.

If you’re wondering how to add a placeholder, this is how you


do it <#tableViewRows#>

ii) Right click on the code and select the `Create


Code Snippet` option.

Shubham Singh
@shubham_iosdev
iii) Give it a name and customise it if you want. You
can use it by typing it’s name by opening the
library. ( + + L)

4 By mastering keyboard
Shortcuts
Xcode provides a lot of keyboard
shortcuts that you can use to speed up
your iOS development and work at
maximum efficiency. It’s worth learning
them, and it’ll boost your productivity.

Shubham Singh
@shubham_iosdev
Shubham Singh
@shubham_iosdev

Keep learning,
it’s your everyday
efforts that counts

You might also like