SlideShare a Scribd company logo
1 of 10
Download to read offline
CS193P                                                                                   Paparazzi 1
Winter 2010                                                                      Cannistraro/Shaffer

                                     Paparazzi - Part 1
Due Date
This assignment is due by 11:59 PM, February 3.

Assignment
Over the next four weeks, we’ll be building an iPhone application for viewing online photos, also
known as “paparazzi” for a list of friends. Just so you know what you’re getting yourself into, the
                    ,
evolution of the application will be as follows:

Part 1: Build a basic application, displaying static data, using view controllers. Allow the user to
navigate to see additional detail.

Part 2: Use table views and Core Data to display large dynamic data sets.

Part 3: Fetch photos from the Internet, populating the Core Data database with real data. Plot
geo-tagged photos’ locations on a map using MapKit.

Part 4: Improve the performance and responsiveness of your application with caching and
threading. Add support for pinching to zoom in and out on photos. Anything else you can think
of! This is your opportunity to try out unfamiliar API, polish your interface and experiment a bit.

Now that you have some idea where we’re headed, here’s what we’re expecting for Part 1:

• Create an application that utilizes UINavigationController and UITabBarController. The
  navigation and tab bar controllers may be instantiated in your MainWindow XIB or
  programmatically in your application delegate.
• Create a view controller that will manage a list of people (a good name might be
  PersonListViewController). Use Interface Builder to lay out a view and make connections
  between the view controller and user interface elements. The list should display a photo, a text
  label with the photographer’s name and a “View” button next to each person (show at least
  two).
• Create another view controller that will manage a list of photos (a good name might be
  PhotoListViewController). The PhotoListViewController should expose a property for setting an
  array of photos it will display. The list should display each photo, a text label with the photo’s
  name, a text label with the photographer’s name, and a “View” button next to each photo.
  Again, use Interface Builder to lay out the view and make connections.
• Create one more view controller that will display a specific photo (a good name might be
  PhotoDetailViewController). The PhotoDetailViewController should expose a property for
  setting the photo. Once more, use Interface Builder to lay out the view and make connections.
• When your application launches it should create a tab bar controller and two navigation
  controllers, and then add the navigation controllers to the tab bar controller. The first
  navigation controller will be used for a list of contacts, and the second for a list of recently
  viewed images. It should then create an instance of the PersonListViewController and push it
  onto the first navigation controller’s stack, and create an instance of the
  PhotoListViewController and push it on the second navigation controller’s stack. An
  appropriate title should display in both navigation bars.
• When the user presses one of the “View” buttons in the list, create a PhotoListViewController or
  PhotoDetailViewController instance as appropriate, set its display properties to reflect the data
  that’s being displayed, and push it onto the navigation stack. Again, an appropriate title should
  display in the navigation bar.




                                            Page 1 of 10
CS193P                                                                                 Paparazzi 1
Winter 2010                                                                    Cannistraro/Shaffer


 Testing
In most assignments testing of the resulting application is the primary objective. In this case,
testing/grading will be done both on the behavior of the application, and also on the code.

We will be looking at the following:
1. Your project should build without errors or warnings and run without crashing.
2. Each view controller should be the File’s Owner of its own Interface Builder document. Do
   not put your entire application into a single Interface Builder document! It’s bad for
   performance as well as application maintainability.
3. Your program should behave as described above, presenting a tab bar with two navigation
   hierarchies. The first navigation hierarchy should be a list of people that leads to a list of
   photos and ends with a photo detail view. The second should be a list of photos that leads
   to a photo detail view.

Walkthrough

Creating your project in Xcode

To begin with, create a new project using the “Window-Based Application” template in
Xcode. There is a “Navigation-Based Application” template which may look tempting, but it has a
lot of code already written (particularly for incorporating a UITableView) which we don’t want for
this assignment.




Using this template will create a project that has an application delegate class and a
MainWindow.xib Interface Builder document.


                                           Page 2 of 10
CS193P                                                                                Paparazzi 1
Winter 2010                                                                   Cannistraro/Shaffer


