Naviga&on and Tab Bar Controllers and Table View
|
|
- Evangeline Harrington
- 5 years ago
- Views:
Transcription
1 Naviga&on and Tab Bar Controllers and Table View
2 UINaviga)onController Stack of view controllers Naviga)on bar
3 How It Fits Together Top view controller s view Top view controller s )tle Previous view controller s )tle Top view controller s toolbar items (iphone OS 3.0)
4 The views of a naviga)on interface
5 Objects managed by the naviga)on controller
6 The naviga)on stack
7 Loading Your Naviga&on Interface from a Nib File
8 Crea)ng a Naviga)on Controller Programma)cally - (void)applica)ondidfinishlaunching:(uiapplica)on *)applica)on{ UIViewController *rootcontroller = [[MyRootViewController alloc] init]; naviga)oncontroller = [[UINaviga)onController alloc] initwithrootviewcontroller:rootcontroller]; [rootcontroller release]; window = [[UIWindow alloc] initwithframe:[[uiscreen mainscreen] bounds]]; [window addsubview:naviga)oncontroller.view]; [window makekeyandvisible];}
9 Modifying the Naviga)on Stack Push to add a view controller - (void)pushviewcontroller:(uiviewcontroller *)viewcontroller animated:(bool)animated; Pop to remove a view controller - (UIViewController *)popviewcontrolleranimated:(bool)animated; Set to change the en&re stack of view controllers (iphone OS 3.0) - (void)setviewcontrollers:(nsarray *)viewcontrollers animated:(bool)animated;
10 Pushing Your First View Controller - (void)applica)ondidfinishlaunching { // Create a naviga)on controller navcontroller = [[UINaviga)onController alloc] init]; // Push the first view controller on the stack [navcontroller pushviewcontroller:firstviewcontroller animated:no]; // Add the naviga)on controller s view to the window [window addsubview:navcontroller.view]; }
11 In Response to User Ac)ons Push from within a view controller on the stack - (void)someac)on:(id)sender { // Poten)ally create another view controller UIViewController *viewcontroller =...; [self.naviga)oncontroller pushviewcontroller:viewcontroller animated:yes]; } Almost never call pop directly! Automa)cally invoked by the back bu_on
12 Messages sent during stack changes
13
14 A Controller for Each Screen
15 Connec)ng View Controllers Mul)ple view controllers may need to share data One may need to know about what another is doing Watch for added, removed or edited data Other interes)ng events
16 How Not To Share Data Global variables or singletons This includes your applica&on delegate! Direct dependencies make your code less reusable And more difficult to debug & test
17 Best Prac)ces for Data Flow Figure out exactly what needs to be communicated Define input parameters for your view controller For communica)ng back up the hierarchy, use loose coupling Define a generic interface for observers (like delega)on)
18 Customizing Naviga)on Bu_ons or custom controls Interact with the en)re screen
19 Naviga)on bar styles
20 The objects associated with a naviga)on bar
21 UINaviga)onItem Describes appearance of the naviga)on bar Title string or custom )tle view Lee & right bar bu_ons More proper)es defined in UINaviga)onBar.h Every view controller has a naviga&on item for customizing Displayed when view controller is on top of the stack
22 Naviga)on Item Ownership
23 The objects associated with a naviga)on bar
24 Displaying a Title UIViewController already has a )tle NSString *)tle; Naviga)on item inherits automa)cally Previous view controller s )tle is displayed in back bu_on viewcontroller.)tle Detail ;
25 Lee & Right Bu_ons UIBarBu_onItem Special object, defines appearance & behavior for items in naviga)on bars and toolbars Display a string, image or predefined system item Target + ac)on (like a regular bu_on)
26 Text Bar Bu_on Item - (void)viewdidload { UIBarBu_onItem *foobu_on = [[UIBarBu_onItem alloc] initwithtitle:@"foo style:uibarbu_onitemstylebordered target:self ac)on:@selector(foo:)]; self.naviga)onitem.leebarbu_onitem = foobu_on; } [foobu_on release];
27 System Bar Bu_on Item - (void)viewdidload { UIBarBu_onItem *addbu_on = [[UIBarBu_onItem alloc] initwithbarbu_onsystemitem:uibarbu_onsystemitemadd style:uibarbu_onitemstylebordered target:self ac)on:@selector(add:)]; self.naviga)onitem.rightbarbu_onitem = addbu_on; [addbu_on release]; }
28 Edit/Done Bu_on Very common pa_ern Every view controller has one available Target/ac)on already set up self.naviga)onitem.leebarbu_onitem = self.editbu_onitem; // Called when the user toggles the edit/done bu_on - (void)setedi)ng:(bool)edi)ng animated:(bool)animated { // Update appearance of views }
29 Custom Title View Arbitrary view in place of the )tle UISegmentedControl *segmentedcontrol =... self.naviga)onitem.)tleview = segmentedcontrol; [segmentedcontrol release];
30 Back Bu_on Some)mes a shorter back bu_on is needed self.)tle Hello there, CS193P! ; UIBarBu_onItem *heybu_on = [[UIBarBu_onItem alloc] initwithtitle:@ Hey!...]; self.naviga)onitem.backbu_onitem = heybu_on; [heybu_on release];
31 // View 3 - Custom right bar bu_on with a view UISegmentedControl *segmentedcontrol = [[UISegmentedControl alloc] initwithitems: [NSArray arraywithobjects: [UIImage imagenamed:@"up.png"], [UIImage imagenamed:@"down.png"], nil]]; [segmentedcontrol addtarget:self ac)on:@selector(segmentac)on:) forcontrolevents:uicontroleventvaluechanged]; segmentedcontrol.frame = CGRectMake(0, 0, 90, kcustombu_onheight); segmentedcontrol.segmentedcontrolstyle = UISegmentedControlStyleBar;segmentedControl.momentary = YES; defaulttintcolor = [segmentedcontrol.)ntcolor retain]; // keep track of this for later UIBarBu_onItem *segmentbaritem = [[UIBarBu_onItem alloc] initwithcustomview:segmentedcontrol]; [segmentedcontrol release]; self.naviga)onitem.rightbarbu_onitem = segmentbaritem; [segmentbaritem release];
32 Toolbar items in a naviga)on interface
33 (void)configuretoolbaritems { UIBarBu_onItem *flexiblespacebu_onitem = [[UIBarBu_onItem alloc] initwithbarbu_onsystemitem:uibarbu_onsystem ItemFlexibleSpace target:nil ac)on:nil]; // Create and configure the segmented control UISegmentedControl *sorttoggle = [[UISegmentedControl alloc] initwithitems:[nsarray nil]]; sorttoggle.segmentedcontrolstyle = UISegmentedControlStyleBar; sorttoggle.selectedsegmentindex = 0; [sorttoggle addtarget:self ac)on:@selector (togglesor)ng:) forcontrolevents:uicontroleventvaluechanged]; // Create the bar button item for the segmented control UIBarButtonItem *sorttogglebuttonitem = [[UIBarButtonItem alloc] initwithcustomview:sorttoggle]; [sorttoggle release]; } // Set our toolbar items self.toolbaritems = [NSArray arraywithobjects: flexiblespacebuttonitem, sorttogglebuttonitem, flexiblespacebuttonitem, nil]; [sorttogglebuttonitem release]; [flexiblespacebuttonitem release];
34 UITabBarController Array of view controllers Tab bar
35 How It Fits Together Selected view controller s view All view controllers )tles
36 The views of a tab bar interface
37 A tab bar controller and its associated view controllers
38 Tab bar items of the ipod applica)on
39 Nib file containing a tab bar interface
40 Seong Up a Tab Bar Controller - (void)applica)ondidfinishlaunching // Create a tab bar controller tabbarcontroller = [[UITabBarController alloc] init]; // Set the array of view controllers tabbarcontroller.viewcontrollers = myviewcontrollers; } // Add the tab bar controller s view to the window [window addsubview:tabbarcontroller.view];
41 Tab Bar Appearance View controllers can define their appearance in the tab bar UITabBarItem Title + image or system item Each view controller comes with a tab bar item for customizing
42 Crea)ng Tab Bar Items Title and image - (void)viewdidload { UITabBarItem *item = [[UITabBarItem alloc] initwithtitle:@ Playlists image:[uiimage imagenamed:@ music.png ] tag:0]; self.tabbaritem = item; [item release]; }
43 Crea)ng Tab Bar Items System item - (void)viewdidload { UITabBarItem *item = [[UITabBarItem alloc] initwithtabbarsystemitem: UITabBarSystemItemBookmarks tag:0] self.tabbaritem = item; [item release]; }
44 Crea)ng the view controller s tab bar item - (id)init { if (self = [super initwithnibname:@"myviewcontroller" bundle:nil]) { self.)tle View Controller ; UIImage* animage = [UIImage imagenamed:@"myviewcontrollerimage.png"]; UITabBarItem* theitem = [[UITabBarItem alloc] initwithtitle:@"home" image:animage tag:0]; self.tabbaritem = theitem; } } [theitem release]; return self;
45 Removing the current tab - (IBAc)on)processUserInforma)on:(id)sender{ // Call some app- specific method to validate the user data. } // If the custom method returns YES, remove the tab. if ([self userdataisvalid]) { NSMutableArray* newarray = [NSMutableArray arraywitharray:self.tabbarcontroller.viewcontrollers]; [newarray removeobject:self]; [self.tabbarcontroller setviewcontrollers:newarray animated:yes]; }
46 Preven)ng the selec)on of tabs - (BOOL)tabBarController:(UITabBarController *)atabbar shouldselectviewcontroller:(uiviewcontroller *)viewcontroller { if (![self hasvalidlogin] && (viewcontroller!= [atabbar.viewcontrollers objectatindex:0]) ) { // Disable all but the first tab. return NO; } return YES; }
47 More View Controllers
48 Tab Bar + Naviga)on Controllers Mul)ple parallel hierarchies
49 Tab Bar + Naviga)on Controllers
50 Nes)ng Naviga)on Controllers Create a tab bar controller tabbarcontroller = [[UITabBarController alloc] init]; Create each naviga)on controller navcontroller = [[UINaviga)onController alloc] init]; [navcontroller pushviewcontroller:firstviewcontroller animated:no]; Add them to the tab bar controller tabbarcontroller.viewcontrollers = [NSArray arraywithobjects: navcontroller, anothernavcontroller, someviewcontroller, nil];
51 Table Views Display lists of content Single column, mul)ple rows Ver)cal scrolling Large data sets Powerful and ubiquitous in iphone applica)ons
52 Table View Styles UITableViewStylePlain UITableViewStyleGrouped
53 Table View Anatomy Plain Style Table Header Section Header Table Cell Section Footer Section Table Footer
54 Table View Anatomy Grouped Style Table Header Section Header Table Cell Section Footer Section Table Footer
55 Header and footer of a sec)on
56 UITabelView Declaring methods that allow you to configure the appearance of the table view specifying the default height of rows or providing a view used as the header for the table access to the currently selected row as well as specific rows or cells manage selec)ons, scroll the table view, and insert or delete rows and sec)ons. UITableView inherits from UIScrollView, which defines scrolling behavior for views with content larger than the size of the window. UITableView redefines the scrolling behavior to allow ver)cal scrolling only.
57 Using Table Views Displaying your data in the table view Customizing appearance & behavior
58 Displaying Data in a Table View
59 A Naïve Solution Table views display a list of data, so use an array [mytableview setlist:mylistofstuff]; Issues with this approach All data is loaded upfront All data stays in memory
60 A More Flexible Solution Another object provides data to the table view Not all at once Just as it s needed for display Like a delegate, but purely data-oriented
61 Calling sequence for crea)ng and configuring a table view
62 UITableViewDataSource Provide number of sections and rows // Optional method, defaults to 1 if not implemented - (NSInteger)numberOfSectionsInTableView:(UITableView *)table; // Required method - (NSInteger)tableView:(UITableView *)tableview numberofrowsinsection:(nsinteger)section; Provide cells for table view as needed // Required method - (UITableViewCell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath;
63 Datasource Message Flow numberofsectionsintableview: tableview:numberofrowsinsec)on: tableview:cellforrowatindexpath:
64 NSIndexPath Generic class in Foundation Path to a specific node in a tree of nested arrays
65 NSIndexPath and Table Views Cell location described with an index path Section index + row index Category on NSIndexPath with helper NSIndexPath (UITableView) + (NSIndexPath *)indexpathforrow:(nsuinteger)row NSUInteger NSUInteger
66 Crea&ng a Table View RootViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> { NSArray *timezonenames; (nonatomic, retain) NSArray - (void)loadview { UITableView *tableview = [[UITableView alloc] initwithframe:[[uiscreen mainscreen] applicationframe] style:uitableviewstyleplain]; tableview.autoresizingmask = UIViewAutoresizingFlexibleHeight UIViewAutoresizingFlexibleWidth; } tableview.delegate = self; tableview.datasource = self; [tableview reloaddata]; self.view = tableview; [tableview release];
67 Single Section Table View Return the number of rows - (NSInteger)tableView:(UITableView *)tableview numberofrowsinsection:(nsinteger)section { return [mystrings count]; } Provide a cell when requested - (UITableViewCell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { UITableViewCell *cell =...; cell.textlabel.text = [mystrings objectatindex:indexpath.row] return [cell autorelease]; }
68 Cell Reuse When asked for a cell, it would be expensive to create a new cell each time. - (UITableViewCell *)dequeuereusablecellwithidentifier: *)tableview:(uitableview *)tableview (NSString cellforrowatindexpath:(nsindexpath *)identifier; *)indexpath { UITableViewCell *cell = [tableview dequeuereusablecellwithidentifier:@ MyIdentifier ]; if (cell == nil) { cell = [[[UITableViewCell alloc] initwithstyle:... reuseidentifier:@ MyIdenifier ] autorelease]; } cell.text = [mystrings objectatindex:indexpath.row] } return cell;
69 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableview { return [regions count]; } - (NSInteger)tableView:(UITableView *)tableview numberofrowsinsection:(nsinteger)section { // Number of rows is the number of time zones in the region for the specified section. Region *region = [regions objectatindex:section]; return [region.timezonewrappers count]; } - (NSString *)tableview:(uitableview *)tableview titleforheaderinsection:(nsinteger)section { // The header for the section is the region name -- get this from the region at the section index. Region *region = [regions objectatindex:section]; return [region name]; } - (UITableViewCell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { static NSString *MyIdentifier ; UITableViewCell *cell = [tableview dequeuereusablecellwithidentifier:myidentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initwithstyle:uitableviewcellstyledefault reuseidentifier:myidentifier] autorelease]; } Region *region = [regions objectatindex:indexpath.section]; TimeZoneWrapper *timezonewrapper = [region.timezonewrappers objectatindex:indexpath.row]; cell.textlabel.text = timezonewrapper.localename; return cell; }
70 Triggering Updates When is the datasource asked for its data? When a row becomes visible When an update is explicitly requested by calling reloaddata - (void)viewwillappear:(bool)animated { [super viewwillappear:animated]; } [self.tableview reloaddata];
71 Section and Row Reloading - (void)insertsections:(nsindexset *)sections withrowanimation:(uitableviewrowanimation)animation; - (void)deletesections:(nsindexset *)sections withrowanimation:(uitableviewrowanimation)animation; - (void)reloadsections:(nsindexset *)sections withrowanimation:(uitableviewrowanimation)animation; - (void)insertrowsatindexpaths:(nsarray *)indexpaths withrowanimation:(uitableviewrowanimation)animation; - (void)deleterowsatindexpaths:(nsarray *)indexpaths withrowanimation:(uitableviewrowanimation)animation; - (void)reloadrowsatindexpaths:(nsarray *)indexpaths withrowanimation:(uitableviewrowanimation)animation;
72 Calling sequence for inser)ng or dele)ng rows in a table view
73 Mapping levels of the data model to table views
74 Additional Datasource Methods Titles for section headers and footers Allow editing and reordering cells
75 Appearance & Behavior
76 UITableView Delegate Customize appearance and behavior Keep application logic separate from view Often the same object as datasource
77 Table View Appearance & Behavior Customize appearance of table view cell - (void)tableview:(uitableview *)tableview willdisplaycell:(uitableviewcell *)cell forrowatindexpath:(nsindexpath *)indexpath; Validate and respond to selection changes - (NSIndexPath *)tableview:(uitableview *)tableview willselectrowatindexpath:(nsindexpath *)indexpath; - (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath;
78 Row Selection in Table Views In iphone applications, rows rarely stay selected Selecting a row usually triggers an event
79 Persistent Selection
80 Responding to Selection // For a navigation hierarchy... - (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { // Get the row and the object it represents NSUInteger row = indexpath.row id objecttodisplay = [myobjects objectatindex:row]; // Create a new view controller and pass it along MyViewController *myviewcontroller =...; myviewcontroller.object = objecttodisplay; } [self.navigationcontroller pushviewcontroller:myviewcontroller animated:yes];
81 Altering or Disabling Selection - (NSIndexPath *)tableview:(uitableview *)tableview willselectrowatindexpath:(nsindexpath *)indexpath { // Don t allow selecting certain rows? if (indexpath.row ==...) { return nil; } else { return indexpath; } }
82 UITableViewController
83 UITableViewController Convenient starting point for view controller with a table view Table view is automatically created Controller is table view s delegate and datasource Takes care of some default behaviors Calls -reloaddata the first time it appears Deselects rows when user navigates back Flashes scroll indicators
84 Table View Cells
85 Designated Initializer - (id)initwithframe:(cgrect)frame reuseiden)fier:(nsstring *)reuseiden)fier; DEPRECATED - (id)initwithstyle:(uitableviewcellstyle)style reuseidentifier:(nsstring *)reuseidentifier;
86 Cell Styles UITableViewCellStyleDefault UITableViewCellStyleSubtitle UITableViewCellStyleValue1 UITableViewCellStyleValue2
87 Basic properties UITableViewCell has an image view and one or two text labels cell.imageview.image = [UIImage imagenamed:@ vitolidol.png ]; cell.textlabel.text Vitol Idol ; cell.detailtextlabel.text Billy Idol ;
88 Accessory Types // UITableView delegate method - (UITableViewCellAccessoryType)tableView:(UITableView *)table accessorytypeforrowwithindexpath:(nsindexpath *)indexpath; UITableViewCellAccessoryDisclosureIndicator UITableViewCellAccessoryDetailDisclosureButton UITableViewCellAccessoryCheckmark - (void)tableview:(uitableview *)tableview accessorybuttontappedforrowwithindexpath:(nsindexpath *)indexpath { // Only for the blue disclosure button NSUInteger row = indexpath.row;... }
89 Customizing the Content View For cases where a simple image + text cell doesn t suffice UITableViewCell has a content view property Add additional views to the content view - (UITableViewCell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { UITableViewCell *cell =...; CGRect frame = cell.contentview.bounds; UILabel *mylabel = [[UILabel alloc] initwithframe:frame]; mylabel.text =...; [cell.contentview addsubview:mylabel]; } [mylabel release];
90 Ques)ons?
Today s Topics. Scroll views Table views. UITableViewController Table view cells. Displaying data Controlling appearance & behavior
Today s Topics Scroll views Table views Displaying data Controlling appearance & behavior UITableViewController Table view cells Scroll Views UIScrollView For displaying more content than can fit on the
More informationCS193P - Lecture 8. iphone Application Development. Scroll Views & Table Views
CS193P - Lecture 8 iphone Application Development Scroll Views & Table Views Announcements Presence 1 due tomorrow (4/28)! Questions? Presence 2 due next Tuesday (5/5) Announcements Enrolled students who
More informationApple Development Technology Workshops
Apple Development Technology Workshops Workshop 10 Table Views Building iphone Apps. Pt 2 Fall 2008 Hafez Rouzati Fall 2008 Zach Pousman Last Week UIViewControllers Organizing Content & Building iphone
More informationCS193P - Lecture 7. iphone Application Development. Navigation & Tab Bar Controllers
CS193P - Lecture 7 iphone Application Development Navigation & Tab Bar Controllers 1 Announcements Assignment 3 is due tomorrow Paparazzi 1 is due on Wednesday February 3rd 2 Today s Topics Navigation
More informationITP 342 Mobile App Dev. Table Views
ITP 342 Mobile App Dev Table Views Table Views The most common mechanism used to display lists of data to the user Highly configurable objects that can be made to look practically any way you want them
More informationios Mobile Development
ios Mobile Development Today UITableView! Data source-driven vertical list of views.! ipad! Device-specific UI idioms.! Demo! Shutterbug UITableView Very important class for displaying data in a table!
More informationIPHONE DEVELOPMENT. Getting Started with the iphone SDK
IPHONE DEVELOPMENT Getting Started with the iphone SDK OBJECTIVE-C The Big Picture STRICT SUPERSET OF C The Objective C Language Any C stuff applies Standard libs are here (time, sqrt etc) The C Language
More informationDesigning iphone Applications
Designing iphone Applications 4 Two Flavors of Mail 5 Organizing Content 6 Organizing Content 6 Organizing Content 6 Organizing Content 6 Organizing Content Focus on your user s data 6 Organizing Content
More informationChapter 22 TableView TableView. TableView ios. ViewController. Cell TableViewCell TableView
Chapter 22 TableView TableView Android TableView ListView App 22.1 TableView TableView Storyboard Table View ViewController TableView ios Cell TableViewCell TableView Table View Cell Cell ImageView (imageview)
More informationPraktikum Entwicklung von Mediensystemen mit
Praktikum Entwicklung von Mediensystemen mit Wintersemester 2013/2014 Christian Weiß, Dr. Alexander De Luca Today Table View Navigation Controller Passing Data Between Scenes Assignment 2 2 Navigation-based
More informationWhy Model-View-Controller?
View Controllers Why Model-View-Controller? Ever used the word spaghetti to describe code? Clear responsibilities make things easier to maintain Avoid having one monster class that does everything Why
More informationProduced by. Design Patterns. MSc in Computer Science. Eamonn de Leastar
Design Patterns MSc in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie
More informationITP 342 Mobile App Dev. Table Views
ITP 342 Mobile App Dev Table Views Tables A table presents data as a scrolling, singlecolumn list of rows that can be divided into sections or groups. Use a table to display large or small amounts of information
More informationData IAP 2010 iphonedev.csail.mit.edu edward benson / Thursday, January 14, 2010
Data IAP 2010 iphonedev.csail.mit.edu edward benson / eob@csail.mit.edu Today Property Lists User Defaults Settings Panels CoreData Property Lists Today Add persistence. plist 1. Using Property Lists in
More informationStanford CS193p. Developing Applications for ios. Winter CS193p! Winter 2015
Stanford CS193p Developing Applications for ios Today UITextField Bonus Topic! Table View A UIView for displaying long lists or tables of data UITextField Like UILabel, but editable Typing things in on
More informationStanford CS193p. Developing Applications for ios. Fall CS193p. Fall
Stanford Developing Applications for ios Today Drag and Drop Transferring information around within and between apps. EmojiArt Demo Drag and drop an image to get our EmojiArt masterpieces started. UITableView
More informationAnnouncements. Today s Topics
Announcements Lab 2 is due tonight Lab 3 is posted Due next Wednesday Sept 30 th 1 Extensible - CSE 436 Software Networking Engineering Platform Workshop 1 Today s Topics Designing iphone Applica;ons Model-
More informationNavigation bar (Xcode version 4.5.2) 1. Create a new project. From the Xcode menu, select File > New > Project
Navigation bar (Xcode version 4.5.2) 1. Create a new project. From the Xcode menu, select File > New > Project Choose the Single View Application template Click Next. In the Choose options for your new
More informationView Controllers CPRE 388
View Controllers CPRE 388 View Controllers Manage views in model view controller design template. Many types: custom view controller; container view controller; modal view controller. Custom View controllers
More informationimate: ios Application
imate: ios Application Document Version 1.0.1 Date: 27 th May, 2014 2 [IMATE: IOS APPLICATION] Contents AppDelegate Class Reference... 4 Tasks... 4 Properties... 4 Instance Methods... 4 ChatMenuViewController
More informationUICollectionView. NSCoder Milwaukee. 2 April John Psuik. Tuesday, April 2, 13
UICollectionView NSCoder Milwaukee 2 April 2013 John Psuik 1 UICollectionView New to ios 6 Layouts determine placement of items (flowlayout and custom layout) UITableView concepts, but you can do so much
More informationepicurious Anatomy of an ios app Robert Tolar Haining June 25, 2010 ConvergeSE
epicurious Anatomy of an ios app Robert Tolar Haining June 25, 2010 ConvergeSE + = Prototype iphone ipad Why iphone apps Simplicity Control Speed Revenue Epicurious Defined as a Recipe Utility Cookbook
More informationTables. Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder
Tables Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder Mobile Application Development in ios 1 Outline Table View Controller Table View Table Cells
More informationStanford CS193p. Developing Applications for iphone 4, ipod Touch, & ipad Fall Stanford CS193p Fall 2010
Developing Applications for iphone 4, ipod Touch, & ipad Today More Core Data What does the code for the custom NSManagedObject subclasses generated by Xcode look like? Querying for (fetching) objects
More informationCS193P - Lecture 10. iphone Application Development. Performance
CS193P - Lecture 10 iphone Application Development Performance 1 Announcements 2 Announcements Paparazzi 2 is due next Wednesday at 11:59pm 2 Announcements Paparazzi 2 is due next Wednesday at 11:59pm
More informationBuilding GUIs with UIKit. Kevin Cathey
Building GUIs with UIKit Kevin Cathey Building GUIs with UIKit acm.uiuc.edu/macwarriors/devphone Building GUIs with UIKit What is UIKit? acm.uiuc.edu/macwarriors/devphone Building GUIs with UIKit What
More informationIntroductory ios Development
Introductory ios Development 152-164 Unit 5 - Multi-View Apps Quick Links & Text References What is a Delegate? What is a Protocol? Delegates, Protocols and TableViews Creating a Master-Detail App Modifying
More informationComputer Science 251. iphone Application Development. Autorotation, Popover Controllers, Modal Controllers
Computer Science 251 iphone Application Development Autorotation, Popover Controllers, Modal Controllers Two Types of Orientation Device: physically upside down, rotated left, on its back, etc. Can be
More informationMobile Application Development
Mobile Application Development Lecture 16 Controllers of View Controllers 2013/2014 Parma Università degli Studi di Parma Lecture Summary Multiple MVCs UINavigationController Segues UITabBarController
More informationObjective-C Primer. iphone Programmer s Association. Lorenzo Swank September 10, 2008
Objective-C Primer iphone Programmer s Association Lorenzo Swank September 10, 2008 Disclaimer Content was blatantly and unapologetically stolen from the WWDC 2007 Fundamentals of Cocoa session, as well
More informationMy First iphone App (for Xcode version 6.4)
My First iphone App (for Xcode version 6.4) 1. Tutorial Overview In this tutorial, you re going to create a very simple application on the iphone or ipod Touch. It has a text field, a label, and a button
More informationProtocols and Delegates. Dr. Sarah Abraham
Protocols and Delegates Dr. Sarah Abraham University of Texas at Austin CS329e Fall 2016 Protocols Group of related properties and methods that can be implemented by any class Independent of any class
More informationMy First iphone App. 1. Tutorial Overview
My First iphone App 1. Tutorial Overview In this tutorial, you re going to create a very simple application on the iphone or ipod Touch. It has a text field, a label, and a button. You can type your name
More informationlectures/2/src2/nib1/nib1/appdelegate.h // AppDelegate.h // Nib1 // David J. Malan // Harvard University //
lectures/2/src2/nib1/nib1/appdelegate.h 1 1 1 1 1 1 1 1 1 2 AppDelegate.h Nib1 David J. Malan Harvard University malan@harvard.edu Demonstrates a Single View Application implemented with a nib, plus IBAction
More informationios Development Lecture 3 Controllers of View Controllers Ing. Simone Cirani
ios Development Lecture 3 Controllers of View Controllers Ing. Simone Cirani email: simone.cirani@unipr.it http://www.tlc.unipr.it/cirani Corso IFTS Cisita ios Development 2014 Parma Università degli Studi
More informationAdFalcon ios Native Ad SDK Developer's Guide. AdFalcon Mobile Ad Network Product of Noqoush Mobile Media Group
AdFalcon ios Native Ad SDK 3.1.0 Developer's Guide AdFalcon Mobile Ad Network Product of Noqoush Mobile Media Group Table of Contents 1 Introduction... 4 Native Ads Overview... 4 OS version support...
More informationInterfaceBuilder and user interfaces
ES3 Lab 2 InterfaceBuilder and user interfaces This lab InterfaceBuilder Creating components Linking them to your code Adding buttons, labels, sliders UITableView Creating a tableview Customizing cells
More informationIPhone Application of Carleton University. Carleton University Computer Science Honors Project Report
IPhone Application of Carleton University Carleton University Computer Science Honors Project Report Student Name: Yang Cai Student Number: 100309906 Project Supervisor: Dr. Dwight Deugo Date: Dec. 13,
More informationView Controller Lifecycle
View Controller Lifecycle View Controllers have a Lifecycle A sequence of messages is sent to them as they progress through it Why does this matter? You very commonly override these methods to do certain
More informationDetailed Design Specification
Department of Computer Science and Engineering the University of Texas at Arlington Detailed Design Specification BehindtheCurtain Enterprises Project Team Members: Kyle Burgess Kyle Crumpton Austen Herbst
More informationAbout the Tutorial. Audience. Prerequisites. Copyright & Disclaimer
About the Tutorial ios is a mobile operating system developed and distributed by Apple Inc. It was originally released in 2007 for the iphone, ipod Touch, and Apple TV. ios is derived from OS X, with which
More informationA little more Core Data
A little more Core Data A little more Core Data NSFetchedResultsController Interacts with the Core Data database on your behalf [fetchedresultscontroller objectatindexpath:] gets at row data [fetchedresultscontroller
More informationMVC and Interface Builder IAP 2010
MVC and Interface Builder IAP 2010 iphonedev.csail.mit.edu edward benson / eob@csail.mit.edu Information-Driven Applications Application Flow UIApplication Main NIB Initialized UIAppDelegate - (void)applicationdidfinishlaunching:(uiapplication
More informationWidget Tour. iphone and ipod touch Development Fall 2009 Lecture 7
Widget Tour iphone and ipod touch Development Fall 2009 Lecture 7 Questions? Announcements Assignment #2 due Tonight by 11:59pm Today s Topics Controls Buttons Switches Sliders Segmented Controls Text
More informationPraktikum Entwicklung von Mediensystemen mit ios
Praktikum Entwicklung von Mediensystemen mit ios WS 2011 Prof. Dr. Michael Rohs michael.rohs@ifi.lmu.de MHCI Lab, LMU München Today Storyboards Automatic Reference Counting Animations Exercise 3 2 Timeline
More informationIntro to Native ios Development. Dave Koziol Arbormoon Software, Inc.
Intro to Native ios Development Dave Koziol Arbormoon Software, Inc. About Me Long time Apple Developer (20 WWDCs) Organizer Ann Arbor CocoaHeads President & ios Developer at Arbormoon Software Inc. Wunder
More informationStanford CS193p. Developing Applications for ios. Fall Stanford CS193p. Fall 2011
Developing Applications for ios Today Core Data Thread Safety NSManagedObjectContext is not thread-safe. What to do about that. Core Data and Table View Very common way to view data from a Core Data database
More informationMobile Application Development
Mobile Application Development Lecture 13 Introduction to ObjectiveC Part II 2013/2014 Parma Università degli Studi di Parma Lecture Summary Object creation Memory management Automatic Reference Counting
More informationPhone. Making a phone call within app ( and returning to app after call ends ) is as easy as :
Phone Making a phone call within app ( and returning to app after call ends ) is as easy as : -(void)makecall { UIApplication *application = [UIApplication sharedapplication]; NSURL *URL = [NSURL URLWithString:
More informationStanford CS193p. Developing Applications for ios. Fall Stanford CS193p. Fall 2011
Developing Applications for ios Today UI Element of the Week UIToolbar ipad Split View Popover Universal (iphone + ipad) Application Demo Friday Section AVFoundation framework - Capturing and manipulating
More informationOVERVIEW. Why learn ios programming? Share first-hand experience. Identify platform differences. Identify similarities with.net
OVERVIEW Why learn ios programming? Share first-hand experience. Identify platform differences. Identify similarities with.net Microsoft MVP for 4 years C#, WinForms, WPF, Silverlight Joined Cynergy about
More informationCollection Views. Dr. Sarah Abraham
Collection Views Dr. Sarah Abraham University of Texas at Austin CS329e Fall 2016 What is a Collection View? Presents an ordered set of data items in a flexible layout Subclass of UIScrollView (like UITableView)
More informationUser Experience: Windows & Views
View Controller Programming Guide for ios User Experience: Windows & Views 2011-01-07 Apple Inc. 2011 Apple Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval
More informationDocument Version Date: 1st March, 2015
7 Minute Fitness: ios(swift) Application Document Version 1.0.1 Date: 1st March, 2015 2 [7 MINUTE FITNESS: APP DOCUMENTATION] Important Notes:... 5 AppDelegate Class Reference... 6 Tasks... 6 Instance
More informationCS 6030 Bioinformatics Summer II 2012 Semester Project Final Report Chandana Sripha Guduru Jason Eric Johnson
CS 6030 Bioinformatics Summer II 2012 Semester Project Final Report Chandana Sripha Guduru Jason Eric Johnson 1 Team Members:! 3 Project Description:! 3 Project Goals:! 3 Research/Design:! 3 Web Service
More informationNews- ipad: ios(swift) Application
News- ipad: ios(swift) Application Document Version 1.0.1 Date: 9 th Nov, 2014 2 [NEWS- IPAD: APP DOCUMENTATION] Important Notes:... 6 AppDelegate Class Reference... 7 Tasks... 7 Instance Methods... 7
More informationAssignment IV: Smashtag Mentions
Assignment IV: Smashtag Mentions Objective In this assignment, you will enhance the Smashtag application that we built in class to give ready-access to hashtags, urls, images and users mentioned in a tweet.
More informationCOMPLETE TUTORIAL COURSE. Learn to make tvos LE. apps with real-worldam S F
HACKING WITH SWIFT COMPLETE TUTORIAL COURSE Learn to make tvos LE P apps with real-worldam S Swift projects REEPaul Hudson F Project 1 Randomly Beautiful 2 www.hackingwithswift.com Setting up In this first
More informationAdvanced ios. CSCI 4448/5448: Object-Oriented Analysis & Design Lecture 20 11/01/2012
Advanced ios CSCI 4448/5448: Object-Oriented Analysis & Design Lecture 20 11/01/2012 1 Goals of the Lecture Present a few additional topics and concepts related to ios programming persistence serialization
More informationCS193E Lecture 7. Document-based Applications NSTableView Key-Value Coding
CS193E Lecture 7 Document-based Applications NSTableView Key-Value Coding Agenda Questions? Review: delegates, MVC Document-based apps Table views Key Value Coding Model, View, Controller Controller Model
More informationiphone Application Programming Lecture 5: View Programming
Lecture 5: View Programming Nur Al-huda Hamdan RWTH Aachen University Winter Semester 2015/2016 http://hci.rwth-aachen.de/iphone Name the UI Elements In the Screen 2 View Programming 3 View Programming
More informationCS 47. Beginning iphone Application Development
CS 47 Beginning iphone Application Development Introductions Who, why, which? Shameless Plug: LoudTap Wifi Access (If it works..) SSID: Stanford Username/password: csp47guest Expectations This is a programming
More informationLearning ios 8 for Enterprise
Learning ios 8 for Enterprise Design and develop stunning ios applications for business environments Mayank Birani BIRMINGHAM - MUMBAI Learning ios 8 for Enterprise Copyright 2014 Packt Publishing All
More informationView Concepts. iphone Application Programming Lecture 4: User Interface Design. SDK provide many types of Views to show your content
View Concepts iphone Application Programming Lecture 4: User Interface Design SDK provide many types of Views to show your content At run-time Views are organized as a tree Chat Wacharamanotham Media Computing
More informationImplement continuous integration and delivery in your ios projects. Pro. ios Continuous Integration. Romain Pouclet.
Implement continuous integration and delivery in your ios projects Pro ios Continuous Integration Romain Pouclet For your convenience Apress has placed some of the front matter material after the index.
More informationiphone Application Tutorial
iphone Application Tutorial 2008-06-09 Apple Inc. 2008 Apple Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any
More informationDeveloping Applications for ios
Developing Applications for ios Lecture 7: View Controller Lifecycle and UIKit Radu Ionescu raducu.ionescu@gmail.com Faculty of Mathematics and Computer Science University of Bucharest Content View Controller
More informationIndex. btndrop function, 224, 226 btngetquote function, 246 btnpressed function, 28 btnquote method, 245. CallWeb method, 238, 240
Index A App icons section icons set, 277 LaunchImage, 278 launch screen graphics, 278 279 PNG format, 277 settings, 276 App store deployment application graphics, 273 general settings Identity section,
More informationFrom Hello World to Finished App. raywenderlich.com
From Hello World to Finished App Why Learn ios? - Strong demand - Motivating - App Store - It s fun! What s This All About? - One Day Crash Course - For beginners & intermediates - Making apps with UIKit
More informationMobile Application Programming. Memory Management
Mobile Application Programming Memory Management Memory Management Ownership Model Memory Management in Objective-C is based on an ownership model. Objects may have many owners. Actions that result in
More informationsrc3/bettertextfield/bettertextfield/appdelegate.h // AppDelegate.h // BetterTextField
src3/bettertextfield/bettertextfield/appdelegate.h 1 1 1 1 AppDelegate.h BetterTextField Created by Tommy MacWilliam on 3/7/ Copyright (c) 2012 MyCompanyName. All rights reserved. #import
More informationSQLitePersistentObjects
SQLite Without the SQL Jeff LaMarche And that is spelled with an A contrary to the sign out front. Contacting Me jeff_lamarche@mac.com http://iphonedevelopment.blogspot.com Twitter: jeff_lamarche A lot
More informationAdvanced Performance Optimization on iphone OS
Advanced Performance Optimization on iphone OS Part 2: Working with Data Efficiently Ben Nham iphone Performance 2 Introduction Focus on working with data efficiently In-memory data structures Serialization
More informationSocial Pinboard: ios(swift) Application
Social Pinboard: ios(swift) Application Document Version 1.0.1 Date: 15 th May, 2015 2 [SOCIAL PINBOARD: APP DOCUMENTATION] Important Notes:... 5 AppDelegate Class Reference... 6 Tasks... 6 Instance Methods...
More informationMy First Cocoa Program
My First Cocoa Program 1. Tutorial Overview In this tutorial, you re going to create a very simple Cocoa application for the Mac. Unlike a line-command program, a Cocoa program uses a graphical window
More informationios Core Data Example Application
ios Core Data Example Application The Core Data framework provides an abstract, object oriented interface to database storage within ios applications. This does not require extensive knowledge of database
More informationCOPYRIGHTED MATERIAL. part I Developing a Professional UI. Chapter 1: Creating a Personal Library. Chapter 2: Advancing with Tableviews
part I Developing a Professional UI Chapter 1: Creating a Personal Library Chapter 2: Advancing with Tableviews Chapter 3: Advancing with Map Kit Chapter 4: Understanding Action Views and Alerts Chapter
More informationAdvanced Memory Analysis with Instruments. Daniel Delwood Performance Tools Engineer
Advanced Memory Analysis with Instruments Daniel Delwood Performance Tools Engineer 2 Memory Analysis What s the issue? Memory is critical to performance Limited resource Especially on iphone OS 3 4 Memory
More informationStanford CS193p. Developing Applications for ios. Fall Stanford CS193p. Fall 2011
Developing Applications for ios Views A view (i.e. UIView subclass) represents a rectangular area Defines a coordinate space Draws and handles events in that rectangle Hierarchical A view has only one
More informationUser Experience: Windows & Views
View Programming Guide for ios User Experience: Windows & Views 2010-07-07 Apple Inc. 2010 Apple Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or
More informationiphone App Basics iphone and ipod touch Development Fall 2009 Lecture 5
iphone App Basics iphone and ipod touch Development Fall 2009 Lecture 5 Questions? Announcements Assignment #1 due this evening by 11:59pm Remember, if you wish to use a free late you must email me before
More informationAdvanced Object- C Features
Advanced Object- C Features Advanced Features Proper6es Categories Protocols Delegates Selectors Key- Value Coding Predicators Proper6es Provide access to object a?ributes Shortcut to implemen6ng ge?er/se?er
More informationPage 1. GUI Programming. Lecture 13: iphone Basics. iphone. iphone
GUI Programming Lecture 13: iphone Basics Until now, we have only seen code for standard GUIs for standard WIMP interfaces. Today we ll look at some code for programming mobile devices. on the surface,
More informationDeveloping Applications for ios
Developing Applications for ios Lab 10: Nearby Deals (6 of 6) Radu Ionescu raducu.ionescu@gmail.com Faculty of Mathematics and Computer Science University of Bucharest Task 1 Task: Save the favorite deals
More informationReview (Basic Objective-C)
Classes Header.h (public) versus Implementation.m (private) @interface MyClass : MySuperclass... @end (only in header file) @interface MyClass()... @end (only in implementation file) @implementation...
More informationiphone Programming Touch, Sound, and More! Norman McEntire Founder Servin Flashlight CodeTour TouchCount CodeTour
iphone Programming Touch, Sound, and More! Norman McEntire Founder Servin 1 Legal Info iphone is a trademark of Apple Inc. Servin is a trademark of Servin Corporation 2 Welcome Welcome! Thank you! My promise
More informationLab #1: Chuck Norris Joke Generator Class
Lab #1: Chuck Norris Joke Generator Class Chuck Norris does not need Twitter... he is already following you. Chuck Norris doesn t flush the toilet, he scares the sh*t out of it. Chuck Norris is the reason
More informationITP 342 Mobile App Dev. Collection View
ITP 342 Mobile App Dev Collection View Collection View A collection view manages an ordered collection of items and presents them in a customizable layout. A collection view: Can contain optional views
More informationCreate an App that will drop PushPins onto a map based on addresses that the user inputs.
Overview Create an App that will drop PushPins onto a map based on addresses that the user inputs. Part 1: Introduction to MKMapKit Part 2: Introduction to PushPins Part 3: Use Google s API to lookup an
More informationSAMPLE CHAPTER. Brendan G. Lim Martin Conte Mac Donell MANNING
SAMPLE CHAPTER Brendan G. Lim Martin Conte Mac Donell MANNING ios 7 in Action by Brendan G. Lim Martin Conte Mac Donell Chapter 2 Copyright 2014 Manning Publications brief contents PART 1 BASICS AND NECESSITIES...1
More informationAnnouncement. Final Project Proposal Presentations and Updates
Announcement Start Final Project Pitches on Wednesday Presentation slides dues by Tuesday at 11:59 PM Email slides to cse438ta@gmail.com Extensible Networking Platform 1 1 - CSE 438 Mobile Application
More informationStanford CS193p. Developing Applications for iphone 4, ipod Touch, & ipad Fall Stanford CS193p Fall 2010
Developing Applications for iphone 4, ipod Touch, & ipad Today One last Objective-C topic: Protocols Using protocols to define/implement/use a data source and/or delegate Views UIView and UIWindow classes
More informationView Concepts. iphone Application Programming Lecture 4: User Interface Design. SDK provide many types of Views to show your content
View Concepts iphone Application Programming Lecture 4: User Interface Design SDK provide many types of Views to show your content At run-time Views are organized as a tree Chat Wacharamanotham Media Computing
More informationIOS - TEXT FIELD. Use of Text Field. Important Properties of Text Field. Updating Properties in xib
IOS - TEXT FIELD http://www.tutorialspoint.com/ios/ios_ui_elements_text_field.htm Copyright tutorialspoint.com Use of Text Field A text field is a UI element that enables the app to get user input. A UITextfield
More informationView Controller Advancements for ios8
Frameworks #WWDC14 View Controller Advancements for ios8 Session 214 Bruce D. Nilo Manager, UIKit Fundamentals 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without
More informationAcollada ios Charting Components
Acollada ios Charting Components Acollada ios Charting Components... 1 LineChartView... 3 Description... 3 Screenshot... 3 Protocols to be implemented... 3 Customizing the LineChartView aspect... 4 How
More informationQuickPrints SDK for ios Version 3.3 August 06, 2014
Introduction The QuickPrints SDK for ios (ipod Touch, iphone, and ipad) is a static library that provides a set of APIs that can be used to submit a photo print order to a Walgreens store. This document
More informationMobile Computing. Overview. What is ios? 8/26/12. CSE 40814/60814 Fall 2012
Mobile Computing CSE 40814/60814 Fall 2012 Overview ios is the opera8ng system that runs iphones, ipod Touches, ipads, and Apple TVs. The language used to develop sogware for ios is Objec8ve- C (very similar
More informationITP 342 Advanced Mobile App Dev. Memory
ITP 342 Advanced Mobile App Dev Memory Memory Management Objective-C provides two methods of application memory management. 1. In the method described in this guide, referred to as manual retain-release
More informationProgramming ios in Lua A bridge story
Lua Workshop 2016 Programming ios in Lua A bridge story Jean-Luc Jumpertz @JLJump October 14, 2016 CodeFlow Live Application Development Environment for ios, tvos & macos CodeFlow Live Application Development
More information