13- displaydata

13- displaydata - Click to edit Master subtitle style...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Click to edit Master subtitle style 5/7/11 Displaying Data on the iPhone CSE 390 Fall 2010 5/7/11 Managing the display of data An important aspect of developing apps for mobile devices is their small screen size. With limited screen real estate its not possible to display long lists of items, multiple images, videos, and text (etc.) on a single screen. In this demo well explore the ways that the iOS SDK provides to manage content. For the first time well look at a Navigation-based Application, and well learn about table views and detail views. Well also learn how to play videos and read 5/7/11 The idea behind the app In the spring semester I teach CSE 323, Human Computer Interaction. Its a really fun class where students develop novel interfaces, such as speech recognition, hand writing recognition, computer vision, and more. Many student projects have been presented at conferences and published in journals over the years. I got to thinking it would be nice to have an app on my iPhone that I could show to people that would include screenshots of the applications and even video clips. I thought I could do this in three screens a list of projects in the 1st screen, screenshots on the 2nd, and video clips with some text on the last screen. 5/7/11 The Navigation-based Application We begin by launching Xcode and choosing to create a new project, a Navigation-based Application. Youll note that we have a RootViewController created for us in the project. If you double-click the RootViewController.xib file from the Resources directory to launch Interface Builder, youll see that the view already looks like a table with some sample data in it. If you select the Table View and then look at its Attributes in the Inspector, you can change the Style from Plain to Grouped. These are the 2 main ways the table can be displayed, although a lot more customization can take place. We will use the Plain 5/7/11 Getting set up We will need to populate the table with a list of projects. There are many ways to do this, for example an external data source could be read in, such as a plist . But since our list will be fairly short 10 items we can do it in an array. Well create a second array of dates to customize the table rows with a year for each project. And well need to create a string to hold the users selection of a project from the table that they want to find out more about, so it can be passed along to the subsequent views. The 5/7/11 The RootViewController.h file #import <UIKit/UIKit.h> @interface RootViewController : UITableViewController { NSMutableArray * projects ; //a list of research projects NSMutableArray * dates ; //a list of dates of research projects NSString * currentItem ; //a string that holds the name of the object the user selected } @property ( nonatomic , retain ) NSMutableArray *projects; @property ( nonatomic , retain ) NSMutableArray *dates; 5/7/11 The RootViewController.m file At this point we are just interested in populating...
View Full Document

This note was uploaded on 05/07/2011 for the course CSE 390 taught by Professor Scarlatos during the Fall '11 term at SUNY Stony Brook.

Page1 / 33

13- displaydata - Click to edit Master subtitle style...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online