Creating your tab bar and navigation controllers

You can create a UITabBarController and two UINavigationControllers in your MainWindow NIB
or in code using the -init method. Either way, your application delegate should probably have
instance variables referencing them (don’t forget to release them in the appropriate place!).

With the tab bar controller created, you’ll need to add its view to the window. Remember,
UITabBarController is a UIViewController subclass, so it has a view property that you can access.

Try building & running your application now & see what happens.




                                           Page 3 of 10
CS193P                                                                                 Paparazzi 1
Winter 2010                                                                    Cannistraro/Shaffer

Creating your first view controller subclass

First, we need to create the header and implementation files for our new UIViewController
subclass. Select “New File…” and use the UIViewController subclass file template. Check the
“With XIB for user interface” checkbox to get an XIB created for you. If you don’t check it now
you can always create one later from the User Interface tab on the left.




Using this template will create a UIViewController subclass with quite a few methods already
filled in. You can peruse this if you’re curious, but then delete all of the implemented methods
from the .m file. We don’t need any of that right now.




                                           Page 4 of 10
CS193P                                                                                  Paparazzi 1
Winter 2010                                                                     Cannistraro/Shaffer

Lay out your static list of people using labels, buttons and image views. In addition, if you didn’t
create the XIB with the “With XIB for user interface” checkbox, we need our view controller to
manage the XIB. There are two steps to make this
happen.

First, we need to set the view controller as the
custom class for the File’s Owner proxy object. Select
the File’s Owner object in your xib, then navigate to the
Identity Inspector in the Tools menu. Type in the name
of your view controller subclass in the text field.

Now that the XIB knows that the File’s Owner is an
instance of your view controller subclass, we can make
the connection from the “view” outlet to the view.
You already know how to do this.




                                            Page 5 of 10
CS193P                                                                                Paparazzi 1
Winter 2010                                                                   Cannistraro/Shaffer

Next, we want to create a PersonListViewController instance and display it in our navigation
stack. This code should go in your application delegate in the same place you create your
navigation controller. Using the -initWithNibName:bundle: method, pass the name of your
Interface Builder document as the first argument (you can leave out the file extension), and
[NSBundle mainBundle] as the second argument.

Finally, we need to push the view controller onto the navigation controller’s stack so that it’s
displayed. Now, you should be able to build & run from Xcode and see your list. At this point, it
should look something like this:




                                          Page 6 of 10
CS193P                                                                                 Paparazzi 1
Winter 2010                                                                    Cannistraro/Shaffer

The rest of the assignment, in brief...

Create a second view controller subclass & NIB using the same steps as above. When a button
in your list of contacts is touched, push an instance of this second view controller. You’ll
want to expose some properties so that it knows what to display. Make sure not to leak
memory! The view should look something like this:




Remember that UIView has a hidden property you can use to prevent it from drawing. You can
use this to hide some views if you have less images to display than views to display them.

In order to display a helpful title in the navigation bar when each view controller is being
shown, you’ll want to set the title property for each view controller. See the lecture slides for a
hint on where to do this.



                                           Page 7 of 10
CS193P                                                                               Paparazzi 1
Winter 2010                                                                  Cannistraro/Shaffer

Create a final view controller subclass & NIB using the same steps as above. When a button in
your list of photos is touched, push an instance of this final view controller. You’ll want to
expose some properties so that it knows what to display. Make sure not to leak memory! The
view should look something like this:




                                          Page 8 of 10
CS193P                                                                                  Paparazzi 1
Winter 2010                                                                     Cannistraro/Shaffer

Finally, we need to set up the Recents tab. We’ve already created all the view controller
subclasses we need to implement this entire view. We can just instantiate and push a photo
list view controller onto the second navigation controller’s stack and set its list of photos to
all of the available photos. This would probably be done as part of the initial application setup,
back where we created the first view controller for the other navigation controller. At this point,
it should look something like this:




                                           Page 9 of 10
CS193P                                                                                  Paparazzi 1
Winter 2010                                                                     Cannistraro/Shaffer

