ios app development with storyboard

23
iOS App Development With Storyboard Babul Mirdha Senior Software Engineer LeadSoft Bangladesh Limited

Upload: babul-mirdha

Post on 09-May-2015

1.432 views

Category:

Education


1 download

TRANSCRIPT

Page 1: iOS App Development with Storyboard

iOS App Development With Storyboard

Babul MirdhaSenior Software Engineer

LeadSoft Bangladesh Limited

Page 2: iOS App Development with Storyboard

About Babul MirdhaAbout Babul MirdhaFounder at

সcা.net (www.seccha.net)

Senior Software Engineer at

LeadSoft Bangladesh Limitedg

www.fb.com/BabulMirdha

Having more than 5 years ofworking experiences with iOS,Android, Windows Phone, Web &D k ( N ) d l IDesktop (.Net) app development, Ihave worked with variouslanguages, technologies & tools indifferent environment.

Page 3: iOS App Development with Storyboard

ContentsContentsUnderstanding MVC architectureXib vs StoryboardXib vs Storyboard

Page 4: iOS App Development with Storyboard

Understanding MVC architectureUnderstanding MVC architecture

Page 5: iOS App Development with Storyboard

Understanding MVC architectureUnderstanding MVC architectureThe Model-View-Controller (MVC) design pattern assigns objects in an application one of three roles: j pp

model, view, orcontroller controller.

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 the by abstract boundaries and communicates with objects of the other types across those boundaries.

MVC is central to a good design for a Cocoa application.

Page 6: iOS App Development with Storyboard

Advantages of MVCAdvantages of MVCThe benefits of adopting this pattern are numerous.

Many objects in applications tend to be more reusable and Many 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 the MVC and require that your custom objects play one of the MVC roles.

Page 7: iOS App Development with Storyboard

MVC architecture in iOSMVC architecture in iOS

Page 8: iOS App Development with Storyboard

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

Page 9: iOS App Development with Storyboard

XibXibApple remove it from xcode 5. You have only one option to choose storyboard You 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 earliarversion then run it on xcode 5.

Page 10: iOS App Development with Storyboard

What is storyboardWhat is storyboardStoryboard is an exciting new feature in iOS 5 that will save a lot of time building user interfaces for Apps save a lot of time building user interfaces for Apps

Page 11: iOS App Development with Storyboard

Advantages of StoryboardAdvantages of StoryboardWith a storyboard you have a better conceptual overview of all the screens in your app and the overview 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 f with the new prototype cells and static cells features. Can also use .xibs if needed with storyboards.

Page 12: iOS App Development with Storyboard

Disadvantages of StoryboardDisadvantages of StoryboardYou also need a big monitor, especially when write iPadapps! apps! it is only available in iOS 5 onward Merges can be very difficult if not impossible if there are g y pconflicts.

Page 13: iOS App Development with Storyboard

Creating Storyboard Project Creating Storyboard Project Fire up Xcode and create a new Empty App project.

Product Name: RatingsProduct Name: RatingsCompany Identifier: the identifier that you use foryour apps, in reverse domain notation Class Prefix: leave this empty Device Family: iPhoneUse Storyboard: check this Use Storyboard: check this Use Automatic Reference Counting: check this Include Unit Tests: this should be unchecked

Page 14: iOS App Development with Storyboard

Creating Storyboard Project Creating Storyboard Project

Page 15: iOS App Development with Storyboard

Add a storyboard for iPhoneAdd a storyboard for iPhoneClick >File>oNew>FileClick> User Interface> StoryboardClick> User Interface> StoryboardClick>NextSelect>iPhoneSelect>iPhoneClick>NextType >Storyboard iPhoneType Storyboard_iPhone

Page 16: iOS App Development with Storyboard

StoryboardStoryboard

Page 17: iOS App Development with Storyboard

Set Storyboard to be loadedSet Storyboard to be loadedSpecify the name of the storyboard that must be loaded when the app startswhen the app starts

Page 18: iOS App Development with Storyboard

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.

Page 19: iOS App Development with Storyboard

Design Scene or SecreenDesign Scene or Secreen

Page 20: iOS App Development with Storyboard

Storyboard SeguesStoryboard Segues

A segue is a transition from one view to another.gE.g. select the + button and ctrl-drag to the new Navigation Controller.

Page 21: iOS App Development with Storyboard

DemoDemo

Page 22: iOS App Development with Storyboard

New TerminilogiesNew TerminilogiesMVCxCodexCodeXibStoryboardStoryboardSegue

Page 23: iOS App Development with Storyboard