iOS App Development With Storyboard
Senior Software Engineer
LeadSoft Bangladesh Limited
About Babul MirdhaAbout Babul Mirdha
Senior Software Engineer at
LeadSoft Bangladesh Limitedg
Having more than 5 years of
working experiences with iOS,
Android, Windows Phone, Web &
D k ( N ) d l IDesktop (.Net) app development, I
have worked with various
languages, technologies & tools in
Understanding MVC architecture
Xib vs StoryboardXib vs Storyboard
Understanding MVC architectureUnderstanding MVC architecture
The Model-View-Controller (MVC) design pattern assigns
objects in an application one of three roles:j pp
The pattern defines not only the roles objects play in the
application, it defines the way objects communicate with each
Each of the three types of objects is separated from the others
by abstract boundaries and communicates with objects of theby abstract boundaries and communicates with objects of the
other types across those boundaries.
MVC is central to a good design for a Cocoa application.
Advantages of MVCAdvantages of MVC
The benefits of adopting this pattern are numerous.
Many objects in applications tend to be more reusable andMany objects in applications tend to be more reusable, and
their interfaces tend to be better defined.
Applications having an MVC design are also more easily
extensible than other applications.
Many Cocoa technologies and architectures are based on
MVC and require that your custom objects play one of theMVC and require that your custom objects play one of the
•allows Cocoa and Carbon developers to create
interfaces for applications using a graphical user
•The resulting interface is stored as a nib file short•The resulting interface is stored as a .nib file, short
for NeXT Interface Builder, or more later, as
a .xib filea .xib file
Apple remove it from xcode 5.
You have only one option to choose storyboardYou have only one option to choose storyboard.
if you want to xibs then remove storyboard after creating
singleView application and add xib manually.
another option is to create application in xcode 4.6 or earliar
version then run it on xcode 5.
What is storyboardWhat is storyboard
Storyboard is an exciting new feature in iOS 5 that will
save a lot of time building user interfaces for Appssave a lot of time building user interfaces for Apps
Advantages of StoryboardAdvantages of Storyboard
With a storyboard you have a better conceptual
overview of all the screens in your app and theoverview of all the screens in your app and the
connections between them.
The storyboard describes the transitions between the
Storyboards make working with table views a lot easier
i h h ll d i ll fwith the new prototype cells and static cells features.
Can also use .xibs if needed with storyboards.
Disadvantages of StoryboardDisadvantages of Storyboard
You also need a big monitor, especially when write iPad
it is only available in iOS 5 onward
Merges can be very difficult if not impossible if there areg y p
Creating Storyboard ProjectCreating Storyboard Project
Fire up Xcode and create a new Empty App project.
Product Name: RatingsProduct Name: Ratings
Company Identifier: the identifier that you use foryour apps, in
reverse domain notation
Class Prefix: leave this empty
Device Family: iPhone
Use Storyboard: check thisUse Storyboard: check this
Use Automatic Reference Counting: check this
Include UnitTests: this should be unchecked
Add a storyboard for iPhoneAdd a storyboard for iPhone
Click> User Interface> StoryboardClick> User Interface> Storyboard
Type >Storyboard iPhoneType Storyboard_iPhone
Set Storyboard to be loadedSet Storyboard to be loaded
Specify the name of the storyboard that must be loaded
when the app startswhen the app starts
In info.plist file, Storyboard apps use the key
UIM S b dF l “M b d f l b ”UIMainStoryboardFile, or “Main storyboard file base name”, to
specify the name of the storyboard that must be loaded when
the app starts.
Design Scene or SecreenDesign Scene or Secreen
Storyboard SeguesStoryboard Segues
A segue is a transition from one view to another.g
E.g. select the + button and ctrl-drag to the new