Extra Credit
Here are some suggestions for enhancing this first iteration of Paparazzi.

• Add custom buttons on the left or right side of the navigation bar for the person list view
  controller. When pressed the button should provide some interesting feedback, like popping
  up an alert or animating your UI momentarily.
• Our Paparazzi screenshots are pretty dull. Spice yours up with some better colors and artwork.
• Think of a reason for a fourth view controller subclass, and push it onto the navigation stack in
  response to some user action. Make it load some data when it’s about to appear & save the
  data when it’s about to disappear.




                                           Page 10 of 10

More Related Content

Viewers also liked

Problem Ar
Problem ArProblem Ar
Problem ArMahmoud
 
مهارات كتابه السيرة الذاتيه واجتياز المقابله الشخصيه
مهارات كتابه السيرة الذاتيه واجتياز المقابله الشخصيهمهارات كتابه السيرة الذاتيه واجتياز المقابله الشخصيه
مهارات كتابه السيرة الذاتيه واجتياز المقابله الشخصيهMahmoud
 
C8 1 Communication Skills
C8 1 Communication SkillsC8 1 Communication Skills
C8 1 Communication SkillsMahmoud
 
إدارة الاولويات
إدارة الاولوياتإدارة الاولويات
إدارة الاولوياتSamir Sami
 
The art of tactics
The art of tacticsThe art of tactics
The art of tacticsSamir Sami
 
C16 1 Health, Safety And Environment
C16 1 Health, Safety And EnvironmentC16 1 Health, Safety And Environment
C16 1 Health, Safety And EnvironmentMahmoud
 
مهارات التفكير الإبتكاري كيف تكون مبدعا؟
مهارات التفكير الإبتكاري  كيف تكون مبدعا؟مهارات التفكير الإبتكاري  كيف تكون مبدعا؟
مهارات التفكير الإبتكاري كيف تكون مبدعا؟Mahmoud
 
التفاوض علم وفن
التفاوض علم وفن التفاوض علم وفن
التفاوض علم وفن Samir Sami
 
مهارات التفاوض
مهارات التفاوضمهارات التفاوض
مهارات التفاوضAhmed sayed
 
Negotiation Skills Updated
Negotiation Skills UpdatedNegotiation Skills Updated
Negotiation Skills UpdatedMahmoud
 
C3 1 Research Methods And Writing Research Proposals
C3 1 Research Methods And Writing Research ProposalsC3 1 Research Methods And Writing Research Proposals
C3 1 Research Methods And Writing Research ProposalsMahmoud
 

Viewers also liked (15)

Problem Ar
Problem ArProblem Ar
Problem Ar
 
مهارات كتابه السيرة الذاتيه واجتياز المقابله الشخصيه
مهارات كتابه السيرة الذاتيه واجتياز المقابله الشخصيهمهارات كتابه السيرة الذاتيه واجتياز المقابله الشخصيه
مهارات كتابه السيرة الذاتيه واجتياز المقابله الشخصيه
 
Health Ar
Health ArHealth Ar
Health Ar
 
C8 1 Communication Skills
C8 1 Communication SkillsC8 1 Communication Skills
C8 1 Communication Skills
 
Teams Ar
Teams ArTeams Ar
Teams Ar
 
8 key-steps
8 key-steps8 key-steps
8 key-steps
 
إدارة الاولويات
إدارة الاولوياتإدارة الاولويات
إدارة الاولويات
 
The art of tactics
The art of tacticsThe art of tactics
The art of tactics
 
C16 1 Health, Safety And Environment
C16 1 Health, Safety And EnvironmentC16 1 Health, Safety And Environment
C16 1 Health, Safety And Environment
 
مهارات التفكير الإبتكاري كيف تكون مبدعا؟
مهارات التفكير الإبتكاري  كيف تكون مبدعا؟مهارات التفكير الإبتكاري  كيف تكون مبدعا؟
مهارات التفكير الإبتكاري كيف تكون مبدعا؟
 
