The document discusses iOS app development using storyboards compared to using xibs. It provides an overview of the model-view-controller architecture and how storyboards make developing user interfaces easier. Key points include:
1) Storyboards allow seeing all app screens and connections in one place and describe transitions between screens.
2) Using storyboards is easier for table views with prototype and static cells.
3) Specifying the launch storyboard is done through the main storyboard file name in the info.plist.
4) Scenes and segues are used to design transitions between screens in the storyboard.
1. iOS App Development With Storyboard
Babul Mirdha
Senior Software Engineer
LeadSoft Bangladesh Limited
2. About Babul MirdhaAbout Babul Mirdha
Founder at
সcা.net (www.seccha.net)
Senior Software Engineer at
LeadSoft Bangladesh Limitedg
www.fb.com/BabulMirdha
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
different environment.
5. Understanding MVC architectureUnderstanding MVC architecture
The Model-View-Controller (MVC) design pattern assigns
objects in an application one of three roles:j pp
model,
view, or
controllercontroller.
The pattern defines not only the roles objects play in the
application, it defines the way objects communicate with each
other.
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.
6. 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
MVC roles.
8. Xib (Old)
Interface Builder
•allows Cocoa and Carbon developers to create
interfaces for applications using a graphical user
interface.
•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
9. XibXib
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.
10. 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
11. 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
various screens.
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.
12. Disadvantages of StoryboardDisadvantages of Storyboard
You also need a big monitor, especially when write iPad
apps!apps!
it is only available in iOS 5 onward
Merges can be very difficult if not impossible if there areg y p
conflicts.
13. 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
15. Add a storyboard for iPhoneAdd a storyboard for iPhone
Click >File>oNew>File
Click> User Interface> StoryboardClick> User Interface> Storyboard
Click>Next
Select>iPhoneSelect>iPhone
Click>Next
Type >Storyboard iPhoneType Storyboard_iPhone
17. 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
18. Info.plistInfo.plist
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.
20. 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
Navigation Controller.