EEC-492/693/793 iPhone Application Development

Slides:



Advertisements
Similar presentations
How can Microsoft PowerPoint 2007 help you share information?
Advertisements

Customizing Reports. Custom Reports A report is a formatted hardcopy of the contents of one or more tables from a database. Although you can format and.
The Problem: iPhone UI Navigation I want to have a TableView that works INSIDE a TabView.
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 1 بسم الله الرحمن الرحيم Palestine Polytechnic University College of Administrative science and.
Customizing Outlook. Forms Window in which you enter and view information in Outlook Outlook Form Designer The environment in which you create and customize.
Tutorial Holdings Management Adding, Editing, and Assigning Full Text Finder Links support.ebsco.com.
Tutorial Holdings Management Adding, Editing, and Assigning Notes support.ebsco.com.
1 of 4 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Access Lesson 4 Creating and Modifying Forms
Customizing Your Toolbars in Microsoft Office Lunch and Learn: June 7, 2005.
IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is.
Xcode Presentation Tom Pletzke. Creating App from template Launch Xcode Select Tabbed Application.
EEC-693/793 Applied Computer Vision with Depth Cameras Lecture 13 Wenbing Zhao
1 1 Lab1 Ismail M. Romi – IT Dept, PPU, Visual Basic 2005 Programming Tour.
Quick Start Guide: Administrator Advanced Learn about: 1.Creating customized Roles in LOAMS 2.Searching and moving users in the hierarchy 3.Modifying accounts.
ACCESS Part 2. OBJECTIVES  Use the Form Wizard  Create a split form  Use Form Layout View  Add fields to a form  Modify form controls  Create calculations.
1 Designing with a UIToolBar iPhone/iPad, iOS Development Tutorial.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
0 This document is confidential and is intended solely for the use and information of the client to whom it is addressed. eCPIC Admin Training: Custom.
Tabbed Views UITabBarController. Controller Architecture UITabBarController Controls the first view that the user sees The view controller class (and.
Navigation in iPads splitViewController. Overview Create a Master-Detail application Switch Device Family to iPad Give the project a name and click “Use.
IOS with Swift Hello world app.
Chapter 8 HTML Frames. 2 Principles of Web Design Chapter 8 Objectives Understand the benefits and drawbacks of frames Understand and use frames syntax.
Nav Controllers UINavigationController. Overview Nav Controller basics Like a tabview controller, a navViewController manages views A navigationViewController.
User Interface Objects From Beginning iPhone 4 Development and The iPhone Developer’s Cookbook (Chapter 4)
Web Design-Lecture3-QN-2003 Web Design Enhancing a Website.
Introduction to EBSCOhost Tutorial support.ebsco.com.
Lesson 1 - Understanding the Word Window and Creating a New Document
Customizing Menus and Toolbars CHAPTER 12 Customizing Menus and Toolbars.
Introduction to EBSCOhost
Creating Oracle Business Intelligence Interactive Dashboards
IBM Rational Rhapsody Advanced Systems Training v7.5
Getting Started 27-September-2012
iOS UI Components Sisoft Technologies Pvt Ltd
About SharePoint Server 2007 My Sites
Holdings Management Adding, Editing, and Assigning Notes
CONTENT MANAGEMENT SYSTEM CSIR-NISCAIR, New Delhi
View-Controller Family
Microsoft Excel 2003 Illustrated Complete
Chapter I Introduction to MS PowerPoint Program
EEC-492/693/793 iPhone Application Development
EEC-492/693/793 iPhone Application Development
Access Lesson 1 Understanding Access Fundamentals
Database Applications – Microsoft Access
Tutorial Introduction to support.ebsco.com.
EEC-492/693/793 iPhone Application Development
Microsoft Office Access 2003
EEC-492/693/793 iPhone Application Development
Microsoft Office Access 2003
Finding Magazine and Journal Articles in
Tutorial 6 Creating Dynamic Pages
Path: Common > Application Appearance > Workspaces
EEC-492/693/793 iPhone Application Development
CSC 581: Mobile App Development
EEC-492/693/793 iPhone Application Development
Using Templates and Library Items
Autodesk Inventor Tips and Tricks for New Users
EEC-492/693/793 iPhone Application Development
EEC-492/693/793 iPhone Application Development
Learning Objectives: Creating a new Table Style
Adding , Editing, and Assigning Full Text Finder Links
SOP of System Security Settings
AutoCAD Certified user: Inventor
Creating and Sending Saved Messages
EEC-492/693/793 iPhone Application Development
Microsoft Office Illustrated Fundamentals
Navigating Excel.
Tutorial Introduction to help.ebsco.com.
Welcome To Microsoft Word 2016
eBilling Training Service Provider Administrator
Presentation transcript:

EEC-492/693/793 iPhone Application Development Lecture 11 Wenbing Zhao & Nigamanth Sridhar 1/18/2019 EEC492/693/793 - iPhone Application Development

Outline Administrative Navigation Controller Assignments: From now on: review your app/progress at the end of each session Navigation Controller Assignments: The push and pop app Continue building the calculator app 1/18/2019 1/18/2019 EEC492/693/793 - iPhone Application Development EEC492/693/793 - iPhone Application Development 2

Navigation Controller The navigation controller (UINavigationController) can be used to manage a stack of view controllers Stack: a data structure that manages a collection of objects last in, first out / first in, last out Push: add an object to a stack Pop: remove an object from the stack Navigation bar Title of the top view controller Left bar button to go to the previous view controller (pop) Right bar button to allow editing etc. 1/18/2019 EEC492/693/793 - iPhone Application Development

EEC492/693/793 - iPhone Application Development Example App: Mail Top view controller’s title Previous view controller’s title Top view controller’s view Top view controller’s toolbar 1/18/2019 EEC492/693/793 - iPhone Application Development

EEC492/693/793 - iPhone Application Development How to Navigate Push to add a view controller (to the UINavigationController’s stack) - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated; Pop to remove a view controller from the stack (the previous one will become the top view controller) - (UIViewController *)popViewControllerAnimated:(BOOL)animated; Set to change the entire stack of view controllers - (void)setViewControllers:(NSArray *)viewControllers animated:(BOOL)animated; 1/18/2019 EEC492/693/793 - iPhone Application Development

Pushing Your First View Controller - (void)applicationDidFinishLaunching { // Create a navigation controller navController = [[UINavigationController alloc] init]; // Push the first view controller on the stack [navController pushViewController:firstViewController animated:NO]; // Add the navigation controller’s view to the window [window addSubview:navController.view]; …. } Where would you do this? 1/18/2019 EEC492/693/793 - iPhone Application Development

Push from within a View Controller on the Stack due to User Actions - (void)someAction:(id)sender { // Potentially create another view controller UIViewController *viewController = ...; [self.navigationController pushViewController:viewController animated:YES]; } Where on earth does navigationController come from?! It is defined in UIViewController as a property Since our view controller inherited from UIViewController, we do have it as well navigationItem is another property declared in UIViewController 1/18/2019 EEC492/693/793 - iPhone Application Development

Customizing Navigation UINavigationItem: Describes appearance of the navigation bar Title string or custom title view Left & right bar buttons More properties defined in UINavigationBar.h Every view controller has a navigation item for customizing Displayed when view controller is on top of the stack Left Bar Button Item View Controller Navigation Item Title View Right Bar Button Item 1/18/2019 EEC492/693/793 - iPhone Application Development

EEC492/693/793 - iPhone Application Development Displaying a Title UIViewController already has a title property @property(nonatomic,copy) NSString *title; Navigation item inherits automatically Previous view controller’s title is displayed in back button viewController.title = @“Detail”; 1/18/2019 EEC492/693/793 - iPhone Application Development

EEC492/693/793 - iPhone Application Development Left & Right Buttons UIBarButtonItem Special object, defines appearance & behavior for items in navigation bars and toolbars Display a string, image or predefined system item Target + action (like a regular button) 1/18/2019 EEC492/693/793 - iPhone Application Development

EEC492/693/793 - iPhone Application Development Text Bar Button Item - (void)viewDidLoad { UIBarButtonItem *fooButton = [[UIBarButtonItem alloc] initWithTitle:@"Foo” style:UIBarButtonItemStyleBordered target:self action:@selector(foo:)]; self.navigationItem.leftBarButtonItem = fooButton; [fooButton release]; } 1/18/2019 EEC492/693/793 - iPhone Application Development

EEC492/693/793 - iPhone Application Development System Bar Button Item - (void)viewDidLoad { UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(add:)]; self.navigationItem.rightBarButtonItem = addButton; [addButton release]; } 1/18/2019 EEC492/693/793 - iPhone Application Development

EEC492/693/793 - iPhone Application Development Edit/Done Button Very common pattern Every view controller has one available Target/action already set up self.navigationItem.leftBarButtonItem = self.editButtonItem; // Called when the user toggles the edit/done button - (void)setEditing:(BOOL)editing animated:(BOOL)animated { // Update appearance of views } 1/18/2019 EEC492/693/793 - iPhone Application Development

EEC492/693/793 - iPhone Application Development Custom Title View Arbitrary view in place of the title UISegmentedControl *segmentedControl = ... self.navigationItem.titleView = segmentedControl; [segmentedControl release]; 1/18/2019 EEC492/693/793 - iPhone Application Development

EEC492/693/793 - iPhone Application Development Back Button If you don’t like the default back button (using the title of the view controller), you can customize it self.title = @“Hello there, CS193P!”; UIBarButtonItem *heyButton = [[UIBarButtonItem alloc] initWithTitle:@“Hey!” ...]; self.navigationItem.backButtonItem = heyButton; [heyButton release]; 1/18/2019 EEC492/693/793 - iPhone Application Development

Combining Tab Bar and Navigation Controllers You can combine the tab bar and navigation controllers to create multiple parallel hierarchies 1/18/2019 EEC492/693/793 - iPhone Application Development

Tab Bar + Navigation Controllers View Controller Navigation Item View Controller View Controller Navigation Item View Controller View Controller Navigation Item 1/18/2019 EEC492/693/793 - iPhone Application Development

Nesting Navigation Controllers (into Tab Bar Controller) Create a tab bar controller tabBarController = [[UITabBarController alloc] init]; Create each navigation controller navController = [[UINavigationController alloc] init]; [navController pushViewController:firstViewController animated:NO]; Add them to the tab bar controller tabBarController.viewControllers = [NSArray arrayWithObjects: navController, anotherNavController, someViewController, nil]; 1/18/2019 EEC492/693/793 - iPhone Application Development

Assignment: Push and Pop App 1/18/2019 EEC492/693/793 - iPhone Application Development