التفاوض علم وفن
التفاوض علم وفن التفاوض علم وفن
التفاوض علم وفن
 
مهارات التفاوض
مهارات التفاوضمهارات التفاوض
مهارات التفاوض
 
Negotiation Skills Updated
Negotiation Skills UpdatedNegotiation Skills Updated
Negotiation Skills Updated
 
C3 1 Research Methods And Writing Research Proposals
C3 1 Research Methods And Writing Research ProposalsC3 1 Research Methods And Writing Research Proposals
C3 1 Research Methods And Writing Research Proposals
 
Negotiation Skills
Negotiation SkillsNegotiation Skills
Negotiation Skills
 

Similar to Assignment 4 Paparazzi1

Paparazzi2
Paparazzi2Paparazzi2
Paparazzi2Mahmoud
 
Making mobile flex apps blazing fast
Making mobile flex apps blazing fastMaking mobile flex apps blazing fast
Making mobile flex apps blazing fastMichał Wróblewski
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the informationToushik Paul
 
Progressive Web Application by Citytech
Progressive Web Application by CitytechProgressive Web Application by Citytech
Progressive Web Application by CitytechRitwik Das
 
Login Project with introduction .pptx
Login Project with introduction .pptxLogin Project with introduction .pptx
Login Project with introduction .pptxkulmiyealiabdille
 
EXPLORING VARIOUS UI INTERACTION PATTERNS
EXPLORING VARIOUS UI INTERACTION PATTERNSEXPLORING VARIOUS UI INTERACTION PATTERNS
EXPLORING VARIOUS UI INTERACTION PATTERNSROHISIVAM
 
iOS Development (Part 3) - Additional GUI Components
iOS Development (Part 3) - Additional GUI ComponentsiOS Development (Part 3) - Additional GUI Components
iOS Development (Part 3) - Additional GUI ComponentsAsim Rais Siddiqui
 
Create Location Sharing apps using the Ionic framework
Create Location Sharing apps using the Ionic framework					Create Location Sharing apps using the Ionic framework
Create Location Sharing apps using the Ionic framework Shelly Megan
 
Code camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una DalyCode camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una DalyUna Daly
 
Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outletsveeracynixit
 
Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outletsveeracynixit
 
Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)Shubham Goenka
 
control structure in visual basic
control structure in visual basic control structure in visual basic
control structure in visual basic classall
 

Similar to Assignment 4 Paparazzi1 (20)

04 objective-c session 4
04  objective-c session 404  objective-c session 4
04 objective-c session 4
 
Paparazzi2
Paparazzi2Paparazzi2
Paparazzi2
 
Knockout in action
Knockout in actionKnockout in action
Knockout in action
 
Introduction of Xcode
Introduction of XcodeIntroduction of Xcode
Introduction of Xcode
 
Making mobile flex apps blazing fast
Making mobile flex apps blazing fastMaking mobile flex apps blazing fast
Making mobile flex apps blazing fast
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the information
 
Progressive Web Application by Citytech
Progressive Web Application by CitytechProgressive Web Application by Citytech
Progressive Web Application by Citytech
 
Login Project with introduction .pptx
Login Project with introduction .pptxLogin Project with introduction .pptx
Login Project with introduction .pptx
 
EXPLORING VARIOUS UI INTERACTION PATTERNS
EXPLORING VARIOUS UI INTERACTION PATTERNSEXPLORING VARIOUS UI INTERACTION PATTERNS
EXPLORING VARIOUS UI INTERACTION PATTERNS
 
Open sap ui5 - week_2 unit_1_syjewa_exercises
Open sap ui5  - week_2 unit_1_syjewa_exercisesOpen sap ui5  - week_2 unit_1_syjewa_exercises
Open sap ui5 - week_2 unit_1_syjewa_exercises
 
iOS Development (Part 3) - Additional GUI Components
iOS Development (Part 3) - Additional GUI ComponentsiOS Development (Part 3) - Additional GUI Components
iOS Development (Part 3) - Additional GUI Components
 
Building richwebapplicationsusingasp
Building richwebapplicationsusingaspBuilding richwebapplicationsusingasp
Building richwebapplicationsusingasp
 
iOS Development (Part 2)
iOS Development (Part 2)iOS Development (Part 2)
iOS Development (Part 2)
 
Create Location Sharing apps using the Ionic framework
Create Location Sharing apps using the Ionic framework					Create Location Sharing apps using the Ionic framework
Create Location Sharing apps using the Ionic framework
 
Code camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una DalyCode camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una Daly
 
Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outlets
 
Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outlets
 
Vb%20 tutorial
Vb%20 tutorialVb%20 tutorial
Vb%20 tutorial
 
Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)
 
control structure in visual basic
control structure in visual basic control structure in visual basic
control structure in visual basic
 

More from Mahmoud

كيف تقوى ذاكرتك
كيف تقوى ذاكرتككيف تقوى ذاكرتك
كيف تقوى ذاكرتكMahmoud
 
مهارات التعامل مع الغير
مهارات التعامل مع الغيرمهارات التعامل مع الغير
مهارات التعامل مع الغيرMahmoud
 
ستيفن كوفي ( ادارة الاولويات ) لايفوتكم
ستيفن كوفي ( ادارة الاولويات ) لايفوتكمستيفن كوفي ( ادارة الاولويات ) لايفوتكم
ستيفن كوفي ( ادارة الاولويات ) لايفوتكمMahmoud
 
تطوير الذاكرة تعلم كيف تحفظ 56 كلمة كل 10 دقائق
تطوير الذاكرة    تعلم كيف تحفظ 56 كلمة كل 10 دقائقتطوير الذاكرة    تعلم كيف تحفظ 56 كلمة كل 10 دقائق
تطوير الذاكرة تعلم كيف تحفظ 56 كلمة كل 10 دقائقMahmoud
 
الشخصية العبقرية
الشخصية العبقريةالشخصية العبقرية
الشخصية العبقريةMahmoud
 
مهارات التفكير الإبتكاري كيف تكون مبدعا؟
مهارات التفكير الإبتكاري  كيف تكون مبدعا؟مهارات التفكير الإبتكاري  كيف تكون مبدعا؟
مهارات التفكير الإبتكاري كيف تكون مبدعا؟Mahmoud
 
مهارات التعامل مع الغير
مهارات التعامل مع الغيرمهارات التعامل مع الغير
مهارات التعامل مع الغيرMahmoud
 
تطوير الذاكرة تعلم كيف تحفظ 56 كلمة كل 10 دقائق
تطوير الذاكرة    تعلم كيف تحفظ 56 كلمة كل 10 دقائقتطوير الذاكرة    تعلم كيف تحفظ 56 كلمة كل 10 دقائق
تطوير الذاكرة تعلم كيف تحفظ 56 كلمة كل 10 دقائقMahmoud
 
كيف تقوى ذاكرتك
كيف تقوى ذاكرتككيف تقوى ذاكرتك
كيف تقوى ذاكرتكMahmoud
 
ستيفن كوفي ( ادارة الاولويات ) لايفوتكم
ستيفن كوفي ( ادارة الاولويات ) لايفوتكمستيفن كوفي ( ادارة الاولويات ) لايفوتكم
ستيفن كوفي ( ادارة الاولويات ) لايفوتكمMahmoud
 
الشخصية العبقرية
الشخصية العبقريةالشخصية العبقرية
الشخصية العبقريةMahmoud
 
Accident Investigation
Accident InvestigationAccident Investigation
Accident InvestigationMahmoud
 
Investigation Skills
Investigation SkillsInvestigation Skills
Investigation SkillsMahmoud
 
Building Papers
Building PapersBuilding Papers
Building PapersMahmoud
 
Appleipad 100205071918 Phpapp02
Appleipad 100205071918 Phpapp02Appleipad 100205071918 Phpapp02
Appleipad 100205071918 Phpapp02Mahmoud
 
Operatingsystemwars 100209023952 Phpapp01
Operatingsystemwars 100209023952 Phpapp01Operatingsystemwars 100209023952 Phpapp01
Operatingsystemwars 100209023952 Phpapp01Mahmoud
 
A Basic Modern Russian Grammar
A Basic Modern Russian Grammar A Basic Modern Russian Grammar
A Basic Modern Russian Grammar Mahmoud
 
Small Projects
Small ProjectsSmall Projects
Small ProjectsMahmoud
 

More from Mahmoud (20)

كيف تقوى ذاكرتك
كيف تقوى ذاكرتككيف تقوى ذاكرتك
كيف تقوى ذاكرتك
 
مهارات التعامل مع الغير
مهارات التعامل مع الغيرمهارات التعامل مع الغير
مهارات التعامل مع الغير
 
ستيفن كوفي ( ادارة الاولويات ) لايفوتكم
ستيفن كوفي ( ادارة الاولويات ) لايفوتكمستيفن كوفي ( ادارة الاولويات ) لايفوتكم
ستيفن كوفي ( ادارة الاولويات ) لايفوتكم
 
تطوير الذاكرة تعلم كيف تحفظ 56 كلمة كل 10 دقائق
تطوير الذاكرة    تعلم كيف تحفظ 56 كلمة كل 10 دقائقتطوير الذاكرة    تعلم كيف تحفظ 56 كلمة كل 10 دقائق
تطوير الذاكرة تعلم كيف تحفظ 56 كلمة كل 10 دقائق
 
الشخصية العبقرية
الشخصية العبقريةالشخصية العبقرية
الشخصية العبقرية
 
مهارات التفكير الإبتكاري كيف تكون مبدعا؟
مهارات التفكير الإبتكاري  كيف تكون مبدعا؟مهارات التفكير الإبتكاري  كيف تكون مبدعا؟
مهارات التفكير الإبتكاري كيف تكون مبدعا؟
 
مهارات التعامل مع الغير
مهارات التعامل مع الغيرمهارات التعامل مع الغير
مهارات التعامل مع الغير
 
تطوير الذاكرة تعلم كيف تحفظ 56 كلمة كل 10 دقائق
تطوير الذاكرة    تعلم كيف تحفظ 56 كلمة كل 10 دقائقتطوير الذاكرة    تعلم كيف تحفظ 56 كلمة كل 10 دقائق
تطوير الذاكرة تعلم كيف تحفظ 56 كلمة كل 10 دقائق
 
كيف تقوى ذاكرتك
كيف تقوى ذاكرتككيف تقوى ذاكرتك
كيف تقوى ذاكرتك
 
ستيفن كوفي ( ادارة الاولويات ) لايفوتكم
ستيفن كوفي ( ادارة الاولويات ) لايفوتكمستيفن كوفي ( ادارة الاولويات ) لايفوتكم
ستيفن كوفي ( ادارة الاولويات ) لايفوتكم
 
الشخصية العبقرية
الشخصية العبقريةالشخصية العبقرية
الشخصية العبقرية
 
Accident Investigation
Accident InvestigationAccident Investigation
Accident Investigation
 
Investigation Skills
Investigation SkillsInvestigation Skills
Investigation Skills
 
Building Papers
Building PapersBuilding Papers
Building Papers
 
Appleipad 100205071918 Phpapp02
Appleipad 100205071918 Phpapp02Appleipad 100205071918 Phpapp02
Appleipad 100205071918 Phpapp02
 
Operatingsystemwars 100209023952 Phpapp01
Operatingsystemwars 100209023952 Phpapp01Operatingsystemwars 100209023952 Phpapp01
Operatingsystemwars 100209023952 Phpapp01
 
A Basic Modern Russian Grammar
A Basic Modern Russian Grammar A Basic Modern Russian Grammar
A Basic Modern Russian Grammar
 
Stress Ar
Stress ArStress Ar
Stress Ar
 
Small Projects
Small ProjectsSmall Projects
Small Projects
 
Risk
RiskRisk
Risk
 

Recently uploaded

Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 

Recently uploaded (20)

Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 

Assignment 4 Paparazzi1

  • 1. CS193P Paparazzi 1 Winter 2010 Cannistraro/Shaffer Paparazzi - Part 1 Due Date This assignment is due by 11:59 PM, February 3. Assignment Over the next four weeks, we’ll be building an iPhone application for viewing online photos, also known as “paparazzi” for a list of friends. Just so you know what you’re getting yourself into, the , evolution of the application will be as follows: Part 1: Build a basic application, displaying static data, using view controllers. Allow the user to navigate to see additional detail. Part 2: Use table views and Core Data to display large dynamic data sets. Part 3: Fetch photos from the Internet, populating the Core Data database with real data. Plot geo-tagged photos’ locations on a map using MapKit. Part 4: Improve the performance and responsiveness of your application with caching and threading. Add support for pinching to zoom in and out on photos. Anything else you can think of! This is your opportunity to try out unfamiliar API, polish your interface and experiment a bit. Now that you have some idea where we’re headed, here’s what we’re expecting for Part 1: • Create an application that utilizes UINavigationController and UITabBarController. The navigation and tab bar controllers may be instantiated in your MainWindow XIB or programmatically in your application delegate. • Create a view controller that will manage a list of people (a good name might be PersonListViewController). Use Interface Builder to lay out a view and make connections between the view controller and user interface elements. The list should display a photo, a text label with the photographer’s name and a “View” button next to each person (show at least two). • Create another view controller that will manage a list of photos (a good name might be PhotoListViewController). The PhotoListViewController should expose a property for setting an array of photos it will display. The list should display each photo, a text label with the photo’s name, a text label with the photographer’s name, and a “View” button next to each photo. Again, use Interface Builder to lay out the view and make connections. • Create one more view controller that will display a specific photo (a good name might be PhotoDetailViewController). The PhotoDetailViewController should expose a property for setting the photo. Once more, use Interface Builder to lay out the view and make connections. • When your application launches it should create a tab bar controller and two navigation controllers, and then add the navigation controllers to the tab bar controller. The first navigation controller will be used for a list of contacts, and the second for a list of recently viewed images. It should then create an instance of the PersonListViewController and push it onto the first navigation controller’s stack, and create an instance of the PhotoListViewController and push it on the second navigation controller’s stack. An appropriate title should display in both navigation bars. • When the user presses one of the “View” buttons in the list, create a PhotoListViewController or PhotoDetailViewController instance as appropriate, set its display properties to reflect the data that’s being displayed, and push it onto the navigation stack. Again, an appropriate title should display in the navigation bar. Page 1 of 10
  • 2. CS193P Paparazzi 1 Winter 2010 Cannistraro/Shaffer Testing In most assignments testing of the resulting application is the primary objective. In this case, testing/grading will be done both on the behavior of the application, and also on the code. We will be looking at the following: 1. Your project should build without errors or warnings and run without crashing. 2. Each view controller should be the File’s Owner of its own Interface Builder document. Do not put your entire application into a single Interface Builder document! It’s bad for performance as well as application maintainability. 3. Your program should behave as described above, presenting a tab bar with two navigation hierarchies. The first navigation hierarchy should be a list of people that leads to a list of photos and ends with a photo detail view. The second should be a list of photos that leads to a photo detail view. Walkthrough Creating your project in Xcode To begin with, create a new project using the “Window-Based Application” template in Xcode. There is a “Navigation-Based Application” template which may look tempting, but it has a lot of code already written (particularly for incorporating a UITableView) which we don’t want for this assignment. Using this template will create a project that has an application delegate class and a MainWindow.xib Interface Builder document. Page 2 of 10
  • 3. CS193P Paparazzi 1 Winter 2010 Cannistraro/Shaffer Creating your tab bar and navigation controllers You can create a UITabBarController and two UINavigationControllers in your MainWindow NIB or in code using the -init method. Either way, your application delegate should probably have instance variables referencing them (don’t forget to release them in the appropriate place!). With the tab bar controller created, you’ll need to add its view to the window. Remember, UITabBarController is a UIViewController subclass, so it has a view property that you can access. Try building & running your application now & see what happens. Page 3 of 10
  • 4. CS193P Paparazzi 1 Winter 2010 Cannistraro/Shaffer Creating your first view controller subclass First, we need to create the header and implementation files for our new UIViewController subclass. Select “New File…” and use the UIViewController subclass file template. Check the “With XIB for user interface” checkbox to get an XIB created for you. If you don’t check it now you can always create one later from the User Interface tab on the left. Using this template will create a UIViewController subclass with quite a few methods already filled in. You can peruse this if you’re curious, but then delete all of the implemented methods from the .m file. We don’t need any of that right now. Page 4 of 10
  • 5. CS193P Paparazzi 1 Winter 2010 Cannistraro/Shaffer Lay out your static list of people using labels, buttons and image views. In addition, if you didn’t create the XIB with the “With XIB for user interface” checkbox, we need our view controller to manage the XIB. There are two steps to make this happen. First, we need to set the view controller as the custom class for the File’s Owner proxy object. Select the File’s Owner object in your xib, then navigate to the Identity Inspector in the Tools menu. Type in the name of your view controller subclass in the text field. Now that the XIB knows that the File’s Owner is an instance of your view controller subclass, we can make the connection from the “view” outlet to the view. You already know how to do this. Page 5 of 10
  • 6. CS193P Paparazzi 1 Winter 2010 Cannistraro/Shaffer Next, we want to create a PersonListViewController instance and display it in our navigation stack. This code should go in your application delegate in the same place you create your navigation controller. Using the -initWithNibName:bundle: method, pass the name of your Interface Builder document as the first argument (you can leave out the file extension), and [NSBundle mainBundle] as the second argument. Finally, we need to push the view controller onto the navigation controller’s stack so that it’s displayed. Now, you should be able to build & run from Xcode and see your list. At this point, it should look something like this: Page 6 of 10
  • 7. CS193P Paparazzi 1 Winter 2010 Cannistraro/Shaffer The rest of the assignment, in brief... Create a second view controller subclass & NIB using the same steps as above. When a button in your list of contacts is touched, push an instance of this second view controller. You’ll want to expose some properties so that it knows what to display. Make sure not to leak memory! The view should look something like this: Remember that UIView has a hidden property you can use to prevent it from drawing. You can use this to hide some views if you have less images to display than views to display them. In order to display a helpful title in the navigation bar when each view controller is being shown, you’ll want to set the title property for each view controller. See the lecture slides for a hint on where to do this. Page 7 of 10
  • 8. CS193P Paparazzi 1 Winter 2010 Cannistraro/Shaffer Create a final view controller subclass & NIB using the same steps as above. When a button in your list of photos is touched, push an instance of this final view controller. You’ll want to expose some properties so that it knows what to display. Make sure not to leak memory! The view should look something like this: Page 8 of 10
  • 9. CS193P Paparazzi 1 Winter 2010 Cannistraro/Shaffer Finally, we need to set up the Recents tab. We’ve already created all the view controller subclasses we need to implement this entire view. We can just instantiate and push a photo list view controller onto the second navigation controller’s stack and set its list of photos to all of the available photos. This would probably be done as part of the initial application setup, back where we created the first view controller for the other navigation controller. At this point, it should look something like this: Page 9 of 10
  • 10. CS193P Paparazzi 1 Winter 2010 Cannistraro/Shaffer Extra Credit Here are some suggestions for enhancing this first iteration of Paparazzi. • Add custom buttons on the left or right side of the navigation bar for the person list view controller. When pressed the button should provide some interesting feedback, like popping up an alert or animating your UI momentarily. • Our Paparazzi screenshots are pretty dull. Spice yours up with some better colors and artwork. • Think of a reason for a fourth view controller subclass, and push it onto the navigation stack in response to some user action. Make it load some data when it’s about to appear & save the data when it’s about to disappear. Page 10 of 10