From e8f27e2529bbc1990661ab4b91921d1e37a4b84e Mon Sep 17 00:00:00 2001 From: Ken Icklan Date: Thu, 26 Aug 2010 23:24:07 +0800 Subject: [PATCH 1/9] flickr changes: use mobile flickr site, upload images to cocoa camp flickr page --- Classes/FlickrPageViewController.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Classes/FlickrPageViewController.m b/Classes/FlickrPageViewController.m index cb46ffa..8b67e70 100644 --- a/Classes/FlickrPageViewController.m +++ b/Classes/FlickrPageViewController.m @@ -30,7 +30,8 @@ - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - NSURL *cocoaFlickr = [[NSURL alloc] initWithString:@"http://www.flickr.com/photos/52319257@N06/"]; + NSURL *cocoaFlickr = [[NSURL alloc] initWithString:@"http://m.flickr.com/#/photos/52319257@N06/"]; + NSURLRequest *request = [[NSURLRequest alloc] initWithURL:cocoaFlickr]; [aWebView loadRequest: request]; @@ -87,9 +88,11 @@ - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; } */ + /* - (void)viewDidDisappear:(BOOL)animated { - [super viewDidDisappear:animated]; + + [super viewDidDisappear:animated]; } */ /* From 5b025c116c1203affeb5f10d9debb44439c1b140 Mon Sep 17 00:00:00 2001 From: Alondo Brewington Date: Fri, 27 Aug 2010 01:04:15 +0800 Subject: [PATCH 2/9] added Registrant Lists (Presenters / Attendees) --- Classes/AttendeeListViewController.h | 21 + Classes/AttendeeListViewController.m | 287 ++++++++++ Classes/PresenterListViewController.h | 20 + Classes/PresenterListViewController.m | 293 ++++++++++ Classes/Registrant.h | 32 ++ Classes/Registrant.m | 28 + Classes/RegistrantDetailView.xib | 682 +++++++++++++++++++++++ Classes/RegistrantDetailViewController.h | 31 ++ Classes/RegistrantDetailViewController.m | 66 +++ RegistrantListView.xib | 509 +++++++++++++++++ 10 files changed, 1969 insertions(+) create mode 100644 Classes/AttendeeListViewController.h create mode 100644 Classes/AttendeeListViewController.m create mode 100644 Classes/PresenterListViewController.h create mode 100644 Classes/PresenterListViewController.m create mode 100644 Classes/Registrant.h create mode 100644 Classes/Registrant.m create mode 100644 Classes/RegistrantDetailView.xib create mode 100644 Classes/RegistrantDetailViewController.h create mode 100644 Classes/RegistrantDetailViewController.m create mode 100644 RegistrantListView.xib diff --git a/Classes/AttendeeListViewController.h b/Classes/AttendeeListViewController.h new file mode 100644 index 0000000..85a0745 --- /dev/null +++ b/Classes/AttendeeListViewController.h @@ -0,0 +1,21 @@ +// +// AttendeeListViewController.h +// CocoaCamp +// +// Created by Alondo Brewington on 8/22/10. +// Copyright 2010 DT Squared Software. All rights reserved. +// + +#import + + +@interface AttendeeListViewController : UITableViewController { + NSMutableArray *attendees; + NSDictionary *dictRegistrant; + NSMutableData *responseData; +} + +@property (nonatomic, retain) NSDictionary *dictRegistrant; +@property (nonatomic, retain) NSMutableData *responseData; +@property (nonatomic, retain) NSMutableArray *attendees; +@end diff --git a/Classes/AttendeeListViewController.m b/Classes/AttendeeListViewController.m new file mode 100644 index 0000000..005726a --- /dev/null +++ b/Classes/AttendeeListViewController.m @@ -0,0 +1,287 @@ +// +// AttendeeListViewController.m +// CocoaCamp +// +// Created by Alondo Brewington on 8/22/10. +// Copyright 2010 DT Squared Software. All rights reserved. +// + +#import "AttendeeListViewController.h" +#import "RegistrantDetailViewController.h" +#import +#import "JSON.h" + +@implementation AttendeeListViewController +@synthesize attendees, responseData, dictRegistrant; + +#pragma mark - +#pragma mark Initialization + +/* +- (id)initWithStyle:(UITableViewStyle)style { + // Override initWithStyle: if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. + if ((self = [super initWithStyle:style])) { + } + return self; +} +*/ + + +#pragma mark - +#pragma mark View lifecycle + +- (void)viewDidLoad { + + [super viewDidLoad]; + + // Uncomment this to see how the table looks with the grouped style + //self.tableViewStyle = UITableViewStyleGrouped; + + // Uncomment this to see how the table cells look against a custom background color + //self.tableView.backgroundColor = [UIColor yellowColor]; + + // This demonstrates how to create a table with standard table "fields". Many of these + // fields with URLs that will be visited when the row is selected + + //Initialize the array. + responseData = [[NSMutableData data] retain]; + NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://cocoa:camp@cocoacamp.org/registers/json?user_name=cocoa&password=camp"]]; + [[NSURLConnection alloc] initWithRequest:request delegate:self ]; + + [self.tableView reloadData]; + // Uncomment the following line to display an Edit button in the navigation bar for this view controller. + // self.navigationItem.rightBarButtonItem = self.editButtonItem; +} + + + +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + //Set the title + self.navigationItem.title = @"CocoaCamp Attendees"; + [self.tableView reloadData]; +} + +/* +- (void)viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; +} +*/ +/* +- (void)viewWillDisappear:(BOOL)animated { + [super viewWillDisappear:animated]; +} +*/ +/* +- (void)viewDidDisappear:(BOOL)animated { + [super viewDidDisappear:animated]; +} +*/ +/* +// Override to allow orientations other than the default portrait orientation. +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + // Return YES for supported orientations + return (interfaceOrientation == UIInterfaceOrientationPortrait); +} +*/ + +#pragma mark - +#pragma mark WebService +- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { + //NSLog(@"Got a response") ; + [responseData setLength:0]; +} +- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { + [responseData appendData:data]; +} + +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { + NSLog(@"Connection failed: %@", [error description]); +} + +- (void)connectionDidFinishLoading:(NSURLConnection *)connection { + //[connection release]; + + NSString *responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]; + [responseData release]; + + //Parsing the response data as an array + NSArray *response = [responseString JSONValue]; + + NSMutableArray *listRegistrant = [[NSMutableArray alloc] initWithArray:response]; + + int index = 0; + NSDictionary* currentReg = nil; + NSMutableArray *listAttendees = [[NSMutableArray alloc] initWithObjects:nil]; + + + for (index = 0; index < [listRegistrant count]; index++) + { + currentReg = [listRegistrant objectAtIndex:index]; + NSDictionary* dictCurrRegData = [currentReg objectForKey:@"Register"]; + NSString *presenter = [dictCurrRegData objectForKey:@"present"]; + NSString *regName = [dictCurrRegData objectForKey:@"first_name"]; + regName = [regName stringByAppendingString:@" "]; + regName = [regName stringByAppendingString:[dictCurrRegData objectForKey:@"last_name"]]; + + if ([presenter isEqualToString:@"0"]){ + [listAttendees addObject:dictCurrRegData]; + } + } + + NSSortDescriptor *lnameDesc = [[NSSortDescriptor alloc] initWithKey:@"last_name" ascending:YES selector:@selector(localizedCaseInsensitiveCompare:)]; + NSSortDescriptor *fnameDesc = [[NSSortDescriptor alloc] initWithKey:@"first_name" ascending:YES selector:@selector(localizedCaseInsensitiveCompare:)]; + + [listAttendees sortUsingDescriptors:[NSMutableArray arrayWithObjects: fnameDesc, lnameDesc, nil]]; + //[listAttendees sortUsingDescriptors:[NSMutableArray arrayWithObjects:fnameDesc, nil]]; + [lnameDesc release], lnameDesc = nil; + [fnameDesc release], fnameDesc = nil; + + self.attendees = listAttendees; + NSLog(@"%@ attendees", [NSString stringWithFormat:@"%d", [self.attendees count]]); + + [listAttendees release]; + + [self.tableView reloadData]; + +} + + + +#pragma mark - +#pragma mark Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + // Return the number of sections. + return 1; +} + + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + // Return the number of rows in the section. + return [attendees count]; +} + + +// Customize the appearance of table view cells. +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + static NSString *CellIdentifier = @"Cell"; + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; + if (cell == nil) { + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]; + } + + // Configure the cell... + NSDictionary* currentReg = [attendees objectAtIndex:indexPath.row]; + + NSString *regName = [currentReg objectForKey:@"first_name"]; + regName = [regName stringByAppendingString:@" "]; + regName = [regName stringByAppendingString:[currentReg objectForKey:@"last_name"]]; + + [[cell textLabel] setText: regName]; + [[cell detailTextLabel] setText:[currentReg objectForKey:@"company"]]; + + return cell; +} + + +/* +// Override to support conditional editing of the table view. +- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { + // Return NO if you do not want the specified item to be editable. + return YES; +} +*/ + + +/* +// Override to support editing the table view. +- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { + + if (editingStyle == UITableViewCellEditingStyleDelete) { + // Delete the row from the data source + [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES]; + } + else if (editingStyle == UITableViewCellEditingStyleInsert) { + // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view + } +} +*/ + + +/* +// Override to support rearranging the table view. +- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { +} +*/ + + +/* +// Override to support conditional rearranging of the table view. +- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { + // Return NO if you do not want the item to be re-orderable. + return YES; +} +*/ + + +#pragma mark - +#pragma mark Table view delegate + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + // Navigation logic may go here. Create and push another view controller. + + RegistrantDetailViewController *detailViewController = [[RegistrantDetailViewController alloc] initWithNibName:@"RegistrantDetailView" bundle:nil]; + + NSDictionary* currentReg = [attendees objectAtIndex:indexPath.row]; + + NSString *regName = [currentReg objectForKey:@"first_name"]; + regName = [regName stringByAppendingString:@" "]; + regName = [regName stringByAppendingString:[currentReg objectForKey:@"last_name"]]; + + Registrant *reg = [[Registrant alloc] init]; + + reg.firstName = [currentReg objectForKey:@"first_name"]; + reg.lastName = [currentReg objectForKey:@"last_name"]; + reg.company = [currentReg objectForKey:@"company"]; + reg.twitter = [currentReg objectForKey:@"twitter"]; + reg.industry = [currentReg objectForKey:@"industry"]; + + NSLog(@"Attendee selected: %@ %@", reg.firstName, reg.lastName); + + detailViewController.currRegistrant = reg; + // Pass the selected object to the new view controller. + [self.navigationController pushViewController:detailViewController animated:YES]; + [detailViewController release]; + +} + + +#pragma mark - +#pragma mark Memory management + +- (void)didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Relinquish ownership any cached data, images, etc that aren't in use. +} + +- (void)viewDidUnload { + // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand. + // For example: self.myOutlet = nil; +} + + +- (void)dealloc { + [responseData release]; + [dictRegistrant release]; + [attendees release]; + [super dealloc]; +} + + +@end + diff --git a/Classes/PresenterListViewController.h b/Classes/PresenterListViewController.h new file mode 100644 index 0000000..a050094 --- /dev/null +++ b/Classes/PresenterListViewController.h @@ -0,0 +1,20 @@ +// +// PresenterListViewController.h +// CocoaCamp +// +// Created by Alondo Brewington on 8/22/10. +// Copyright 2010 DT Squared Software. All rights reserved. +// + +#import + + +@interface PresenterListViewController : UITableViewController { + NSMutableArray *presenters; + NSDictionary *dictRegistrant; + NSMutableData *responseData; +} + +@property (nonatomic, retain) NSDictionary *dictRegistrant; +@property (nonatomic, retain) NSMutableData *responseData; +@property (nonatomic, retain) NSMutableArray *presenters;@end diff --git a/Classes/PresenterListViewController.m b/Classes/PresenterListViewController.m new file mode 100644 index 0000000..d772ad6 --- /dev/null +++ b/Classes/PresenterListViewController.m @@ -0,0 +1,293 @@ +// +// PresenterListViewController.m +// CocoaCamp +// +// Created by Alondo Brewington on 8/22/10. +// Copyright 2010 DT Squared Software. All rights reserved. +// + +#import "PresenterListViewController.h" +#import "RegistrantDetailViewController.h" +#import +#import "JSON.h" +#import "Registrant.h" + +@implementation PresenterListViewController +@synthesize presenters, responseData, dictRegistrant; + +#pragma mark - +#pragma mark Initialization + +/* +- (id)initWithStyle:(UITableViewStyle)style { + // Override initWithStyle: if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. + if ((self = [super initWithStyle:style])) { + } + return self; +} +*/ + + +#pragma mark - +#pragma mark View lifecycle + +- (void)viewDidLoad { + + [super viewDidLoad]; + + // self.variableHeightRows = YES; + + // Uncomment this to see how the table looks with the grouped style + //self.tableViewStyle = UITableViewStyleGrouped; + + // Uncomment this to see how the table cells look against a custom background color + //self.tableView.backgroundColor = [UIColor yellowColor]; + + // This demonstrates how to create a table with standard table "fields". Many of these + // fields with URLs that will be visited when the row is selected + + //Initialize the array. + //NSLog(@"Loading data from Web Service"); + + responseData = [[NSMutableData data] retain]; + NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://cocoa:camp@cocoacamp.org/registers/json?user_name=cocoa&password=camp"]]; + [[NSURLConnection alloc] initWithRequest:request delegate:self ]; + + [self.tableView reloadData]; + // Uncomment the following line to display an Edit button in the navigation bar for this view controller. + // self.navigationItem.rightBarButtonItem = self.editButtonItem; +} + + +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + //Set the title + self.navigationItem.title = @"CocoaCamp Presenters"; + [self.tableView reloadData]; + +} + +/* +- (void)viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; +} +*/ +/* +- (void)viewWillDisappear:(BOOL)animated { + [super viewWillDisappear:animated]; +} +*/ +/* +- (void)viewDidDisappear:(BOOL)animated { + [super viewDidDisappear:animated]; +} +*/ +/* +// Override to allow orientations other than the default portrait orientation. +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + // Return YES for supported orientations + return (interfaceOrientation == UIInterfaceOrientationPortrait); +} +*/ + +#pragma mark - +#pragma mark WebService +- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { + [responseData setLength:0]; +} +- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { + [responseData appendData:data]; +} + +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { + NSLog(@"Connection failed: %@", [error description]); +} + +- (void)connectionDidFinishLoading:(NSURLConnection *)connection { + //[connection release]; + + NSString *responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]; + [responseData release]; + + //Parsing the response data as an array + NSArray *response = [responseString JSONValue]; + + NSArray *listRegistrant = [[NSArray alloc] initWithArray:response]; + + int index = 0; + NSDictionary* currentReg = nil; + NSMutableArray *listPresenters = [[NSMutableArray alloc] initWithObjects:nil]; + + for (index = 0; index < [listRegistrant count]; index++) + { + currentReg = [listRegistrant objectAtIndex:index]; + NSDictionary* dictCurrRegData = [currentReg objectForKey:@"Register"]; + NSString *presenter = [dictCurrRegData objectForKey:@"present"]; + NSString *regName = [dictCurrRegData objectForKey:@"first_name"]; + regName = [regName stringByAppendingString:@" "]; + regName = [regName stringByAppendingString:[dictCurrRegData objectForKey:@"last_name"]]; + + if ([presenter isEqualToString:@"1"]){ + [listPresenters addObject:dictCurrRegData]; + } + } + NSSortDescriptor *lnameDesc = [[NSSortDescriptor alloc] initWithKey:@"last_name" ascending:YES selector:@selector(localizedCaseInsensitiveCompare:)]; + NSSortDescriptor *fnameDesc = [[NSSortDescriptor alloc] initWithKey:@"first_name" ascending:YES selector:@selector(localizedCaseInsensitiveCompare:)]; + + [listPresenters sortUsingDescriptors:[NSMutableArray arrayWithObjects: lnameDesc, fnameDesc, nil]]; + [lnameDesc release], lnameDesc = nil; + [fnameDesc release], fnameDesc = nil; + + self.presenters = listPresenters; + NSLog(@"%@ presenters", [NSString stringWithFormat:@"%d", [self.presenters count]]); + + [listPresenters release]; + + [self.tableView reloadData]; + +} + + + +#pragma mark - +#pragma mark Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + // Return the number of sections. + return 1; +} + + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + // Return the number of rows in the section. + return [presenters count]; +} + + +// Customize the appearance of table view cells. +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + static NSString *CellIdentifier = @"Cell"; + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; + if (cell == nil) { + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]; + } + + // Configure the cell... + NSDictionary* currentReg = [presenters objectAtIndex:indexPath.row]; + + NSString *regName = [currentReg objectForKey:@"first_name"]; + regName = [regName stringByAppendingString:@" "]; + regName = [regName stringByAppendingString:[currentReg objectForKey:@"last_name"]]; + + // NSLog(@"Presenter: %@", regName); + [[cell textLabel] setText: regName]; + [[cell detailTextLabel] setText:[currentReg objectForKey:@"company"]]; + + return cell; +} + + +/* +// Override to support conditional editing of the table view. +- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { + // Return NO if you do not want the specified item to be editable. + return YES; +} +*/ + + +/* +// Override to support editing the table view. +- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { + + if (editingStyle == UITableViewCellEditingStyleDelete) { + // Delete the row from the data source + [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES]; + } + else if (editingStyle == UITableViewCellEditingStyleInsert) { + // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view + } +} +*/ + + +/* +// Override to support rearranging the table view. +- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { +} +*/ + + +/* +// Override to support conditional rearranging of the table view. +- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { + // Return NO if you do not want the item to be re-orderable. + return YES; +} +*/ + +/* +- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView{ + return 26; +} +*/ + +#pragma mark - +#pragma mark Table view delegate + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + // Navigation logic may go here. Create and push another view controller. + + RegistrantDetailViewController *detailViewController = [[RegistrantDetailViewController alloc] initWithNibName:@"RegistrantDetailView" bundle:nil]; + NSDictionary* currentReg = [presenters objectAtIndex:indexPath.row]; + + NSString *regName = [currentReg objectForKey:@"first_name"]; + regName = [regName stringByAppendingString:@" "]; + regName = [regName stringByAppendingString:[currentReg objectForKey:@"last_name"]]; + + Registrant *reg = [[Registrant alloc] init]; + + reg.firstName = [currentReg objectForKey:@"first_name"]; + reg.lastName = [currentReg objectForKey:@"last_name"]; + reg.company = [currentReg objectForKey:@"company"]; + reg.twitter = [currentReg objectForKey:@"twitter"]; + reg.industry = [currentReg objectForKey:@"industry"]; + + NSLog(@"Presenter selected: %@ %@", reg.firstName, reg.lastName); + + detailViewController.currRegistrant = reg; + // Pass the selected object to the new view controller. + [self.navigationController pushViewController:detailViewController animated:YES]; + [detailViewController release]; + +} + + +#pragma mark - +#pragma mark Memory management + +- (void)didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Relinquish ownership any cached data, images, etc that aren't in use. +} + +- (void)viewDidUnload { + // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand. + // For example: self.myOutlet = nil; + self.dictRegistrant = nil; +} + + +- (void)dealloc { + [responseData release]; + [dictRegistrant release]; + [super dealloc]; +} + + +@end + diff --git a/Classes/Registrant.h b/Classes/Registrant.h new file mode 100644 index 0000000..df6b89f --- /dev/null +++ b/Classes/Registrant.h @@ -0,0 +1,32 @@ +// +// Registrant.h +// CocoaCamp +// +// Created by Alondo Brewington on 8/22/10. +// Copyright 2010 DT Squared Software. All rights reserved. +// + +#import + + +@interface Registrant : NSObject { + NSNumber* rid; + NSString* firstName; + NSString* lastName; + NSString* company; + NSString* email; + NSString* industry; + NSString* twitter; + NSString* present; +} + +@property (nonatomic, retain) NSNumber* rid; +@property (nonatomic, retain) NSString* firstName; +@property (nonatomic, retain) NSString* lastName; +@property (nonatomic, retain) NSString* company; +@property (nonatomic, retain) NSString* email; +@property (nonatomic, retain) NSString* industry; +@property (nonatomic, retain) NSString* twitter; +@property (nonatomic, retain) NSString* present; + +@end diff --git a/Classes/Registrant.m b/Classes/Registrant.m new file mode 100644 index 0000000..a0af275 --- /dev/null +++ b/Classes/Registrant.m @@ -0,0 +1,28 @@ +// +// Registrant.m +// CocoaCamp +// +// Created by Alondo Brewington on 8/22/10. +// Copyright 2010 DT Squared Software. All rights reserved. +// + +#import "Registrant.h" + + +@implementation Registrant +@synthesize rid, firstName, lastName, company, email, industry, twitter, present; + + +-(void) dealloc{ + [rid release]; + [firstName release]; + [lastName release]; + [company release]; + [email release]; + [industry release]; + [twitter release]; + [present release]; + [super dealloc]; +} + +@end diff --git a/Classes/RegistrantDetailView.xib b/Classes/RegistrantDetailView.xib new file mode 100644 index 0000000..3328e46 --- /dev/null +++ b/Classes/RegistrantDetailView.xib @@ -0,0 +1,682 @@ + + + + 1024 + 10F569 + 788 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 117 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 292 + + YES + + + 292 + {{33, 6}, {236, 36}} + + NO + YES + 7 + NO + IBCocoaTouchFramework + Attendee Name + + 1 + MCAwIDAAA + + + 1 + 10 + 1 + + + + 292 + {{20, 50}, {83, 21}} + + NO + YES + 7 + NO + IBCocoaTouchFramework + Company: + + + 1 + 10 + + + + 292 + {{20, 79}, {71, 21}} + + NO + YES + 7 + NO + IBCocoaTouchFramework + Industry: + + + 1 + 10 + + + + 292 + {{20, 121}, {48, 21}} + + NO + YES + 7 + NO + IBCocoaTouchFramework + Email: + + + 1 + 10 + + + + 292 + {{20, 156}, {56, 21}} + + NO + YES + 7 + NO + IBCocoaTouchFramework + Twitter: + + + 1 + 10 + + + + 292 + {{111, 50}, {149, 21}} + + NO + YES + 7 + NO + IBCocoaTouchFramework + + + + 1 + 10 + + + + 292 + {{111, 73}, {173, 32}} + + NO + YES + 7 + NO + IBCocoaTouchFramework + < Industries > + + + 1 + 10 + + + + 292 + {{111, 121}, {173, 21}} + + NO + YES + 7 + NO + IBCocoaTouchFramework + < Email > + + + 1 + 10 + + + + 292 + {{111, 156}, {173, 21}} + + NO + YES + 7 + NO + IBCocoaTouchFramework + < Twitter > + + + 1 + 10 + + + {320, 416} + + + 3 + MQA + + 2 + + + + + NO + + IBCocoaTouchFramework + + + + + YES + + + emailLabel + + + + 22 + + + + industryLabel + + + + 23 + + + + nameLabel + + + + 24 + + + + twitterLabel + + + + 25 + + + + companyLabel + + + + 26 + + + + view + + + + 29 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 8 + + + YES + + + + + + + + + + + + + + 10 + + + + + 11 + + + + + 12 + + + + + 13 + + + + + 14 + + + + + 16 + + + + + 17 + + + + + 19 + + + + + 18 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 10.IBPluginDependency + 11.IBPluginDependency + 12.IBPluginDependency + 13.IBPluginDependency + 14.IBPluginDependency + 16.IBPluginDependency + 17.IBPluginDependency + 18.IBPluginDependency + 19.IBPluginDependency + 8.IBEditorWindowLastContentRect + 8.IBPluginDependency + + + YES + RegistrantDetailViewController + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + {{660, 408}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 29 + + + + YES + + NSObject + + IBProjectSource + Classes/JSON/NSObject+SBJSON.h + + + + NSObject + + IBProjectSource + Classes/JSON/SBJsonWriter.h + + + + RegistrantDetailViewController + UIViewController + + YES + + YES + companyLabel + emailLabel + industryLabel + nameLabel + twitterLabel + + + YES + UILabel + UILabel + UILabel + UILabel + UILabel + + + + YES + + YES + companyLabel + emailLabel + industryLabel + nameLabel + twitterLabel + + + YES + + companyLabel + UILabel + + + emailLabel + UILabel + + + industryLabel + UILabel + + + nameLabel + UILabel + + + twitterLabel + UILabel + + + + + IBProjectSource + Classes/RegistrantDetailViewController.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UILabel + UIView + + IBFrameworkSource + UIKit.framework/Headers/UILabel.h + + + + UIResponder + NSObject + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UIPopoverController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UISplitViewController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../CocoaCamp.xcodeproj + 3 + 117 + + diff --git a/Classes/RegistrantDetailViewController.h b/Classes/RegistrantDetailViewController.h new file mode 100644 index 0000000..aa998c6 --- /dev/null +++ b/Classes/RegistrantDetailViewController.h @@ -0,0 +1,31 @@ +// +// RegistrantDetailViewController.h +// CocoaCamp +// +// Created by Alondo Brewington on 8/22/10. +// Copyright 2010 DT Squared Software, LLC. All rights reserved. +// + +#import +#import "Registrant.h" + +@class Registrant; + +@interface RegistrantDetailViewController : UIViewController { + Registrant *currRegistrant; + IBOutlet UILabel *industryLabel; + IBOutlet UILabel *emailLabel; + IBOutlet UILabel *twitterLabel; + IBOutlet UILabel *nameLabel; + IBOutlet UILabel *companyLabel; +} + +@property (nonatomic, retain) Registrant *currRegistrant; +@property (nonatomic, retain) UILabel *companyLabel; +@property (nonatomic, retain) UILabel *industryLabel; +@property (nonatomic, retain) UILabel *emailLabel; +@property (nonatomic, retain) UILabel *twitterLabel; +@property (nonatomic, retain) UILabel *nameLabel; + + +@end diff --git a/Classes/RegistrantDetailViewController.m b/Classes/RegistrantDetailViewController.m new file mode 100644 index 0000000..f260157 --- /dev/null +++ b/Classes/RegistrantDetailViewController.m @@ -0,0 +1,66 @@ +// +// RegistrantDetailViewController.m +// CocoaCamp +// +// Created by Alondo Brewington on 8/22/10. +// Copyright 2010 DT Squared Software, LLC. All rights reserved. +// + +#import "RegistrantDetailViewController.h" +#import "Registrant.h" + + +@implementation RegistrantDetailViewController +@synthesize currRegistrant, companyLabel, industryLabel, emailLabel, twitterLabel, nameLabel; + +#pragma mark - +#pragma mark View lifecycle + +- (void) viewWillAppear:(BOOL)animated +{ + [super viewWillAppear:animated]; + + NSString *regName = currRegistrant.firstName; + regName = [regName stringByAppendingString:@" "]; + regName = [regName stringByAppendingString: currRegistrant.lastName]; + + nameLabel.text = regName; + + NSLog(@"Name = %@ %@ %@", currRegistrant.firstName, currRegistrant.lastName, currRegistrant.company); + companyLabel.text = currRegistrant.company; + industryLabel.text = currRegistrant.industry; + emailLabel.text = currRegistrant.email; + twitterLabel.text = currRegistrant.twitter; +} + + + +#pragma mark - +#pragma mark Memory management + +- (void)didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Relinquish ownership any cached data, images, etc that aren't in use. +} + +- (void)viewDidUnload { + // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand. + // For example: self.myOutlet = nil; +} + + +- (void)dealloc { + [currRegistrant release]; + [companyLabel release]; + [industryLabel release]; + [emailLabel release]; + [twitterLabel release]; + [nameLabel release]; + [super dealloc]; +} + + +@end + diff --git a/RegistrantListView.xib b/RegistrantListView.xib new file mode 100644 index 0000000..aafa5ef --- /dev/null +++ b/RegistrantListView.xib @@ -0,0 +1,509 @@ + + + + 1024 + 10F569 + 788 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 117 + + + YES + + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + {320, 460} + + + 3 + MQA + + 2 + + + + IBCocoaTouchFramework + + + + + + 1 + + IBCocoaTouchFramework + NO + + + Attendees + IBCocoaTouchFramework + + + + + 1 + + IBCocoaTouchFramework + NO + + + YES + + + + Presenters + IBCocoaTouchFramework + + + + + 1 + + IBCocoaTouchFramework + NO + + + + + 266 + {{129, 330}, {163, 49}} + + 3 + MCAwAA + + IBCocoaTouchFramework + + + + + + YES + + + + YES + + 0 + + + + + + 1 + + + + + -1 + + + File's Owner + + + -2 + + + + + 3 + + + YES + + + + + + + + 4 + + + + + 5 + + + YES + + + + + + 6 + + + YES + + + + + + 7 + + + + + 8 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 1.IBEditorWindowLastContentRect + 1.IBPluginDependency + 3.IBEditorWindowLastContentRect + 3.IBPluginDependency + 4.IBPluginDependency + 5.CustomClassName + 5.IBPluginDependency + 6.CustomClassName + 6.IBPluginDependency + 7.IBPluginDependency + 8.IBPluginDependency + + + YES + RegistrantListViewController + UIResponder + {{239, 382}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + {{692, 119}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + AttendeeListViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + PresenterListViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 8 + + + + YES + + AttendeeListViewController + UITableViewController + + IBProjectSource + Classes/AttendeeListViewController.h + + + + NSObject + + IBProjectSource + Classes/JSON/NSObject+SBJSON.h + + + + NSObject + + IBProjectSource + Classes/JSON/SBJsonWriter.h + + + + PresenterListViewController + UITableViewController + + IBProjectSource + Classes/PresenterListViewController.h + + + + RegistrantListViewController + UITableViewController + + IBProjectSource + Classes/RegistrantListViewController.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIBarItem + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIBarItem.h + + + + UIResponder + NSObject + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UITabBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITabBar.h + + + + UITabBarController + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UITabBarItem + UIBarItem + + IBFrameworkSource + UIKit.framework/Headers/UITabBarItem.h + + + + UITableViewController + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITableViewController.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UIPopoverController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UISplitViewController.h + + + + UIViewController + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + CocoaCamp.xcodeproj + 3 + 117 + + From 178dd4c0550e5233a5bd9d4f7b52f3757e9ddd56 Mon Sep 17 00:00:00 2001 From: airportyh Date: Fri, 27 Aug 2010 02:59:17 +0800 Subject: [PATCH 3/9] added holder image before load --- CocoaCamp.xcodeproj/project.pbxproj | 126 +++++++++++++++++++++++++++- 1 file changed, 124 insertions(+), 2 deletions(-) diff --git a/CocoaCamp.xcodeproj/project.pbxproj b/CocoaCamp.xcodeproj/project.pbxproj index ee60552..06c9404 100644 --- a/CocoaCamp.xcodeproj/project.pbxproj +++ b/CocoaCamp.xcodeproj/project.pbxproj @@ -7,11 +7,40 @@ objects = { /* Begin PBXBuildFile section */ + 030893A31226F05D0088A584 /* ContactExchangeView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 030893A21226F05D0088A584 /* ContactExchangeView.xib */; }; 0341222E12148A3400B376F7 /* SessionDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0341222C12148A3400B376F7 /* SessionDetailViewController.m */; }; 0341222F12148A3400B376F7 /* SessionDetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0341222D12148A3400B376F7 /* SessionDetailViewController.xib */; }; + 034654EE12269693005A5D6C /* bump_button_blue.png in Resources */ = {isa = PBXBuildFile; fileRef = 034654D512269693005A5D6C /* bump_button_blue.png */; }; + 034654EF12269693005A5D6C /* bump_close.png in Resources */ = {isa = PBXBuildFile; fileRef = 034654D612269693005A5D6C /* bump_close.png */; }; + 034654F012269693005A5D6C /* bump_close_selected.png in Resources */ = {isa = PBXBuildFile; fileRef = 034654D712269693005A5D6C /* bump_close_selected.png */; }; + 034654F112269693005A5D6C /* bump_content_area.png in Resources */ = {isa = PBXBuildFile; fileRef = 034654D812269693005A5D6C /* bump_content_area.png */; }; + 034654F212269693005A5D6C /* bump_dropdown.png in Resources */ = {isa = PBXBuildFile; fileRef = 034654D912269693005A5D6C /* bump_dropdown.png */; }; + 034654F312269693005A5D6C /* bump_hands_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 034654DA12269693005A5D6C /* bump_hands_bg.png */; }; + 034654F412269693005A5D6C /* bump_lefthand.png in Resources */ = {isa = PBXBuildFile; fileRef = 034654DB12269693005A5D6C /* bump_lefthand.png */; }; + 034654F512269693005A5D6C /* bump_nameview.png in Resources */ = {isa = PBXBuildFile; fileRef = 034654DC12269693005A5D6C /* bump_nameview.png */; }; + 034654F612269693005A5D6C /* bump_no_button.png in Resources */ = {isa = PBXBuildFile; fileRef = 034654DD12269693005A5D6C /* bump_no_button.png */; }; + 034654F712269693005A5D6C /* bump_nonetwork.png in Resources */ = {isa = PBXBuildFile; fileRef = 034654DE12269693005A5D6C /* bump_nonetwork.png */; }; + 034654F812269693005A5D6C /* bump_popupdefault.png in Resources */ = {isa = PBXBuildFile; fileRef = 034654DF12269693005A5D6C /* bump_popupdefault.png */; }; + 034654F912269693005A5D6C /* bump_righthand.png in Resources */ = {isa = PBXBuildFile; fileRef = 034654E012269693005A5D6C /* bump_righthand.png */; }; + 034654FA12269693005A5D6C /* bump_signal1.png in Resources */ = {isa = PBXBuildFile; fileRef = 034654E112269693005A5D6C /* bump_signal1.png */; }; + 034654FB12269693005A5D6C /* bump_signal2.png in Resources */ = {isa = PBXBuildFile; fileRef = 034654E212269693005A5D6C /* bump_signal2.png */; }; + 034654FC12269693005A5D6C /* bump_signal3.png in Resources */ = {isa = PBXBuildFile; fileRef = 034654E312269693005A5D6C /* bump_signal3.png */; }; + 034654FD12269693005A5D6C /* bump_signal4.png in Resources */ = {isa = PBXBuildFile; fileRef = 034654E412269693005A5D6C /* bump_signal4.png */; }; + 034654FE12269693005A5D6C /* bump_tap.aif in Resources */ = {isa = PBXBuildFile; fileRef = 034654E512269693005A5D6C /* bump_tap.aif */; }; + 034654FF12269693005A5D6C /* bump_titlebar_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 034654E612269693005A5D6C /* bump_titlebar_bg.png */; }; + 0346550012269693005A5D6C /* bump_white_low.png in Resources */ = {isa = PBXBuildFile; fileRef = 034654E712269693005A5D6C /* bump_white_low.png */; }; + 0346550112269693005A5D6C /* bump_yes_button.png in Resources */ = {isa = PBXBuildFile; fileRef = 034654E812269693005A5D6C /* bump_yes_button.png */; }; + 0346550212269693005A5D6C /* BumpApiPopup.xib in Resources */ = {isa = PBXBuildFile; fileRef = 034654E912269693005A5D6C /* BumpApiPopup.xib */; }; + 0346550312269693005A5D6C /* BumpChangeNameScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 034654EA12269693005A5D6C /* BumpChangeNameScreen.xib */; }; + 0346550412269693005A5D6C /* BumpConfirmScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 034654EB12269693005A5D6C /* BumpConfirmScreen.xib */; }; + 0346550512269693005A5D6C /* BumpPromptScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 034654EC12269693005A5D6C /* BumpPromptScreen.xib */; }; + 0346550612269693005A5D6C /* BumpStartScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 034654ED12269693005A5D6C /* BumpStartScreen.xib */; }; 034A2BF812146E2A009F39A6 /* FlickrPageView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 034A2BF712146E2A009F39A6 /* FlickrPageView.xib */; }; 034A2BFC12146E7B009F39A6 /* roundrecbuttonpress.png in Resources */ = {isa = PBXBuildFile; fileRef = 034A2BFB12146E7B009F39A6 /* roundrecbuttonpress.png */; }; 034A2BFE12146E91009F39A6 /* headerBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = 034A2BFD12146E91009F39A6 /* headerBackground.png */; }; + 035B9D3B122691540038129A /* calendar.png in Resources */ = {isa = PBXBuildFile; fileRef = 035B9D39122691540038129A /* calendar.png */; }; + 035B9D3C122691540038129A /* group.png in Resources */ = {isa = PBXBuildFile; fileRef = 035B9D3A122691540038129A /* group.png */; }; + 035B9D46122693520038129A /* loading.png in Resources */ = {isa = PBXBuildFile; fileRef = 035B9D45122693520038129A /* loading.png */; }; 03AF412B12120F8D0061D5DD /* FlickrController.m in Sources */ = {isa = PBXBuildFile; fileRef = 03AF412712120F8D0061D5DD /* FlickrController.m */; }; 03AF412C12120F8D0061D5DD /* FlickrController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 03AF412812120F8D0061D5DD /* FlickrController.xib */; }; 03AF412D12120F8D0061D5DD /* FlickrPageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 03AF412A12120F8D0061D5DD /* FlickrPageViewController.m */; }; @@ -204,12 +233,41 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 030893A21226F05D0088A584 /* ContactExchangeView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ContactExchangeView.xib; path = Resources/ContactExchangeView.xib; sourceTree = ""; }; 0341222B12148A3400B376F7 /* SessionDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionDetailViewController.h; sourceTree = ""; }; 0341222C12148A3400B376F7 /* SessionDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionDetailViewController.m; sourceTree = ""; }; 0341222D12148A3400B376F7 /* SessionDetailViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SessionDetailViewController.xib; sourceTree = ""; }; + 034654D512269693005A5D6C /* bump_button_blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_button_blue.png; sourceTree = ""; }; + 034654D612269693005A5D6C /* bump_close.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_close.png; sourceTree = ""; }; + 034654D712269693005A5D6C /* bump_close_selected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_close_selected.png; sourceTree = ""; }; + 034654D812269693005A5D6C /* bump_content_area.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_content_area.png; sourceTree = ""; }; + 034654D912269693005A5D6C /* bump_dropdown.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_dropdown.png; sourceTree = ""; }; + 034654DA12269693005A5D6C /* bump_hands_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_hands_bg.png; sourceTree = ""; }; + 034654DB12269693005A5D6C /* bump_lefthand.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_lefthand.png; sourceTree = ""; }; + 034654DC12269693005A5D6C /* bump_nameview.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_nameview.png; sourceTree = ""; }; + 034654DD12269693005A5D6C /* bump_no_button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_no_button.png; sourceTree = ""; }; + 034654DE12269693005A5D6C /* bump_nonetwork.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_nonetwork.png; sourceTree = ""; }; + 034654DF12269693005A5D6C /* bump_popupdefault.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_popupdefault.png; sourceTree = ""; }; + 034654E012269693005A5D6C /* bump_righthand.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_righthand.png; sourceTree = ""; }; + 034654E112269693005A5D6C /* bump_signal1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_signal1.png; sourceTree = ""; }; + 034654E212269693005A5D6C /* bump_signal2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_signal2.png; sourceTree = ""; }; + 034654E312269693005A5D6C /* bump_signal3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_signal3.png; sourceTree = ""; }; + 034654E412269693005A5D6C /* bump_signal4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_signal4.png; sourceTree = ""; }; + 034654E512269693005A5D6C /* bump_tap.aif */ = {isa = PBXFileReference; lastKnownFileType = file; path = bump_tap.aif; sourceTree = ""; }; + 034654E612269693005A5D6C /* bump_titlebar_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_titlebar_bg.png; sourceTree = ""; }; + 034654E712269693005A5D6C /* bump_white_low.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_white_low.png; sourceTree = ""; }; + 034654E812269693005A5D6C /* bump_yes_button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_yes_button.png; sourceTree = ""; }; + 034654E912269693005A5D6C /* BumpApiPopup.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BumpApiPopup.xib; sourceTree = ""; }; + 034654EA12269693005A5D6C /* BumpChangeNameScreen.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BumpChangeNameScreen.xib; sourceTree = ""; }; + 034654EB12269693005A5D6C /* BumpConfirmScreen.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BumpConfirmScreen.xib; sourceTree = ""; }; + 034654EC12269693005A5D6C /* BumpPromptScreen.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BumpPromptScreen.xib; sourceTree = ""; }; + 034654ED12269693005A5D6C /* BumpStartScreen.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BumpStartScreen.xib; sourceTree = ""; }; 034A2BF712146E2A009F39A6 /* FlickrPageView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = FlickrPageView.xib; sourceTree = ""; }; 034A2BFB12146E7B009F39A6 /* roundrecbuttonpress.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = roundrecbuttonpress.png; sourceTree = ""; }; 034A2BFD12146E91009F39A6 /* headerBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = headerBackground.png; sourceTree = ""; }; + 035B9D39122691540038129A /* calendar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = calendar.png; path = Resources/calendar.png; sourceTree = ""; }; + 035B9D3A122691540038129A /* group.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = group.png; path = Resources/group.png; sourceTree = ""; }; + 035B9D45122693520038129A /* loading.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = loading.png; path = Resources/loading.png; sourceTree = ""; }; 03AF412612120F8D0061D5DD /* FlickrController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FlickrController.h; sourceTree = ""; }; 03AF412712120F8D0061D5DD /* FlickrController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FlickrController.m; sourceTree = ""; }; 03AF412812120F8D0061D5DD /* FlickrController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = FlickrController.xib; sourceTree = ""; }; @@ -267,7 +325,6 @@ FB477A63120CA9A500FA7C4E /* Three20UI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UI.xcodeproj; path = ../three20/src/Three20UI/Three20UI.xcodeproj; sourceTree = SOURCE_ROOT; }; FB477AA1120CAAB700FA7C4E /* Three20.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Three20.bundle; path = ../three20/src/Three20.bundle; sourceTree = SOURCE_ROOT; }; FB477ADD120CAAD900FA7C4E /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - FB477AF0120CACEA00FA7C4E /* SecondViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SecondViewController.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -297,6 +354,38 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 034654D412269693005A5D6C /* Bump_Resources */ = { + isa = PBXGroup; + children = ( + 034654D512269693005A5D6C /* bump_button_blue.png */, + 034654D612269693005A5D6C /* bump_close.png */, + 034654D712269693005A5D6C /* bump_close_selected.png */, + 034654D812269693005A5D6C /* bump_content_area.png */, + 034654D912269693005A5D6C /* bump_dropdown.png */, + 034654DA12269693005A5D6C /* bump_hands_bg.png */, + 034654DB12269693005A5D6C /* bump_lefthand.png */, + 034654DC12269693005A5D6C /* bump_nameview.png */, + 034654DD12269693005A5D6C /* bump_no_button.png */, + 034654DE12269693005A5D6C /* bump_nonetwork.png */, + 034654DF12269693005A5D6C /* bump_popupdefault.png */, + 034654E012269693005A5D6C /* bump_righthand.png */, + 034654E112269693005A5D6C /* bump_signal1.png */, + 034654E212269693005A5D6C /* bump_signal2.png */, + 034654E312269693005A5D6C /* bump_signal3.png */, + 034654E412269693005A5D6C /* bump_signal4.png */, + 034654E512269693005A5D6C /* bump_tap.aif */, + 034654E612269693005A5D6C /* bump_titlebar_bg.png */, + 034654E712269693005A5D6C /* bump_white_low.png */, + 034654E812269693005A5D6C /* bump_yes_button.png */, + 034654E912269693005A5D6C /* BumpApiPopup.xib */, + 034654EA12269693005A5D6C /* BumpChangeNameScreen.xib */, + 034654EB12269693005A5D6C /* BumpConfirmScreen.xib */, + 034654EC12269693005A5D6C /* BumpPromptScreen.xib */, + 034654ED12269693005A5D6C /* BumpStartScreen.xib */, + ); + path = Bump_Resources; + sourceTree = ""; + }; 03CD3729120D68940054728C /* JSON */ = { isa = PBXGroup; children = ( @@ -335,7 +424,6 @@ 03CD3729120D68940054728C /* JSON */, 1D3623240D0F684500981E51 /* CocoaCampAppDelegate.h */, 1D3623250D0F684500981E51 /* CocoaCampAppDelegate.m */, - FB477AF0120CACEA00FA7C4E /* SecondViewController.m */, 03CD36EA120D0F240054728C /* SessionViewController.h */, 03CD36EB120D0F240054728C /* SessionViewController.m */, 0341222B12148A3400B376F7 /* SessionDetailViewController.h */, @@ -358,6 +446,7 @@ children = ( 080E96DDFE201D6D7F000001 /* Classes */, 29B97315FDCFA39411CA2CEA /* Other Sources */, + 034654D412269693005A5D6C /* Bump_Resources */, 29B97317FDCFA39411CA2CEA /* Resources */, FB4779BC120CA66E00FA7C4E /* Dependencies */, FB477987120CA57C00FA7C4E /* Libraries */, @@ -380,6 +469,7 @@ 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( + 030893A21226F05D0088A584 /* ContactExchangeView.xib */, AB2AE44A11EBAA8500015C01 /* images */, 03CD36EC120D0F240054728C /* SessionViewController.xib */, 28AD73870D9D96C1002E5188 /* MainWindow.xib */, @@ -407,6 +497,9 @@ AB2AE44A11EBAA8500015C01 /* images */ = { isa = PBXGroup; children = ( + 035B9D45122693520038129A /* loading.png */, + 035B9D39122691540038129A /* calendar.png */, + 035B9D3A122691540038129A /* group.png */, 034A2BFD12146E91009F39A6 /* headerBackground.png */, 03AF412E12120FA80061D5DD /* photoIcon.png */, 034A2BFB12146E7B009F39A6 /* roundrecbuttonpress.png */, @@ -697,6 +790,35 @@ 034A2BFC12146E7B009F39A6 /* roundrecbuttonpress.png in Resources */, 034A2BFE12146E91009F39A6 /* headerBackground.png in Resources */, 0341222F12148A3400B376F7 /* SessionDetailViewController.xib in Resources */, + 035B9D3B122691540038129A /* calendar.png in Resources */, + 035B9D3C122691540038129A /* group.png in Resources */, + 035B9D46122693520038129A /* loading.png in Resources */, + 034654EE12269693005A5D6C /* bump_button_blue.png in Resources */, + 034654EF12269693005A5D6C /* bump_close.png in Resources */, + 034654F012269693005A5D6C /* bump_close_selected.png in Resources */, + 034654F112269693005A5D6C /* bump_content_area.png in Resources */, + 034654F212269693005A5D6C /* bump_dropdown.png in Resources */, + 034654F312269693005A5D6C /* bump_hands_bg.png in Resources */, + 034654F412269693005A5D6C /* bump_lefthand.png in Resources */, + 034654F512269693005A5D6C /* bump_nameview.png in Resources */, + 034654F612269693005A5D6C /* bump_no_button.png in Resources */, + 034654F712269693005A5D6C /* bump_nonetwork.png in Resources */, + 034654F812269693005A5D6C /* bump_popupdefault.png in Resources */, + 034654F912269693005A5D6C /* bump_righthand.png in Resources */, + 034654FA12269693005A5D6C /* bump_signal1.png in Resources */, + 034654FB12269693005A5D6C /* bump_signal2.png in Resources */, + 034654FC12269693005A5D6C /* bump_signal3.png in Resources */, + 034654FD12269693005A5D6C /* bump_signal4.png in Resources */, + 034654FE12269693005A5D6C /* bump_tap.aif in Resources */, + 034654FF12269693005A5D6C /* bump_titlebar_bg.png in Resources */, + 0346550012269693005A5D6C /* bump_white_low.png in Resources */, + 0346550112269693005A5D6C /* bump_yes_button.png in Resources */, + 0346550212269693005A5D6C /* BumpApiPopup.xib in Resources */, + 0346550312269693005A5D6C /* BumpChangeNameScreen.xib in Resources */, + 0346550412269693005A5D6C /* BumpConfirmScreen.xib in Resources */, + 0346550512269693005A5D6C /* BumpPromptScreen.xib in Resources */, + 0346550612269693005A5D6C /* BumpStartScreen.xib in Resources */, + 030893A31226F05D0088A584 /* ContactExchangeView.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; From 31dbd2c0d5ff4db1028b46f37a6899927d22d8f7 Mon Sep 17 00:00:00 2001 From: airportyh Date: Fri, 27 Aug 2010 09:55:59 +0800 Subject: [PATCH 4/9] added git workflow to readme file --- README.mdown | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/README.mdown b/README.mdown index 0021031..40626e9 100644 --- a/README.mdown +++ b/README.mdown @@ -16,7 +16,7 @@ utilities, like an HTTP disk cache. See the project resources for more info Bump API ======== -You'll need to download the Bump API. Get it from [here](http://bu.mp/apitutorial). Just putting libBump.a in the top of the project directory will work. +The Bump API is included in the source tree. No setup needed. Setting Up Your Project ======================= @@ -38,3 +38,73 @@ Setting Up Your Project 2. That's it! As far as I know, it should work at this point. If you have any trouble, see the README.markdown in the three20 project. But please communicate through the [CocoaCamp Google Group](http://groups.google.com/group/cocoacamp-atlanta) so we can straighten it out. + +Current State +============= +There are 4 tabs: + +1. Schedule - conference schedule +2. People - bump contact exchange UI +3. Flickr - take pictures and share with other attendees on Flickr +4. You - identify yourself on the app so that you can use bump contact +exchange(maybe should merge this w People in the future?) + +Merging from Main Trunk +======================= + +To merge the changes from upstream(for this time and future +instances), first do a: + + git status +and make sure you don't have local changes on either of these files: + + CocoaCamp.xcodeproj/project.pbxproj + MainWindow.xib +if you do have local changes on either file, throw away the changes by: + + git checkout + +If you'd never done this before, you'll need to add cocoacamp as a remote repo(you only need to do this the first time): + + git remote add cocoacamp https://airportyh@github.com/cocoacamp/CocoaCamp-iOS-App.git + +then do: + + git fetch cocoacamp + git merge cocoacamp/master +Now you've completed the merge on your local repo. + +Committing Your Work +==================== +First add each new file you newly created by: + + git add +then if you want to commit all modified files do: + + git commit -am "put commit comment here" +then push it to github: + + git push origin master + +Git Workflow +============ + +Going forward, this is the recommended git workflow(note, this is +different from what I said today at our last lunch): + +1. Work as you normally would. +2. When you are done with a set of changes, commit all files and push +to your fork on github. Follow instructions in *Committing Your Work*. +3. Email me at (airportyh@gmail.com) or send me a pull request at +(airportyh) and kindly ask to merge your changes. I'll get to it as +soon as I can(usually same day, except for weekend). If there are any +special instructions that can help me, such as what frameworks you've +added, or what controller/nib should go on what tab in the MainWindow +nib, please write me a note. +4. I'll email you back or comment on your pull request(which should in +turn notify you via email) when I'm done w the merge. Then at this +point, follow the *Merging from Main Trunk* instructions above to merge back to +your repo. Between the time you send me the pull request and +the time I am done with the merge, it's best that you don't do +anything that modifies *CocoaCamp.xcodeproj/project.pbxproj* or *MainWindow.xib*. + From 1947b0ee2923ba7dd673e5dec39a77f0e9524821 Mon Sep 17 00:00:00 2001 From: airportyh Date: Sat, 28 Aug 2010 10:33:52 +0800 Subject: [PATCH 5/9] made non-talks unselectable for schedule --- Classes/SessionViewController.m | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Classes/SessionViewController.m b/Classes/SessionViewController.m index 24fa43c..7fae732 100644 --- a/Classes/SessionViewController.m +++ b/Classes/SessionViewController.m @@ -251,6 +251,16 @@ - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *) } */ + +- (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + NSDictionary *schedule = [self.schedules objectAtIndex:indexPath.section]; + NSArray *talksArray = [schedule objectForKey:@"Talk"]; + if ([talksArray count] == 0) + return nil; + else + return indexPath; +} + #pragma mark - #pragma mark Table view delegate From 60c1c0c5b87ce613ba7bca4461f97a42a47de71d Mon Sep 17 00:00:00 2001 From: airportyh Date: Thu, 2 Sep 2010 11:32:38 +0800 Subject: [PATCH 6/9] used TTWebController instead of a custom one for the twitter profile pages --- Classes/SessionDetailViewController.m | 16 +- Classes/SessionDetailWebView.h | 22 -- Classes/SessionDetailWebView.m | 54 ---- Classes/SessionDetailWebView.xib | 414 -------------------------- CocoaCamp.xcodeproj/project.pbxproj | 10 - 5 files changed, 4 insertions(+), 512 deletions(-) delete mode 100644 Classes/SessionDetailWebView.h delete mode 100644 Classes/SessionDetailWebView.m delete mode 100644 Classes/SessionDetailWebView.xib diff --git a/Classes/SessionDetailViewController.m b/Classes/SessionDetailViewController.m index 551566e..bbcacd5 100644 --- a/Classes/SessionDetailViewController.m +++ b/Classes/SessionDetailViewController.m @@ -8,7 +8,6 @@ #import "SessionDetailViewController.h" #import "SessionViewController.h" -#import "SessionDetailWebView.h" @implementation SessionDetailViewController @synthesize talk, schedule, portraitImg, titleText, descriptionText; @@ -79,22 +78,15 @@ - (void)viewDidLoad { } -- (void)didEndTouchOnANode{ - SessionDetailWebView *webView = [[SessionDetailWebView alloc] initWithNibName:@"SessionDetailWebView" bundle:nil]; - - [self.navigationController pushViewController:webView animated:YES]; - - self.title = @"Talk Detail"; - +- (void)didEndTouchOnANode{ NSDictionary *reg = [talk objectForKey: @"Register"]; NSString *twitter = [reg objectForKey:@"twitter"]; NSURL *url = [NSURL URLWithString: [NSString stringWithFormat: @"http://twitter.com/%@", twitter]]; - webView.title = [NSString stringWithFormat:@"@%@", twitter]; - [webView loadURL:url]; - [webView release]; - + TTWebController *webController = [[TTWebController alloc] initWithNavigatorURL: url query: nil]; + [self.navigationController pushViewController:webController animated:YES]; + [webController release]; } - (void)didReceiveMemoryWarning { diff --git a/Classes/SessionDetailWebView.h b/Classes/SessionDetailWebView.h deleted file mode 100644 index 8e0a602..0000000 --- a/Classes/SessionDetailWebView.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// SessionDetailWebView.h -// CocoaCamp -// -// Created by airportyh on 8/30/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// - -#import - - -@interface SessionDetailWebView : UIViewController { - UIWebView *webView; - UIActivityIndicatorView *progressInd; -} - -@property (nonatomic, retain) IBOutlet UIWebView *webView; -@property (nonatomic, retain) UIActivityIndicatorView *progressInd; - -- (void)loadURL: (NSURL *)url; - -@end diff --git a/Classes/SessionDetailWebView.m b/Classes/SessionDetailWebView.m deleted file mode 100644 index b622715..0000000 --- a/Classes/SessionDetailWebView.m +++ /dev/null @@ -1,54 +0,0 @@ -// -// SessionDetailWebView.m -// CocoaCamp -// -// Created by airportyh on 8/30/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// - -#import "SessionDetailWebView.h" - - -@implementation SessionDetailWebView -@synthesize webView, progressInd; - -- (void)loadURL: (NSURL *)url{ - NSURLRequest *req = [NSURLRequest requestWithURL:url]; - [self.webView loadRequest:req]; -} - -- (UIActivityIndicatorView *)progressInd { - if (progressInd == nil) - { - CGRect frame = CGRectMake(self.view.frame.size.width/2-15, self.view.frame.size.height/2-15, 30, 30); - progressInd = [[UIActivityIndicatorView alloc] initWithFrame:frame]; - [progressInd startAnimating]; - progressInd.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray; - [progressInd sizeToFit]; - progressInd.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin | - UIViewAutoresizingFlexibleRightMargin | - UIViewAutoresizingFlexibleTopMargin | - UIViewAutoresizingFlexibleBottomMargin); - - progressInd.tag = 1; // tag this view for later so we can remove it from recycled table cells - } - return progressInd; -} - -- (void)webViewDidStartLoad:(UIWebView *)webView{ - [self.view addSubview: self.progressInd]; -} - -- (void)webViewDidFinishLoad:(UIWebView *)webView{ - [self.progressInd removeFromSuperview]; -} - -- (void)dealloc { - [super dealloc]; - [self.webView release]; - if (progressInd) - [progressInd release]; -} - - -@end diff --git a/Classes/SessionDetailWebView.xib b/Classes/SessionDetailWebView.xib deleted file mode 100644 index 90f0d5c..0000000 --- a/Classes/SessionDetailWebView.xib +++ /dev/null @@ -1,414 +0,0 @@ - - - - 1024 - 10F569 - 788 - 1038.29 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 117 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - YES - - - 274 - {320, 460} - - - 1 - MSAxIDEAA - - IBCocoaTouchFramework - 1 - YES - - - {320, 460} - - - 3 - MQA - - 2 - - - - IBCocoaTouchFramework - - - - - YES - - - view - - - - 3 - - - - webView - - - - 5 - - - - delegate - - - - 6 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 4.IBPluginDependency - - - YES - SessionDetailWebView - UIResponder - {{579, 43}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 6 - - - - YES - - NSObject - - IBProjectSource - Classes/JSON/NSObject+SBJSON.h - - - - NSObject - - IBProjectSource - Classes/JSON/SBJsonWriter.h - - - - SessionDetailWebView - UIViewController - - webView - UIWebView - - - webView - - webView - UIWebView - - - - IBProjectSource - Classes/SessionDetailWebView.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - UIWebView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIWebView.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - ../CocoaCamp.xcodeproj - 3 - 117 - - diff --git a/CocoaCamp.xcodeproj/project.pbxproj b/CocoaCamp.xcodeproj/project.pbxproj index b0451ba..9858bd6 100644 --- a/CocoaCamp.xcodeproj/project.pbxproj +++ b/CocoaCamp.xcodeproj/project.pbxproj @@ -62,8 +62,6 @@ 03CD373B120D68940054728C /* SBJsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 03CD3734120D68940054728C /* SBJsonParser.m */; }; 03CD373C120D68940054728C /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 03CD3736120D68940054728C /* SBJsonWriter.m */; }; 03FE5A76122C77900054B9ED /* MyStyledTextLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 03FE5A75122C77900054B9ED /* MyStyledTextLabel.m */; }; - 03FE5A93122C79DA0054B9ED /* SessionDetailWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 03FE5A91122C79DA0054B9ED /* SessionDetailWebView.m */; }; - 03FE5A94122C79DA0054B9ED /* SessionDetailWebView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 03FE5A92122C79DA0054B9ED /* SessionDetailWebView.xib */; }; 1D3623260D0F684500981E51 /* CocoaCampAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* CocoaCampAppDelegate.m */; }; 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; @@ -316,9 +314,6 @@ 03CD3736120D68940054728C /* SBJsonWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonWriter.m; sourceTree = ""; }; 03FE5A74122C77900054B9ED /* MyStyledTextLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyStyledTextLabel.h; sourceTree = ""; }; 03FE5A75122C77900054B9ED /* MyStyledTextLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyStyledTextLabel.m; sourceTree = ""; }; - 03FE5A90122C79DA0054B9ED /* SessionDetailWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionDetailWebView.h; sourceTree = ""; }; - 03FE5A91122C79DA0054B9ED /* SessionDetailWebView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionDetailWebView.m; sourceTree = ""; }; - 03FE5A92122C79DA0054B9ED /* SessionDetailWebView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SessionDetailWebView.xib; sourceTree = ""; }; 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 1D3623240D0F684500981E51 /* CocoaCampAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocoaCampAppDelegate.h; sourceTree = ""; }; 1D3623250D0F684500981E51 /* CocoaCampAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CocoaCampAppDelegate.m; sourceTree = ""; }; @@ -471,9 +466,6 @@ 0341222D12148A3400B376F7 /* SessionDetailViewController.xib */, 03FE5A74122C77900054B9ED /* MyStyledTextLabel.h */, 03FE5A75122C77900054B9ED /* MyStyledTextLabel.m */, - 03FE5A90122C79DA0054B9ED /* SessionDetailWebView.h */, - 03FE5A91122C79DA0054B9ED /* SessionDetailWebView.m */, - 03FE5A92122C79DA0054B9ED /* SessionDetailWebView.xib */, ); path = Classes; sourceTree = ""; @@ -872,7 +864,6 @@ 030894981226F2DB0088A584 /* RegistrantDetailView.xib in Resources */, FBF7E8231227E55000B7A710 /* keynote-icon.png in Resources */, FBF7E8241227E55000B7A710 /* keynote-icon@2x.png in Resources */, - 03FE5A94122C79DA0054B9ED /* SessionDetailWebView.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -902,7 +893,6 @@ 030894991226F2DB0088A584 /* RegistrantDetailViewController.m in Sources */, 030894A31226F4100088A584 /* PresenterListViewController.m in Sources */, 03FE5A76122C77900054B9ED /* MyStyledTextLabel.m in Sources */, - 03FE5A93122C79DA0054B9ED /* SessionDetailWebView.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From fd065b9422b1ce862ad6f7983170ce5c67edf5c8 Mon Sep 17 00:00:00 2001 From: Warren Moore Date: Thu, 2 Sep 2010 15:59:44 -0400 Subject: [PATCH 7/9] Committing all files that should have few if any conflicts with the main line of development. This patch does NOT stand on its own; you must apply changes to the project and XIB files in its sister commit to get a working build, but you should be able to apply this one more or less cleanly. This commit contains a mostly-complete Twitter feed and enables contact exchange via Bump. --- Classes/AttendeeListViewController.h | 5 + Classes/AttendeeListViewController.m | 72 +- Classes/ContactExchangeViewController.h | 19 - Classes/ContactExchangeViewController.m | 87 --- Classes/ContactManager.m | 17 + Classes/NSString+XMLEntities.h | 20 + Classes/NSString+XMLEntities.m | 814 +++++++++++++++++++++++ Classes/RegistrantDetailViewController.h | 3 + Classes/RegistrantDetailViewController.m | 11 +- Classes/SessionViewController.m | 1 + Classes/TwitterFeedTableView.xib | 399 +++++++++++ Classes/TwitterFeedTableViewCell.xib | 472 +++++++++++++ Classes/TwitterFeedTableViewController.h | 26 + Classes/TwitterFeedTableViewController.m | 259 ++++++++ 14 files changed, 2092 insertions(+), 113 deletions(-) delete mode 100644 Classes/ContactExchangeViewController.h delete mode 100644 Classes/ContactExchangeViewController.m create mode 100644 Classes/NSString+XMLEntities.h create mode 100644 Classes/NSString+XMLEntities.m create mode 100644 Classes/TwitterFeedTableView.xib create mode 100644 Classes/TwitterFeedTableViewCell.xib create mode 100644 Classes/TwitterFeedTableViewController.h create mode 100644 Classes/TwitterFeedTableViewController.m diff --git a/Classes/AttendeeListViewController.h b/Classes/AttendeeListViewController.h index 444077a..a2b36e9 100644 --- a/Classes/AttendeeListViewController.h +++ b/Classes/AttendeeListViewController.h @@ -8,6 +8,7 @@ #import +extern NSString *AppUserRegistrantIDKey; @interface AttendeeListViewController : UITableViewController { NSMutableArray *attendees; @@ -19,4 +20,8 @@ @property (nonatomic, retain) NSDictionary *dictRegistrant; @property (nonatomic, retain) NSMutableData *responseData; @property (nonatomic, retain) NSMutableArray *attendees; + +- (IBAction)initiateContactExchange:(id)sender; +- (void)performContactExchange; + @end diff --git a/Classes/AttendeeListViewController.m b/Classes/AttendeeListViewController.m index fb8061e..57cc6f6 100644 --- a/Classes/AttendeeListViewController.m +++ b/Classes/AttendeeListViewController.m @@ -7,9 +7,14 @@ // #import "AttendeeListViewController.h" +#import "CocoaCampAppDelegate.h" #import "RegistrantDetailViewController.h" +#import "ContactManager.h" #import #import "JSON.h" +#import "Bump.h" + +NSString *AppUserRegistrantIDKey = @"AppUserRegistrantIDKey"; @implementation AttendeeListViewController @synthesize attendees, responseData, dictRegistrant; @@ -58,7 +63,7 @@ - (void)viewDidLoad { - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; //Set the title - self.navigationItem.title = @"CocoaCamp Attendees"; + self.navigationItem.title = @"Attendees"; [self.tableView reloadData]; } @@ -145,7 +150,63 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection { } +#pragma mark - +#pragma mark Contact exchange methods + +- (IBAction)initiateContactExchange:(id)sender { + NSNumber *appUserRegistrantID = [[NSUserDefaults standardUserDefaults] objectForKey:AppUserRegistrantIDKey]; + if(appUserRegistrantID) + { + [self performContactExchange]; + } + else + { + UIAlertView *noIdentityAlertView = [[UIAlertView alloc] initWithTitle:@"No User Identity" + message:@"Please set your identity by tapping \"This Is Me!\" in your attendee profile" + delegate:self + cancelButtonTitle:@"Got it" + otherButtonTitles:nil]; + [noIdentityAlertView show]; + [noIdentityAlertView release]; + } +} +- (void)performContactExchange { + NSNumber *appUserRegistrantID = [[NSUserDefaults standardUserDefaults] objectForKey:AppUserRegistrantIDKey]; + NSDictionary *appUserDictionary = nil; + + if(!appUserRegistrantID) + { + NSLog(@"Did not receive a valid registrant id in performContactExchange. Bailing..."); + return; + } + + // walk the list of attendees to find the current user. *sigh* + for(NSDictionary *attendee in attendees) + { + if([[attendee valueForKey:@"id"] isEqual:[appUserRegistrantID stringValue]]) + appUserDictionary = attendee; // got lucky + } + + if(appUserDictionary) + { + Registrant *appUser = [[Registrant alloc] init]; + appUser.firstName = [appUserDictionary objectForKey:@"first_name"]; + appUser.lastName = [appUserDictionary objectForKey:@"last_name"]; + appUser.company = [appUserDictionary objectForKey:@"company"]; + appUser.twitter = [appUserDictionary objectForKey:@"twitter"]; + appUser.industry = [appUserDictionary objectForKey:@"industry"]; + appUser.email = [appUserDictionary objectForKey:@"email"]; + appUser.rid = [NSNumber numberWithInt:[[appUserDictionary objectForKey:@"id"] integerValue]]; + + BumpContact *bumpContact = [[ContactManager sharedInstance] bumpContactForRegistrant:appUser]; + Bump *bump = [(CocoaCampAppDelegate *)[[UIApplication sharedApplication] delegate] bump]; + [bump configParentView:self.view]; + [bump connectToDoContactExchange:bumpContact]; + + [appUser release]; + } +} #pragma mark - #pragma mark Table view data source @@ -256,14 +317,17 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath reg.company = [currentReg objectForKey:@"company"]; reg.twitter = [currentReg objectForKey:@"twitter"]; reg.industry = [currentReg objectForKey:@"industry"]; + reg.email = [currentReg objectForKey:@"email"]; + reg.rid = [NSNumber numberWithInt:[[currentReg objectForKey:@"id"] integerValue]]; NSLog(@"Attendee selected: %@ %@", reg.firstName, reg.lastName); detailViewController.currRegistrant = reg; - // Pass the selected object to the new view controller. - [self.navigationController pushViewController:detailViewController animated:YES]; - [detailViewController release]; + // Pass the selected object to the new view controller. + [self.navigationController pushViewController:detailViewController animated:YES]; + [detailViewController release]; + [self.tableView deselectRowAtIndexPath:indexPath animated:YES]; } diff --git a/Classes/ContactExchangeViewController.h b/Classes/ContactExchangeViewController.h deleted file mode 100644 index d980850..0000000 --- a/Classes/ContactExchangeViewController.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// FirstViewController.h -// CocoaCamp -// -// Created by Jonathan Freeman on 7/12/10. -// Copyright __MyCompanyName__ 2010. All rights reserved. -// - -#import -#import - -@interface ContactExchangeViewController : UIViewController { - ABRecordRef ownerContact; -} - -- (IBAction)initiateContactExchange:(id)sender; -- (void)performContactExchange; - -@end diff --git a/Classes/ContactExchangeViewController.m b/Classes/ContactExchangeViewController.m deleted file mode 100644 index 2a025b5..0000000 --- a/Classes/ContactExchangeViewController.m +++ /dev/null @@ -1,87 +0,0 @@ -// -// FirstViewController.m -// CocoaCamp -// -// Created by Jonathan Freeman on 7/12/10. -// Copyright __MyCompanyName__ 2010. All rights reserved. -// - -#import "ContactExchangeViewController.h" -#import "CocoaCampAppDelegate.h" -#import "ContactManager.h" - -@implementation ContactExchangeViewController - -//- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { -// if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { -// } -// return self; -//} - -- (void)viewDidLoad { - [super viewDidLoad]; -} - -- (void)viewWillAppear:(BOOL)animated { -} - -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - // Return YES for supported orientations - return (interfaceOrientation == UIInterfaceOrientationPortrait); -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; -} - -- (void)viewDidUnload { -} - -- (void)dealloc { - [super dealloc]; -} - -- (IBAction)initiateContactExchange:(id)sender { - if(ownerContact) - { - [self performContactExchange]; - } - else - { - ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init]; - picker.peoplePickerDelegate = self; - [self presentModalViewController:picker animated:YES]; - [picker release]; - } -} - -- (void)performContactExchange { - BumpContact *bumpContact = BumpContactForAddressBookRecord(ownerContact); - Bump *bump = [(CocoaCampAppDelegate *)[[UIApplication sharedApplication] delegate] bump]; - [bump configParentView:self.view]; - [bump connectToDoContactExchange:bumpContact]; -} - -- (void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController *)peoplePicker -{ - [self dismissModalViewControllerAnimated:YES]; -} - -- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker - shouldContinueAfterSelectingPerson:(ABRecordRef)person -{ - ownerContact = CFRetain(person); - [self dismissModalViewControllerAnimated:YES]; - [self performContactExchange]; - return NO; -} - -- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker - shouldContinueAfterSelectingPerson:(ABRecordRef)person - property:(ABPropertyID)property - identifier:(ABMultiValueIdentifier)identifier -{ - return NO; -} - -@end diff --git a/Classes/ContactManager.m b/Classes/ContactManager.m index 6ad9009..7465c4a 100644 --- a/Classes/ContactManager.m +++ b/Classes/ContactManager.m @@ -8,6 +8,7 @@ #import "ContactManager.h" #import "BumpContact.h" +#import "Registrant.h" static ContactManager *sharedInstance; @@ -38,6 +39,22 @@ - (NSError *)addContactForBumpContact:(BumpContact *)contact { return (NSError *)error; } +- (BumpContact *)bumpContactForRegistrant:(Registrant *)registrant +{ + if(!registrant) + { + NSLog(@"Received nil registration in bumpContactForRegistrant - for shame!"); + return nil; + } + + BumpContact *contact = [[BumpContact alloc] init]; + contact.firstName = registrant.firstName; + contact.lastName = registrant.lastName; + contact.companyName = registrant.company; + + return [contact autorelease]; +} + @end @implementation BumpContact (AddressBook) diff --git a/Classes/NSString+XMLEntities.h b/Classes/NSString+XMLEntities.h new file mode 100644 index 0000000..c124e8c --- /dev/null +++ b/Classes/NSString+XMLEntities.h @@ -0,0 +1,20 @@ +// +// NSString+XMLEntities.h +// MWFeedParser +// +// Created by Michael Waterfall on 11/05/2010. +// Copyright 2010 d3i. All rights reserved. +// + +#import + +@interface NSString (XMLEntities) + +// Instance Methods +- (NSString *)stringByStrippingTags; +- (NSString *)stringByDecodingXMLEntities; +- (NSString *)stringByEncodingXMLEntities; +- (NSString *)stringWithNewLinesAsBRs; +- (NSString *)stringByRemovingNewLinesAndWhitespace; + +@end diff --git a/Classes/NSString+XMLEntities.m b/Classes/NSString+XMLEntities.m new file mode 100644 index 0000000..f9dee2a --- /dev/null +++ b/Classes/NSString+XMLEntities.m @@ -0,0 +1,814 @@ +// +// NSString+XMLEntities.m +// MWFeedParser +// +// Created by Michael Waterfall on 11/05/2010. +// Copyright 2010 d3i. All rights reserved. +// + +#import "NSString+XMLEntities.h" + +@implementation NSString (XMLEntities) + +#pragma mark - +#pragma mark Class Methods + +#pragma mark - +#pragma mark Instance Methods + +// Partially adapted and extended from examples at: +// http://stackoverflow.com/questions/1105169/html-character-decoding-in-objective-c-cocoa-touch +- (NSString *)stringByDecodingXMLEntities { + + // Find first & and short-cut if we can + NSUInteger ampIndex = [self rangeOfString:@"&" options:NSLiteralSearch].location; + if (ampIndex == NSNotFound) { + return [NSString stringWithString:self]; // return copy of string as no & found + } + + // Make result string with some extra capacity. + NSMutableString *result = [[NSMutableString alloc] initWithCapacity:(self.length * 1.25)]; + + // First iteration doesn't need to scan to & since we did that already, but for code simplicity's sake we'll do it again with the scanner. + NSScanner *scanner = [NSScanner scannerWithString:self]; + [scanner setCharactersToBeSkipped:nil]; + [scanner setCaseSensitive:YES]; + + // Boundary characters for scanning unexpected &#... pattern + NSCharacterSet *boundaryCharacterSet = [NSCharacterSet characterSetWithCharactersInString:@" \t\n\r;"]; + + // Scan + do { + + // Scan up to the next entity or the end of the string. + NSString *nonEntityString; + if ([scanner scanUpToString:@"&" intoString:&nonEntityString]) { + [result appendString:nonEntityString]; + } + if ([scanner isAtEnd]) break; + + // Common character entity references first + if ([scanner scanString:@"&" intoString:NULL]) + [result appendString:@"&"]; + else if ([scanner scanString:@"'" intoString:NULL]) + [result appendString:@"'"]; + else if ([scanner scanString:@""" intoString:NULL]) + [result appendString:@"\""]; + else if ([scanner scanString:@"<" intoString:NULL]) + [result appendString:@"<"]; + else if ([scanner scanString:@">" intoString:NULL]) + [result appendString:@">"]; + else if ([scanner scanString:@" " intoString:NULL]) + [result appendFormat:@"%C", 160]; + else if ([scanner scanString:@"«" intoString:NULL]) + [result appendFormat:@"%C", 171]; + else if ([scanner scanString:@"»" intoString:NULL]) + [result appendFormat:@"%C", 187]; + else if ([scanner scanString:@"–" intoString:NULL]) + [result appendFormat:@"%C", 8211]; + else if ([scanner scanString:@"—" intoString:NULL]) + [result appendFormat:@"%C", 8212]; + else if ([scanner scanString:@"‘" intoString:NULL]) + [result appendFormat:@"%C", 8216]; + else if ([scanner scanString:@"’" intoString:NULL]) + [result appendFormat:@"%C", 8217]; + else if ([scanner scanString:@"“" intoString:NULL]) + [result appendFormat:@"%C", 8220]; + else if ([scanner scanString:@"”" intoString:NULL]) + [result appendFormat:@"%C", 8221]; + else if ([scanner scanString:@"•" intoString:NULL]) + [result appendFormat:@"%C", 8226]; + else if ([scanner scanString:@"…" intoString:NULL]) + [result appendFormat:@"%C", 8230]; + + // Numeric character entity references + else if ([scanner scanString:@"&#" intoString:NULL]) { + + // Entity + BOOL gotNumber; + unsigned charCode; + NSString *xForHex = @""; + + // Is it hex or decimal? + if ([scanner scanString:@"x" intoString:&xForHex]) { + gotNumber = [scanner scanHexInt:&charCode]; + } else { + gotNumber = [scanner scanInt:(int*)&charCode]; + } + + // Process + if (gotNumber) { + + // Append character + [result appendFormat:@"%C", charCode]; + [scanner scanString:@";" intoString:NULL]; + + } else { + + // Failed to get a number so append to result and log error + NSString *unknownEntity = @""; + [scanner scanUpToCharactersFromSet:boundaryCharacterSet intoString:&unknownEntity]; + [result appendFormat:@"&#%@%@", xForHex, unknownEntity]; // Append exact same string + + } + + // Quick check for isolated & with a space after to speed up checks + } else if ([scanner scanString:@"& " intoString:NULL]) + [result appendString:@"& "]; + + // No so common character entity references + else if ([scanner scanString:@"¡" intoString:NULL]) + [result appendFormat:@"%C", 161]; + else if ([scanner scanString:@"¢" intoString:NULL]) + [result appendFormat:@"%C", 162]; + else if ([scanner scanString:@"£" intoString:NULL]) + [result appendFormat:@"%C", 163]; + else if ([scanner scanString:@"¤" intoString:NULL]) + [result appendFormat:@"%C", 164]; + else if ([scanner scanString:@"¥" intoString:NULL]) + [result appendFormat:@"%C", 165]; + else if ([scanner scanString:@"¦" intoString:NULL]) + [result appendFormat:@"%C", 166]; + else if ([scanner scanString:@"§" intoString:NULL]) + [result appendFormat:@"%C", 167]; + else if ([scanner scanString:@"¨" intoString:NULL]) + [result appendFormat:@"%C", 168]; + else if ([scanner scanString:@"©" intoString:NULL]) + [result appendFormat:@"%C", 169]; + else if ([scanner scanString:@"ª" intoString:NULL]) + [result appendFormat:@"%C", 170]; + else if ([scanner scanString:@"¬" intoString:NULL]) + [result appendFormat:@"%C", 172]; + else if ([scanner scanString:@"­" intoString:NULL]) + [result appendFormat:@"%C", 173]; + else if ([scanner scanString:@"®" intoString:NULL]) + [result appendFormat:@"%C", 174]; + else if ([scanner scanString:@"¯" intoString:NULL]) + [result appendFormat:@"%C", 175]; + else if ([scanner scanString:@"°" intoString:NULL]) + [result appendFormat:@"%C", 176]; + else if ([scanner scanString:@"±" intoString:NULL]) + [result appendFormat:@"%C", 177]; + else if ([scanner scanString:@"²" intoString:NULL]) + [result appendFormat:@"%C", 178]; + else if ([scanner scanString:@"³" intoString:NULL]) + [result appendFormat:@"%C", 179]; + else if ([scanner scanString:@"´" intoString:NULL]) + [result appendFormat:@"%C", 180]; + else if ([scanner scanString:@"µ" intoString:NULL]) + [result appendFormat:@"%C", 181]; + else if ([scanner scanString:@"¶" intoString:NULL]) + [result appendFormat:@"%C", 182]; + else if ([scanner scanString:@"·" intoString:NULL]) + [result appendFormat:@"%C", 183]; + else if ([scanner scanString:@"¸" intoString:NULL]) + [result appendFormat:@"%C", 184]; + else if ([scanner scanString:@"¹" intoString:NULL]) + [result appendFormat:@"%C", 185]; + else if ([scanner scanString:@"º" intoString:NULL]) + [result appendFormat:@"%C", 186]; + else if ([scanner scanString:@"¼" intoString:NULL]) + [result appendFormat:@"%C", 188]; + else if ([scanner scanString:@"½" intoString:NULL]) + [result appendFormat:@"%C", 189]; + else if ([scanner scanString:@"¾" intoString:NULL]) + [result appendFormat:@"%C", 190]; + else if ([scanner scanString:@"¿" intoString:NULL]) + [result appendFormat:@"%C", 191]; + else if ([scanner scanString:@"À" intoString:NULL]) + [result appendFormat:@"%C", 192]; + else if ([scanner scanString:@"Á" intoString:NULL]) + [result appendFormat:@"%C", 193]; + else if ([scanner scanString:@"Â" intoString:NULL]) + [result appendFormat:@"%C", 194]; + else if ([scanner scanString:@"Ã" intoString:NULL]) + [result appendFormat:@"%C", 195]; + else if ([scanner scanString:@"Ä" intoString:NULL]) + [result appendFormat:@"%C", 196]; + else if ([scanner scanString:@"Å" intoString:NULL]) + [result appendFormat:@"%C", 197]; + else if ([scanner scanString:@"Æ" intoString:NULL]) + [result appendFormat:@"%C", 198]; + else if ([scanner scanString:@"Ç" intoString:NULL]) + [result appendFormat:@"%C", 199]; + else if ([scanner scanString:@"È" intoString:NULL]) + [result appendFormat:@"%C", 200]; + else if ([scanner scanString:@"É" intoString:NULL]) + [result appendFormat:@"%C", 201]; + else if ([scanner scanString:@"Ê" intoString:NULL]) + [result appendFormat:@"%C", 202]; + else if ([scanner scanString:@"Ë" intoString:NULL]) + [result appendFormat:@"%C", 203]; + else if ([scanner scanString:@"Ì" intoString:NULL]) + [result appendFormat:@"%C", 204]; + else if ([scanner scanString:@"Í" intoString:NULL]) + [result appendFormat:@"%C", 205]; + else if ([scanner scanString:@"Î" intoString:NULL]) + [result appendFormat:@"%C", 206]; + else if ([scanner scanString:@"Ï" intoString:NULL]) + [result appendFormat:@"%C", 207]; + else if ([scanner scanString:@"Ð" intoString:NULL]) + [result appendFormat:@"%C", 208]; + else if ([scanner scanString:@"Ñ" intoString:NULL]) + [result appendFormat:@"%C", 209]; + else if ([scanner scanString:@"Ò" intoString:NULL]) + [result appendFormat:@"%C", 210]; + else if ([scanner scanString:@"Ó" intoString:NULL]) + [result appendFormat:@"%C", 211]; + else if ([scanner scanString:@"Ô" intoString:NULL]) + [result appendFormat:@"%C", 212]; + else if ([scanner scanString:@"Õ" intoString:NULL]) + [result appendFormat:@"%C", 213]; + else if ([scanner scanString:@"Ö" intoString:NULL]) + [result appendFormat:@"%C", 214]; + else if ([scanner scanString:@"×" intoString:NULL]) + [result appendFormat:@"%C", 215]; + else if ([scanner scanString:@"Ø" intoString:NULL]) + [result appendFormat:@"%C", 216]; + else if ([scanner scanString:@"Ù" intoString:NULL]) + [result appendFormat:@"%C", 217]; + else if ([scanner scanString:@"Ú" intoString:NULL]) + [result appendFormat:@"%C", 218]; + else if ([scanner scanString:@"Û" intoString:NULL]) + [result appendFormat:@"%C", 219]; + else if ([scanner scanString:@"Ü" intoString:NULL]) + [result appendFormat:@"%C", 220]; + else if ([scanner scanString:@"Ý" intoString:NULL]) + [result appendFormat:@"%C", 221]; + else if ([scanner scanString:@"Þ" intoString:NULL]) + [result appendFormat:@"%C", 222]; + else if ([scanner scanString:@"ß" intoString:NULL]) + [result appendFormat:@"%C", 223]; + else if ([scanner scanString:@"à" intoString:NULL]) + [result appendFormat:@"%C", 224]; + else if ([scanner scanString:@"á" intoString:NULL]) + [result appendFormat:@"%C", 225]; + else if ([scanner scanString:@"â" intoString:NULL]) + [result appendFormat:@"%C", 226]; + else if ([scanner scanString:@"ã" intoString:NULL]) + [result appendFormat:@"%C", 227]; + else if ([scanner scanString:@"ä" intoString:NULL]) + [result appendFormat:@"%C", 228]; + else if ([scanner scanString:@"å" intoString:NULL]) + [result appendFormat:@"%C", 229]; + else if ([scanner scanString:@"æ" intoString:NULL]) + [result appendFormat:@"%C", 230]; + else if ([scanner scanString:@"ç" intoString:NULL]) + [result appendFormat:@"%C", 231]; + else if ([scanner scanString:@"è" intoString:NULL]) + [result appendFormat:@"%C", 232]; + else if ([scanner scanString:@"é" intoString:NULL]) + [result appendFormat:@"%C", 233]; + else if ([scanner scanString:@"ê" intoString:NULL]) + [result appendFormat:@"%C", 234]; + else if ([scanner scanString:@"ë" intoString:NULL]) + [result appendFormat:@"%C", 235]; + else if ([scanner scanString:@"ì" intoString:NULL]) + [result appendFormat:@"%C", 236]; + else if ([scanner scanString:@"í" intoString:NULL]) + [result appendFormat:@"%C", 237]; + else if ([scanner scanString:@"î" intoString:NULL]) + [result appendFormat:@"%C", 238]; + else if ([scanner scanString:@"ï" intoString:NULL]) + [result appendFormat:@"%C", 239]; + else if ([scanner scanString:@"ð" intoString:NULL]) + [result appendFormat:@"%C", 240]; + else if ([scanner scanString:@"ñ" intoString:NULL]) + [result appendFormat:@"%C", 241]; + else if ([scanner scanString:@"ò" intoString:NULL]) + [result appendFormat:@"%C", 242]; + else if ([scanner scanString:@"ó" intoString:NULL]) + [result appendFormat:@"%C", 243]; + else if ([scanner scanString:@"ô" intoString:NULL]) + [result appendFormat:@"%C", 244]; + else if ([scanner scanString:@"õ" intoString:NULL]) + [result appendFormat:@"%C", 245]; + else if ([scanner scanString:@"ö" intoString:NULL]) + [result appendFormat:@"%C", 246]; + else if ([scanner scanString:@"÷" intoString:NULL]) + [result appendFormat:@"%C", 247]; + else if ([scanner scanString:@"ø" intoString:NULL]) + [result appendFormat:@"%C", 248]; + else if ([scanner scanString:@"ù" intoString:NULL]) + [result appendFormat:@"%C", 249]; + else if ([scanner scanString:@"ú" intoString:NULL]) + [result appendFormat:@"%C", 250]; + else if ([scanner scanString:@"û" intoString:NULL]) + [result appendFormat:@"%C", 251]; + else if ([scanner scanString:@"ü" intoString:NULL]) + [result appendFormat:@"%C", 252]; + else if ([scanner scanString:@"ý" intoString:NULL]) + [result appendFormat:@"%C", 253]; + else if ([scanner scanString:@"þ" intoString:NULL]) + [result appendFormat:@"%C", 254]; + else if ([scanner scanString:@"ÿ" intoString:NULL]) + [result appendFormat:@"%C", 255]; + else if ([scanner scanString:@"Œ" intoString:NULL]) + [result appendFormat:@"%C", 338]; + else if ([scanner scanString:@"œ" intoString:NULL]) + [result appendFormat:@"%C", 339]; + else if ([scanner scanString:@"Š" intoString:NULL]) + [result appendFormat:@"%C", 352]; + else if ([scanner scanString:@"š" intoString:NULL]) + [result appendFormat:@"%C", 353]; + else if ([scanner scanString:@"Ÿ" intoString:NULL]) + [result appendFormat:@"%C", 376]; + else if ([scanner scanString:@"ƒ" intoString:NULL]) + [result appendFormat:@"%C", 402]; + else if ([scanner scanString:@"ˆ" intoString:NULL]) + [result appendFormat:@"%C", 710]; + else if ([scanner scanString:@"˜" intoString:NULL]) + [result appendFormat:@"%C", 732]; + else if ([scanner scanString:@"Α" intoString:NULL]) + [result appendFormat:@"%C", 913]; + else if ([scanner scanString:@"Β" intoString:NULL]) + [result appendFormat:@"%C", 914]; + else if ([scanner scanString:@"Γ" intoString:NULL]) + [result appendFormat:@"%C", 915]; + else if ([scanner scanString:@"Δ" intoString:NULL]) + [result appendFormat:@"%C", 916]; + else if ([scanner scanString:@"Ε" intoString:NULL]) + [result appendFormat:@"%C", 917]; + else if ([scanner scanString:@"Ζ" intoString:NULL]) + [result appendFormat:@"%C", 918]; + else if ([scanner scanString:@"Η" intoString:NULL]) + [result appendFormat:@"%C", 919]; + else if ([scanner scanString:@"Θ" intoString:NULL]) + [result appendFormat:@"%C", 920]; + else if ([scanner scanString:@"Ι" intoString:NULL]) + [result appendFormat:@"%C", 921]; + else if ([scanner scanString:@"Κ" intoString:NULL]) + [result appendFormat:@"%C", 922]; + else if ([scanner scanString:@"Λ" intoString:NULL]) + [result appendFormat:@"%C", 923]; + else if ([scanner scanString:@"Μ" intoString:NULL]) + [result appendFormat:@"%C", 924]; + else if ([scanner scanString:@"Ν" intoString:NULL]) + [result appendFormat:@"%C", 925]; + else if ([scanner scanString:@"Ξ" intoString:NULL]) + [result appendFormat:@"%C", 926]; + else if ([scanner scanString:@"Ο" intoString:NULL]) + [result appendFormat:@"%C", 927]; + else if ([scanner scanString:@"Π" intoString:NULL]) + [result appendFormat:@"%C", 928]; + else if ([scanner scanString:@"Ρ" intoString:NULL]) + [result appendFormat:@"%C", 929]; + else if ([scanner scanString:@"Σ" intoString:NULL]) + [result appendFormat:@"%C", 931]; + else if ([scanner scanString:@"Τ" intoString:NULL]) + [result appendFormat:@"%C", 932]; + else if ([scanner scanString:@"Υ" intoString:NULL]) + [result appendFormat:@"%C", 933]; + else if ([scanner scanString:@"Φ" intoString:NULL]) + [result appendFormat:@"%C", 934]; + else if ([scanner scanString:@"Χ" intoString:NULL]) + [result appendFormat:@"%C", 935]; + else if ([scanner scanString:@"Ψ" intoString:NULL]) + [result appendFormat:@"%C", 936]; + else if ([scanner scanString:@"Ω" intoString:NULL]) + [result appendFormat:@"%C", 937]; + else if ([scanner scanString:@"α" intoString:NULL]) + [result appendFormat:@"%C", 945]; + else if ([scanner scanString:@"β" intoString:NULL]) + [result appendFormat:@"%C", 946]; + else if ([scanner scanString:@"γ" intoString:NULL]) + [result appendFormat:@"%C", 947]; + else if ([scanner scanString:@"δ" intoString:NULL]) + [result appendFormat:@"%C", 948]; + else if ([scanner scanString:@"ε" intoString:NULL]) + [result appendFormat:@"%C", 949]; + else if ([scanner scanString:@"ζ" intoString:NULL]) + [result appendFormat:@"%C", 950]; + else if ([scanner scanString:@"η" intoString:NULL]) + [result appendFormat:@"%C", 951]; + else if ([scanner scanString:@"θ" intoString:NULL]) + [result appendFormat:@"%C", 952]; + else if ([scanner scanString:@"ι" intoString:NULL]) + [result appendFormat:@"%C", 953]; + else if ([scanner scanString:@"κ" intoString:NULL]) + [result appendFormat:@"%C", 954]; + else if ([scanner scanString:@"λ" intoString:NULL]) + [result appendFormat:@"%C", 955]; + else if ([scanner scanString:@"μ" intoString:NULL]) + [result appendFormat:@"%C", 956]; + else if ([scanner scanString:@"ν" intoString:NULL]) + [result appendFormat:@"%C", 957]; + else if ([scanner scanString:@"ξ" intoString:NULL]) + [result appendFormat:@"%C", 958]; + else if ([scanner scanString:@"ο" intoString:NULL]) + [result appendFormat:@"%C", 959]; + else if ([scanner scanString:@"π" intoString:NULL]) + [result appendFormat:@"%C", 960]; + else if ([scanner scanString:@"ρ" intoString:NULL]) + [result appendFormat:@"%C", 961]; + else if ([scanner scanString:@"ς" intoString:NULL]) + [result appendFormat:@"%C", 962]; + else if ([scanner scanString:@"σ" intoString:NULL]) + [result appendFormat:@"%C", 963]; + else if ([scanner scanString:@"τ" intoString:NULL]) + [result appendFormat:@"%C", 964]; + else if ([scanner scanString:@"υ" intoString:NULL]) + [result appendFormat:@"%C", 965]; + else if ([scanner scanString:@"φ" intoString:NULL]) + [result appendFormat:@"%C", 966]; + else if ([scanner scanString:@"χ" intoString:NULL]) + [result appendFormat:@"%C", 967]; + else if ([scanner scanString:@"ψ" intoString:NULL]) + [result appendFormat:@"%C", 968]; + else if ([scanner scanString:@"ω" intoString:NULL]) + [result appendFormat:@"%C", 969]; + else if ([scanner scanString:@"ϑ" intoString:NULL]) + [result appendFormat:@"%C", 977]; + else if ([scanner scanString:@"ϒ" intoString:NULL]) + [result appendFormat:@"%C", 978]; + else if ([scanner scanString:@"ϖ" intoString:NULL]) + [result appendFormat:@"%C", 982]; + else if ([scanner scanString:@" " intoString:NULL]) + [result appendFormat:@"%C", 8194]; + else if ([scanner scanString:@" " intoString:NULL]) + [result appendFormat:@"%C", 8195]; + else if ([scanner scanString:@" " intoString:NULL]) + [result appendFormat:@"%C", 8201]; + else if ([scanner scanString:@"‌" intoString:NULL]) + [result appendFormat:@"%C", 8204]; + else if ([scanner scanString:@"‍" intoString:NULL]) + [result appendFormat:@"%C", 8205]; + else if ([scanner scanString:@"‎" intoString:NULL]) + [result appendFormat:@"%C", 8206]; + else if ([scanner scanString:@"‏" intoString:NULL]) + [result appendFormat:@"%C", 8207]; + else if ([scanner scanString:@"‚" intoString:NULL]) + [result appendFormat:@"%C", 8218]; + else if ([scanner scanString:@"„" intoString:NULL]) + [result appendFormat:@"%C", 8222]; + else if ([scanner scanString:@"†" intoString:NULL]) + [result appendFormat:@"%C", 8224]; + else if ([scanner scanString:@"‡" intoString:NULL]) + [result appendFormat:@"%C", 8225]; + else if ([scanner scanString:@"‰" intoString:NULL]) + [result appendFormat:@"%C", 8240]; + else if ([scanner scanString:@"′" intoString:NULL]) + [result appendFormat:@"%C", 8242]; + else if ([scanner scanString:@"″" intoString:NULL]) + [result appendFormat:@"%C", 8243]; + else if ([scanner scanString:@"‹" intoString:NULL]) + [result appendFormat:@"%C", 8249]; + else if ([scanner scanString:@"›" intoString:NULL]) + [result appendFormat:@"%C", 8250]; + else if ([scanner scanString:@"‾" intoString:NULL]) + [result appendFormat:@"%C", 8254]; + else if ([scanner scanString:@"⁄" intoString:NULL]) + [result appendFormat:@"%C", 8260]; + else if ([scanner scanString:@"€" intoString:NULL]) + [result appendFormat:@"%C", 8364]; + else if ([scanner scanString:@"ℑ" intoString:NULL]) + [result appendFormat:@"%C", 8465]; + else if ([scanner scanString:@"℘" intoString:NULL]) + [result appendFormat:@"%C", 8472]; + else if ([scanner scanString:@"ℜ" intoString:NULL]) + [result appendFormat:@"%C", 8476]; + else if ([scanner scanString:@"™" intoString:NULL]) + [result appendFormat:@"%C", 8482]; + else if ([scanner scanString:@"ℵ" intoString:NULL]) + [result appendFormat:@"%C", 8501]; + else if ([scanner scanString:@"←" intoString:NULL]) + [result appendFormat:@"%C", 8592]; + else if ([scanner scanString:@"↑" intoString:NULL]) + [result appendFormat:@"%C", 8593]; + else if ([scanner scanString:@"→" intoString:NULL]) + [result appendFormat:@"%C", 8594]; + else if ([scanner scanString:@"↓" intoString:NULL]) + [result appendFormat:@"%C", 8595]; + else if ([scanner scanString:@"↔" intoString:NULL]) + [result appendFormat:@"%C", 8596]; + else if ([scanner scanString:@"↵" intoString:NULL]) + [result appendFormat:@"%C", 8629]; + else if ([scanner scanString:@"⇐" intoString:NULL]) + [result appendFormat:@"%C", 8656]; + else if ([scanner scanString:@"⇑" intoString:NULL]) + [result appendFormat:@"%C", 8657]; + else if ([scanner scanString:@"⇒" intoString:NULL]) + [result appendFormat:@"%C", 8658]; + else if ([scanner scanString:@"⇓" intoString:NULL]) + [result appendFormat:@"%C", 8659]; + else if ([scanner scanString:@"⇔" intoString:NULL]) + [result appendFormat:@"%C", 8660]; + else if ([scanner scanString:@"∀" intoString:NULL]) + [result appendFormat:@"%C", 8704]; + else if ([scanner scanString:@"∂" intoString:NULL]) + [result appendFormat:@"%C", 8706]; + else if ([scanner scanString:@"∃" intoString:NULL]) + [result appendFormat:@"%C", 8707]; + else if ([scanner scanString:@"∅" intoString:NULL]) + [result appendFormat:@"%C", 8709]; + else if ([scanner scanString:@"∇" intoString:NULL]) + [result appendFormat:@"%C", 8711]; + else if ([scanner scanString:@"∈" intoString:NULL]) + [result appendFormat:@"%C", 8712]; + else if ([scanner scanString:@"∉" intoString:NULL]) + [result appendFormat:@"%C", 8713]; + else if ([scanner scanString:@"∋" intoString:NULL]) + [result appendFormat:@"%C", 8715]; + else if ([scanner scanString:@"∏" intoString:NULL]) + [result appendFormat:@"%C", 8719]; + else if ([scanner scanString:@"∑" intoString:NULL]) + [result appendFormat:@"%C", 8721]; + else if ([scanner scanString:@"−" intoString:NULL]) + [result appendFormat:@"%C", 8722]; + else if ([scanner scanString:@"∗" intoString:NULL]) + [result appendFormat:@"%C", 8727]; + else if ([scanner scanString:@"√" intoString:NULL]) + [result appendFormat:@"%C", 8730]; + else if ([scanner scanString:@"∝" intoString:NULL]) + [result appendFormat:@"%C", 8733]; + else if ([scanner scanString:@"∞" intoString:NULL]) + [result appendFormat:@"%C", 8734]; + else if ([scanner scanString:@"∠" intoString:NULL]) + [result appendFormat:@"%C", 8736]; + else if ([scanner scanString:@"∧" intoString:NULL]) + [result appendFormat:@"%C", 8743]; + else if ([scanner scanString:@"∨" intoString:NULL]) + [result appendFormat:@"%C", 8744]; + else if ([scanner scanString:@"∩" intoString:NULL]) + [result appendFormat:@"%C", 8745]; + else if ([scanner scanString:@"∪" intoString:NULL]) + [result appendFormat:@"%C", 8746]; + else if ([scanner scanString:@"∫" intoString:NULL]) + [result appendFormat:@"%C", 8747]; + else if ([scanner scanString:@"∴" intoString:NULL]) + [result appendFormat:@"%C", 8756]; + else if ([scanner scanString:@"∼" intoString:NULL]) + [result appendFormat:@"%C", 8764]; + else if ([scanner scanString:@"≅" intoString:NULL]) + [result appendFormat:@"%C", 8773]; + else if ([scanner scanString:@"≈" intoString:NULL]) + [result appendFormat:@"%C", 8776]; + else if ([scanner scanString:@"≠" intoString:NULL]) + [result appendFormat:@"%C", 8800]; + else if ([scanner scanString:@"≡" intoString:NULL]) + [result appendFormat:@"%C", 8801]; + else if ([scanner scanString:@"≤" intoString:NULL]) + [result appendFormat:@"%C", 8804]; + else if ([scanner scanString:@"≥" intoString:NULL]) + [result appendFormat:@"%C", 8805]; + else if ([scanner scanString:@"⊂" intoString:NULL]) + [result appendFormat:@"%C", 8834]; + else if ([scanner scanString:@"⊃" intoString:NULL]) + [result appendFormat:@"%C", 8835]; + else if ([scanner scanString:@"⊄" intoString:NULL]) + [result appendFormat:@"%C", 8836]; + else if ([scanner scanString:@"⊆" intoString:NULL]) + [result appendFormat:@"%C", 8838]; + else if ([scanner scanString:@"⊇" intoString:NULL]) + [result appendFormat:@"%C", 8839]; + else if ([scanner scanString:@"⊕" intoString:NULL]) + [result appendFormat:@"%C", 8853]; + else if ([scanner scanString:@"⊗" intoString:NULL]) + [result appendFormat:@"%C", 8855]; + else if ([scanner scanString:@"⊥" intoString:NULL]) + [result appendFormat:@"%C", 8869]; + else if ([scanner scanString:@"⋅" intoString:NULL]) + [result appendFormat:@"%C", 8901]; + else if ([scanner scanString:@"⌈" intoString:NULL]) + [result appendFormat:@"%C", 8968]; + else if ([scanner scanString:@"⌉" intoString:NULL]) + [result appendFormat:@"%C", 8969]; + else if ([scanner scanString:@"⌊" intoString:NULL]) + [result appendFormat:@"%C", 8970]; + else if ([scanner scanString:@"⌋" intoString:NULL]) + [result appendFormat:@"%C", 8971]; + else if ([scanner scanString:@"⟨" intoString:NULL]) + [result appendFormat:@"%C", 9001]; + else if ([scanner scanString:@"⟩" intoString:NULL]) + [result appendFormat:@"%C", 9002]; + else if ([scanner scanString:@"◊" intoString:NULL]) + [result appendFormat:@"%C", 9674]; + else if ([scanner scanString:@"♠" intoString:NULL]) + [result appendFormat:@"%C", 9824]; + else if ([scanner scanString:@"♣" intoString:NULL]) + [result appendFormat:@"%C", 9827]; + else if ([scanner scanString:@"♥" intoString:NULL]) + [result appendFormat:@"%C", 9829]; + else if ([scanner scanString:@"♦" intoString:NULL]) + [result appendFormat:@"%C", 9830]; + else { + + // Must be an isolated & with no space after + NSString *amp; + [scanner scanString:@"&" intoString:&]; // isolated & symbol + [result appendString:amp]; + + } + + } while (![scanner isAtEnd]); + + // Finish + NSString *resultingString = [NSString stringWithString:result]; + [result release]; + return resultingString; + +} + +// Needs more work to encode more entities +- (NSString *)stringByEncodingXMLEntities { + + // Scanner + NSScanner *scanner = [[NSScanner alloc] initWithString:self]; + [scanner setCharactersToBeSkipped:nil]; + NSMutableString *result = [[NSMutableString alloc] init]; + NSString *temp; + NSCharacterSet *characters = [NSCharacterSet characterSetWithCharactersInString:@"&\"'<>"]; + [scanner setCharactersToBeSkipped:nil]; + + // Scan + while (![scanner isAtEnd]) { + + // Get non new line or whitespace characters + temp = nil; + [scanner scanUpToCharactersFromSet:characters intoString:&temp]; + if (temp) [result appendString:temp]; + + // Replace with encoded entities + if ([scanner scanString:@"&" intoString:NULL]) + [result appendString:@"&"]; + else if ([scanner scanString:@"'" intoString:NULL]) + [result appendString:@"'"]; + else if ([scanner scanString:@"\"" intoString:NULL]) + [result appendString:@"""]; + else if ([scanner scanString:@"<" intoString:NULL]) + [result appendString:@"<"]; + else if ([scanner scanString:@">" intoString:NULL]) + [result appendString:@">"]; + + } + + // Cleanup + [scanner release]; + + // Return + NSString *retString = [NSString stringWithString:result]; + [result release]; + return retString; + +} + +- (NSString *)stringByStrippingTags { + + // Find first & and short-cut if we can + NSUInteger ampIndex = [self rangeOfString:@"<" options:NSLiteralSearch].location; + if (ampIndex == NSNotFound) { + return [NSString stringWithString:self]; // return copy of string as no tags found + } + + // Scan and find all tags + NSScanner *scanner = [NSScanner scannerWithString:self]; + [scanner setCharactersToBeSkipped:nil]; + NSMutableSet *tags = [[NSMutableSet alloc] init]; + NSString *tag; + do { + + // Scan up to < + tag = nil; + [scanner scanUpToString:@"<" intoString:NULL]; + [scanner scanUpToString:@">" intoString:&tag]; + + // Add to set + if (tag) { + NSString *t = [[NSString alloc] initWithFormat:@"%@>", tag]; + [tags addObject:t]; + [t release]; + } + + } while (![scanner isAtEnd]); + + // Strings + NSMutableString *result = [[NSMutableString alloc] initWithString:self]; + NSString *finalString; + + // Replace tags + NSString *replacement; + for (NSString *t in tags) { + + // Replace tag with space unless it's an inline element + replacement = @" "; + if ([t isEqualToString:@""] || + [t isEqualToString:@""] || + [t isEqualToString:@""] || + [t isEqualToString:@""] || + [t isEqualToString:@""] || + [t isEqualToString:@""] || + [t isEqualToString:@""] || + [t isEqualToString:@""]) { + replacement = @""; + } + + // Replace + [result replaceOccurrencesOfString:t + withString:replacement + options:NSLiteralSearch + range:NSMakeRange(0, result.length)]; + } + + // Remove multi-spaces and line breaks + finalString = [result stringByRemovingNewLinesAndWhitespace]; + + // Cleanup & return + [result release]; + [tags release]; + return finalString; + +} + +- (NSString *)stringWithNewLinesAsBRs { + + // Strange New lines: + // Next Line, U+0085 + // Form Feed, U+000C + // Line Separator, U+2028 + // Paragraph Separator, U+2029 + + // Scanner + NSScanner *scanner = [[NSScanner alloc] initWithString:self]; + [scanner setCharactersToBeSkipped:nil]; + NSMutableString *result = [[NSMutableString alloc] init]; + NSString *temp; + NSCharacterSet *newLineCharacters = [NSCharacterSet characterSetWithCharactersInString: + [NSString stringWithFormat:@"\n\r%C%C%C%C", 0x0085, 0x000C, 0x2028, 0x2029]]; + // Scan + do { + + // Get non new line characters + temp = nil; + [scanner scanUpToCharactersFromSet:newLineCharacters intoString:&temp]; + if (temp) [result appendString:temp]; + temp = nil; + + // Add
s + if ([scanner scanString:@"\r\n" intoString:nil]) { + + // Combine \r\n into just 1
+ [result appendString:@"
"]; + + } else if ([scanner scanCharactersFromSet:newLineCharacters intoString:&temp]) { + + // Scan other new line characters and add
s + if (temp) { + for (int i = 0; i < temp.length; i++) { + [result appendString:@"
"]; + } + } + + } + + } while (![scanner isAtEnd]); + + // Cleanup & return + [scanner release]; + NSString *retString = [NSString stringWithString:result]; + [result release]; + return retString; + +} + +- (NSString *)stringByRemovingNewLinesAndWhitespace { + + // Strange New lines: + // Next Line, U+0085 + // Form Feed, U+000C + // Line Separator, U+2028 + // Paragraph Separator, U+2029 + + // Scanner + NSScanner *scanner = [[NSScanner alloc] initWithString:self]; + [scanner setCharactersToBeSkipped:nil]; + NSMutableString *result = [[NSMutableString alloc] init]; + NSString *temp; + NSCharacterSet *newLineAndWhitespaceCharacters = [NSCharacterSet characterSetWithCharactersInString: + [NSString stringWithFormat:@" \t\n\r%C%C%C%C", 0x0085, 0x000C, 0x2028, 0x2029]]; + // Scan + while (![scanner isAtEnd]) { + + // Get non new line or whitespace characters + temp = nil; + [scanner scanUpToCharactersFromSet:newLineAndWhitespaceCharacters intoString:&temp]; + if (temp) [result appendString:temp]; + + // Replace with a space + if ([scanner scanCharactersFromSet:newLineAndWhitespaceCharacters intoString:NULL]) { + if (result.length > 0 && ![scanner isAtEnd]) // Dont append space to beginning or end of result + [result appendString:@" "]; + } + + } + + // Cleanup + [scanner release]; + + // Return + NSString *retString = [NSString stringWithString:result]; + [result release]; + return retString; + +} + +@end diff --git a/Classes/RegistrantDetailViewController.h b/Classes/RegistrantDetailViewController.h index aa998c6..75388f7 100644 --- a/Classes/RegistrantDetailViewController.h +++ b/Classes/RegistrantDetailViewController.h @@ -11,6 +11,8 @@ @class Registrant; +extern NSString *AppUserRegistrantIDKey; + @interface RegistrantDetailViewController : UIViewController { Registrant *currRegistrant; IBOutlet UILabel *industryLabel; @@ -27,5 +29,6 @@ @property (nonatomic, retain) UILabel *twitterLabel; @property (nonatomic, retain) UILabel *nameLabel; +- (IBAction)storeCurrentProfileAsIdentity; @end diff --git a/Classes/RegistrantDetailViewController.m b/Classes/RegistrantDetailViewController.m index f260157..423705f 100644 --- a/Classes/RegistrantDetailViewController.m +++ b/Classes/RegistrantDetailViewController.m @@ -15,7 +15,7 @@ @implementation RegistrantDetailViewController #pragma mark - #pragma mark View lifecycle - + - (void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; @@ -30,10 +30,15 @@ - (void) viewWillAppear:(BOOL)animated companyLabel.text = currRegistrant.company; industryLabel.text = currRegistrant.industry; emailLabel.text = currRegistrant.email; - twitterLabel.text = currRegistrant.twitter; + twitterLabel.text = currRegistrant.twitter; + + self.navigationItem.title = regName; } - +- (void)storeCurrentProfileAsIdentity { + [[NSUserDefaults standardUserDefaults] setObject:currRegistrant.rid forKey:AppUserRegistrantIDKey]; + NSLog(@"Wrote %@ to defaults as registrant ID for current user.", currRegistrant.rid); +} #pragma mark - #pragma mark Memory management diff --git a/Classes/SessionViewController.m b/Classes/SessionViewController.m index e9cd84b..926a4e9 100644 --- a/Classes/SessionViewController.m +++ b/Classes/SessionViewController.m @@ -150,6 +150,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N if (cell == nil) { cell = [[[UITableViewCell alloc] initWithFrame:CGRectMake(0, 0, 250, 60) reuseIdentifier:CellIdentifier] autorelease]; titleLabel = [[UILabel alloc] initWithFrame: CGRectMake(70, 5, 250, 25)]; + titleLabel.highlightedTextColor = [UIColor whiteColor]; titleLabel.tag = 3; [cell.contentView addSubview:titleLabel]; [titleLabel release]; diff --git a/Classes/TwitterFeedTableView.xib b/Classes/TwitterFeedTableView.xib new file mode 100644 index 0000000..4a0211d --- /dev/null +++ b/Classes/TwitterFeedTableView.xib @@ -0,0 +1,399 @@ + + + + 1024 + 10F569 + 804 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 123 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + {320, 460} + + + 3 + MQA + + NO + YES + NO + + IBCocoaTouchFramework + NO + 1 + 0 + YES + 44 + 22 + 22 + + + + + YES + + + view + + + + 5 + + + + dataSource + + + + 6 + + + + delegate + + + + 7 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 4 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 4.IBEditorWindowLastContentRect + 4.IBPluginDependency + + + YES + TwitterFeedTableViewController + UIResponder + {{329, 504}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 8 + + + + YES + + NSObject + + IBProjectSource + Classes/JSON/NSObject+SBJSON.h + + + + NSObject + + IBProjectSource + Classes/JSON/SBJsonWriter.h + + + + TwitterFeedTableViewController + UITableViewController + + IBProjectSource + Classes/TwitterFeedTableViewController.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIResponder + NSObject + + + + UIScrollView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIScrollView.h + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UITableView + UIScrollView + + IBFrameworkSource + UIKit.framework/Headers/UITableView.h + + + + UITableViewController + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITableViewController.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UIPopoverController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UISplitViewController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + + 3 + 123 + + diff --git a/Classes/TwitterFeedTableViewCell.xib b/Classes/TwitterFeedTableViewCell.xib new file mode 100644 index 0000000..e627c64 --- /dev/null +++ b/Classes/TwitterFeedTableViewCell.xib @@ -0,0 +1,472 @@ + + + + 1024 + 10F569 + 788 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 117 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 292 + + YES + + + 256 + + YES + + + 292 + {{6, 6}, {48, 48}} + + 1 + NO + IBCocoaTouchFramework + + + + 290 + {{60, 20}, {240, 35}} + + + 1 + MSAxIDEgMAA + + NO + YES + YES + 4 + IBCocoaTouchFramework + -8 + -8 + -8 + -8 + NO + NO + NO + NO + NO + NO + NO + NO + Tweet contents. This can be several lines, and this view will be resized programmatically as necessary. + + Helvetica + 12 + 16 + + + 2 + IBCocoaTouchFramework + + 2 + + + + 292 + {{60, 0}, {130, 20}} + + + 1 + MSAxIDEAA + + YES + 7 + 2 + NO + IBCocoaTouchFramework + @verylongtwittername + + Helvetica-Bold + 12 + 16 + + + 1 + MC4zNTIwNDA4MTYzIDAuMzUyMDQwODE2MyAwLjM1MjA0MDgxNjMAA + + + 1 + MSAxIDEAA + + 1 + NO + 10 + 2 + + + + 291 + {{195, 0}, {105, 20}} + + + YES + 7 + 3 + NO + IBCocoaTouchFramework + 10/31/2010 12:01 PM + + Helvetica + 10 + 16 + + + + 1 + NO + 10 + 2 + 2 + + + {320, 60} + + + 3 + MCAwAA + + NO + YES + 4 + YES + IBCocoaTouchFramework + + + {320, 60} + + + IBCocoaTouchFramework + 1 + + + + + + YES + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 2 + + + YES + + + + + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + + + YES + + YES + -2.CustomClassName + 2.IBEditorWindowLastContentRect + 2.IBPluginDependency + 3.CustomClassName + 3.IBPluginDependency + 4.IBPluginDependency + 5.IBPluginDependency + 6.IBPluginDependency + + + YES + UIResponder + {{813, 547}, {320, 60}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + TTImageView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 7 + + + + YES + + NSObject + + IBProjectSource + Classes/JSON/NSObject+SBJSON.h + + + + NSObject + + IBProjectSource + Classes/JSON/SBJsonWriter.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UILabel + UIView + + IBFrameworkSource + UIKit.framework/Headers/UILabel.h + + + + UIResponder + NSObject + + + + UIScrollView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIScrollView.h + + + + UITableViewCell + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITableViewCell.h + + + + UITextView + UIScrollView + + IBFrameworkSource + UIKit.framework/Headers/UITextView.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../CocoaCamp.xcodeproj + 3 + 117 + + diff --git a/Classes/TwitterFeedTableViewController.h b/Classes/TwitterFeedTableViewController.h new file mode 100644 index 0000000..e08dc4e --- /dev/null +++ b/Classes/TwitterFeedTableViewController.h @@ -0,0 +1,26 @@ +// +// TwitterFeedTableViewController.h +// CocoaCamp +// +// Created by Warren Moore on 9/1/10. +// Copyright 2010 Auerhaus Development, LLC. All rights reserved. +// + +#import + + +@interface TwitterFeedTableViewController : UITableViewController { + NSMutableData *tweetData; + NSArray *tweets; + NSDateFormatter *dateParser; + NSString *tweetSearchURLSuffix; + UIActivityIndicatorView *activityIndicator; +} + +- (void)refreshTweets; + +@end + +@interface NSDate(PrettyDate) +- (NSString *)prettyStringRelativeToDate:(NSDate *)priorDate; +@end \ No newline at end of file diff --git a/Classes/TwitterFeedTableViewController.m b/Classes/TwitterFeedTableViewController.m new file mode 100644 index 0000000..dfe211a --- /dev/null +++ b/Classes/TwitterFeedTableViewController.m @@ -0,0 +1,259 @@ +// +// TwitterFeedTableViewController.m +// CocoaCamp +// +// Created by Warren Moore on 9/1/10. +// Copyright 2010 Auerhaus Development, LLC. All rights reserved. +// + +#import "TwitterFeedTableViewController.h" +#import "SBJSON.h" +#import "NSString+XMLEntities.h" + +@implementation TwitterFeedTableViewController + +static NSString *TweetSearchURL = @"http://search.twitter.com/search.json"; +static NSString *RFC822DateFormat = @"EEE, dd MMM yyyy HH:mm:ss z"; + +#pragma mark - +#pragma mark View lifecycle + +- (void)viewDidLoad { + [super viewDidLoad]; + + tweets = [[NSMutableArray alloc] init]; + tweetSearchURLSuffix = @"?q=cocoacamp"; + + dateParser = [[NSDateFormatter alloc] init]; + [dateParser setDateFormat:RFC822DateFormat]; + + CGRect frame = CGRectMake(self.view.frame.size.width/2-15, self.view.frame.size.height/2-15, 30, 30); + activityIndicator = [[UIActivityIndicatorView alloc] initWithFrame:frame]; + [activityIndicator startAnimating]; + activityIndicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray; + [activityIndicator sizeToFit]; + activityIndicator.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin | + UIViewAutoresizingFlexibleRightMargin | + UIViewAutoresizingFlexibleTopMargin | + UIViewAutoresizingFlexibleBottomMargin); + + self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh + target:self + action:@selector(refreshTweets)] autorelease]; +} + +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + [self refreshTweets]; +} + +- (void)viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return UIInterfaceOrientationIsPortrait(interfaceOrientation); +} + +- (void)refreshTweets { + [self.view addSubview:activityIndicator]; + tweetData = [[NSMutableData alloc] init]; + NSURL *searchURL = [NSURL URLWithString:[TweetSearchURL stringByAppendingString:tweetSearchURLSuffix]]; + + NSLog(@"Issuing request for tweets to URL: %@", searchURL); + + NSURLRequest *request = [[NSURLRequest alloc] initWithURL:searchURL]; + [[NSURLConnection alloc] initWithRequest:request delegate:self]; + [request release]; +} + +- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { + [tweetData appendData:data]; +} + +- (void)connectionDidFinishLoading:(NSURLConnection *)connection { + SBJSON *jsonParser = [[SBJSON alloc] init]; + + NSString *twitterJSON = [[NSString alloc] initWithData:tweetData encoding:NSUTF8StringEncoding]; + NSDictionary *twitterAssoc = [jsonParser objectWithString:twitterJSON error:nil]; + + NSArray *newTweets = [[twitterAssoc objectForKey:@"results"] retain]; + + // do some preprocessing on tweets to make our lives easier later + for(NSDictionary *tweet in newTweets) + { + NSString *tweetText = [[tweet objectForKey:@"text"] stringByDecodingXMLEntities]; + + CGSize tweetSize = [tweetText sizeWithFont:[UIFont systemFontOfSize:12.0] + constrainedToSize:CGSizeMake(225.0, 1000.0) + lineBreakMode:UILineBreakModeWordWrap]; + + // risky business. + [(NSMutableDictionary *)tweet setObject:tweetText forKey:@"text"]; + [(NSMutableDictionary *)tweet setObject:[NSNumber numberWithFloat:tweetSize.height] forKey:@"display_height"]; + } + + NSLog(@"Will add an additional %d tweets to the existing %d tweets.", [newTweets count], [tweets count]); + + NSArray *oldTweets = tweets; + tweets = [[newTweets arrayByAddingObjectsFromArray:tweets] retain]; // add new tweets to beginning of timeline + [oldTweets release]; + [newTweets release]; + + [tweetSearchURLSuffix release]; + tweetSearchURLSuffix = [[twitterAssoc objectForKey:@"refresh_url"] retain]; // cache refresh URL in case we refresh before being dismissed + + [twitterJSON release]; + [tweetData release]; + [connection release]; + + [self.tableView reloadData]; + [activityIndicator removeFromSuperview]; +} + +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { + [tweetData release]; + [connection release]; + + [activityIndicator removeFromSuperview]; +} + +#pragma mark - +#pragma mark Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return [tweets count]; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { + NSDictionary *tweet = [tweets objectAtIndex:indexPath.row]; + CGFloat height = [[tweet objectForKey:@"display_height"] floatValue] + 24.0; // compensate for text area insets and y-position + return MAX(60.0, height); // clamp to minimum height +} + + +// Customize the appearance of table view cells. +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + static NSString *CellIdentifier = @"TweetCell"; + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; + + UILabel *senderLabel; + UILabel *dateLabel; + UITextView *contentText; + TTImageView *avatarImageView; + + if (cell == nil) { + + NSArray *bundleObjects = [[NSBundle mainBundle] loadNibNamed:@"TwitterFeedTableViewCell" owner:nil options:nil]; + + cell = [bundleObjects objectAtIndex:0]; + + avatarImageView = (TTImageView *)[cell viewWithTag:1]; + avatarImageView.defaultImage = [UIImage imageNamed:@"loading.png"]; + } + + senderLabel = (UILabel *)[cell viewWithTag:2]; + dateLabel = (UILabel *)[cell viewWithTag:3]; + contentText = (UITextView *)[cell viewWithTag:4]; + avatarImageView = (TTImageView *)[cell viewWithTag:1]; + + NSDictionary *tweet = [tweets objectAtIndex:indexPath.row]; + + NSDate *tweetDate = [dateParser dateFromString:[tweet objectForKey:@"created_at"]]; + + senderLabel.text = [tweet objectForKey:@"from_user"]; + dateLabel.text = [tweetDate prettyStringRelativeToDate:[NSDate date]]; + + contentText.text = [tweet objectForKey:@"text"]; + CGFloat height = [[tweet objectForKey:@"display_height"] floatValue]; + [contentText setFrame:CGRectMake(60.0, 20.0, 240.0, height)]; + + avatarImageView.urlPath = [tweet objectForKey:@"profile_image_url"]; + + return cell; +} + + +- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { + return NO; +} + +- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { + return NO; +} + +#pragma mark - +#pragma mark Table view delegate + +- (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath { + return nil; // No selection allowed +} + +#pragma mark - +#pragma mark Memory management + +- (void)didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Relinquish ownership any cached data, images, etc that aren't in use. +} + +- (void)viewDidUnload { + // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand. + [dateParser release]; + [tweets release]; + [activityIndicator release]; +} + + +- (void)dealloc { + [super dealloc]; +} + +@end + +/* Logic taken from JavaScript Pretty Date by John Resig + * + */ +@implementation NSDate (PrettyDate) +- (NSString *)prettyStringRelativeToDate:(NSDate *)priorDate { + NSTimeInterval secondDiff = [priorDate timeIntervalSinceDate:self]; + NSInteger dayDiff = (NSInteger)floor(secondDiff / 86400); + + if(dayDiff < 0) + { + return @"In the future"; + } + else if(dayDiff == 0) + { + if(secondDiff < 60) + return @"Just now"; + else if(secondDiff < 120) + return @"1 minute ago"; + else if(secondDiff < 3600) + return [NSString stringWithFormat:@"%d minutes ago", (NSInteger)floor(secondDiff/60)]; + else if(secondDiff < 7200) + return @"1 hour ago"; + else if(secondDiff < 86400) + return [NSString stringWithFormat:@"%d hours ago", (NSInteger)floor(secondDiff/3600)]; + } + else if(dayDiff == 1) + return @"Yesterday"; + else if(dayDiff < 7) + return [NSString stringWithFormat:@"%d days ago", dayDiff]; + else if(dayDiff == 7) + return @"1 week ago"; + else + return [NSString stringWithFormat:@"%d weeks ago", ((dayDiff + 3) / 7)]; // Resig uses ceil; this seems smoother + + return @"Sometime"; +} +@end From 4c3a1ecabdd3499db3427fd7f99cb486107fd2af Mon Sep 17 00:00:00 2001 From: Warren Moore Date: Thu, 2 Sep 2010 16:00:57 -0400 Subject: [PATCH 8/9] Committing xib and project files for the previous commit. This will not apply cleanly to most existing repos but is essential because the tab structure of the main window was changed and numerous files were add/rm'd to the project. --- Classes/RegistrantDetailView.xib | 80 +++++++- CocoaCamp.xcodeproj/project.pbxproj | 37 +++- MainWindow.xib | 296 +++++++++++++++++++++------- RegistrantListView.xib | 202 +++++++------------ 4 files changed, 401 insertions(+), 214 deletions(-) diff --git a/Classes/RegistrantDetailView.xib b/Classes/RegistrantDetailView.xib index 3328e46..c0e3dac 100644 --- a/Classes/RegistrantDetailView.xib +++ b/Classes/RegistrantDetailView.xib @@ -190,8 +190,37 @@ 1 10 + + + 292 + {{211, 317}, {89, 30}} + + NO + IBCocoaTouchFramework + 0 + 0 + + Helvetica-Bold + 12 + 16 + + 1 + This is Me! + + 3 + MQA + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + 3 + MC41AA + +
- {320, 416} + {320, 367} 3 @@ -204,6 +233,7 @@ NO + IBCocoaTouchFramework @@ -258,6 +288,15 @@
29
+ + + storeCurrentProfileAsIdentity + + + 7 + + 31 +
@@ -293,6 +332,7 @@ + @@ -341,6 +381,11 @@
+ + 30 + + + @@ -358,6 +403,7 @@ 17.IBPluginDependency 18.IBPluginDependency 19.IBPluginDependency + 30.IBPluginDependency 8.IBEditorWindowLastContentRect 8.IBPluginDependency @@ -374,7 +420,8 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{660, 408}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + {{512, 331}, {320, 480}} com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -394,7 +441,7 @@ - 29 + 31 @@ -416,6 +463,17 @@ RegistrantDetailViewController UIViewController + + storeCurrentProfileAsIdentity + id + + + storeCurrentProfileAsIdentity + + storeCurrentProfileAsIdentity + id + + YES @@ -582,6 +640,22 @@ UIKit.framework/Headers/UIResponder.h + + UIButton + UIControl + + IBFrameworkSource + UIKit.framework/Headers/UIButton.h + + + + UIControl + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIControl.h + + UILabel UIView diff --git a/CocoaCamp.xcodeproj/project.pbxproj b/CocoaCamp.xcodeproj/project.pbxproj index b0451ba..5f02745 100644 --- a/CocoaCamp.xcodeproj/project.pbxproj +++ b/CocoaCamp.xcodeproj/project.pbxproj @@ -70,10 +70,14 @@ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 288765080DF74369002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765070DF74369002DB57D /* CoreGraphics.framework */; }; 28AD73880D9D96C1002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD73870D9D96C1002E5188 /* MainWindow.xib */; }; + 809FDB21122EDD2B00528305 /* bird.png in Resources */ = {isa = PBXBuildFile; fileRef = 809FDB20122EDD2B00528305 /* bird.png */; }; + 809FDB25122EDD7400528305 /* TwitterFeedTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 809FDB23122EDD7400528305 /* TwitterFeedTableViewController.m */; }; + 809FDB26122EDD7400528305 /* TwitterFeedTableView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 809FDB24122EDD7400528305 /* TwitterFeedTableView.xib */; }; + 809FDBD9122EF15E00528305 /* TwitterFeedTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 809FDBD8122EF15E00528305 /* TwitterFeedTableViewCell.xib */; }; + 809FDCC4122F074600528305 /* NSString+XMLEntities.m in Sources */ = {isa = PBXBuildFile; fileRef = 809FDCC3122F074600528305 /* NSString+XMLEntities.m */; }; 80C1A8BF1221CCCD007F7D7A /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 80C1A8BE1221CCCD007F7D7A /* CoreLocation.framework */; }; 80C1A8C31221CCD9007F7D7A /* libBump.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 80C1A8C21221CCD9007F7D7A /* libBump.a */; }; 80C1A8C81221CCEB007F7D7A /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 80C1A8C71221CCEB007F7D7A /* AudioToolbox.framework */; }; - 80C1A8D11221CD02007F7D7A /* ContactExchangeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 80C1A8CE1221CD02007F7D7A /* ContactExchangeViewController.m */; }; 80C1A8D21221CD02007F7D7A /* ContactManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 80C1A8D01221CD02007F7D7A /* ContactManager.m */; }; 80C1A8D71221CD17007F7D7A /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 80C1A8D61221CD17007F7D7A /* AddressBook.framework */; }; 80C1A8D91221CD17007F7D7A /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 80C1A8D81221CD17007F7D7A /* AddressBookUI.framework */; }; @@ -328,11 +332,16 @@ 28A0AB4B0D9B1048005BE974 /* CocoaCamp_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocoaCamp_Prefix.pch; sourceTree = ""; }; 28AD73870D9D96C1002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 809FDB20122EDD2B00528305 /* bird.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = bird.png; path = Resources/bird.png; sourceTree = ""; }; + 809FDB22122EDD7400528305 /* TwitterFeedTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TwitterFeedTableViewController.h; sourceTree = ""; }; + 809FDB23122EDD7400528305 /* TwitterFeedTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TwitterFeedTableViewController.m; sourceTree = ""; }; + 809FDB24122EDD7400528305 /* TwitterFeedTableView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TwitterFeedTableView.xib; sourceTree = ""; }; + 809FDBD8122EF15E00528305 /* TwitterFeedTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = TwitterFeedTableViewCell.xib; path = Classes/TwitterFeedTableViewCell.xib; sourceTree = ""; }; + 809FDCC2122F074600528305 /* NSString+XMLEntities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+XMLEntities.h"; sourceTree = ""; }; + 809FDCC3122F074600528305 /* NSString+XMLEntities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+XMLEntities.m"; sourceTree = ""; }; 80C1A8BE1221CCCD007F7D7A /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; 80C1A8C21221CCD9007F7D7A /* libBump.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libBump.a; sourceTree = ""; }; 80C1A8C71221CCEB007F7D7A /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - 80C1A8CD1221CD02007F7D7A /* ContactExchangeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContactExchangeViewController.h; sourceTree = ""; }; - 80C1A8CE1221CD02007F7D7A /* ContactExchangeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContactExchangeViewController.m; sourceTree = ""; }; 80C1A8CF1221CD02007F7D7A /* ContactManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContactManager.h; sourceTree = ""; }; 80C1A8D01221CD02007F7D7A /* ContactManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContactManager.m; sourceTree = ""; }; 80C1A8D61221CD17007F7D7A /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; }; @@ -440,6 +449,8 @@ 080E96DDFE201D6D7F000001 /* Classes */ = { isa = PBXGroup; children = ( + 809FDCC2122F074600528305 /* NSString+XMLEntities.h */, + 809FDCC3122F074600528305 /* NSString+XMLEntities.m */, 030894A11226F4100088A584 /* PresenterListViewController.h */, 030894A21226F4100088A584 /* PresenterListViewController.m */, 030894921226F2DB0088A584 /* Registrant.h */, @@ -451,8 +462,6 @@ 030894901226F2CA0088A584 /* AttendeeListViewController.m */, 80C1A8F81221CDF4007F7D7A /* Bump.h */, 80C1A8F91221CDF4007F7D7A /* BumpContact.h */, - 80C1A8CD1221CD02007F7D7A /* ContactExchangeViewController.h */, - 80C1A8CE1221CD02007F7D7A /* ContactExchangeViewController.m */, 80C1A8CF1221CD02007F7D7A /* ContactManager.h */, 80C1A8D01221CD02007F7D7A /* ContactManager.m */, 03AF412612120F8D0061D5DD /* FlickrController.h */, @@ -474,6 +483,9 @@ 03FE5A90122C79DA0054B9ED /* SessionDetailWebView.h */, 03FE5A91122C79DA0054B9ED /* SessionDetailWebView.m */, 03FE5A92122C79DA0054B9ED /* SessionDetailWebView.xib */, + 809FDB22122EDD7400528305 /* TwitterFeedTableViewController.h */, + 809FDB23122EDD7400528305 /* TwitterFeedTableViewController.m */, + 809FDB24122EDD7400528305 /* TwitterFeedTableView.xib */, ); path = Classes; sourceTree = ""; @@ -514,6 +526,7 @@ 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( + 809FDBD8122EF15E00528305 /* TwitterFeedTableViewCell.xib */, 0308948D1226F2A90088A584 /* RegistrantListView.xib */, 030893A21226F05D0088A584 /* ContactExchangeView.xib */, AB2AE44A11EBAA8500015C01 /* images */, @@ -544,6 +557,7 @@ AB2AE44A11EBAA8500015C01 /* images */ = { isa = PBXGroup; children = ( + 809FDB20122EDD2B00528305 /* bird.png */, FBF7E8211227E55000B7A710 /* keynote-icon.png */, FBF7E8221227E55000B7A710 /* keynote-icon@2x.png */, 035B9D45122693520038129A /* loading.png */, @@ -679,7 +693,14 @@ isa = PBXProject; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "CocoaCamp" */; compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); mainGroup = 29B97314FDCFA39411CA2CEA /* CocoaCamp */; projectDirPath = ""; projectReferences = ( @@ -873,6 +894,9 @@ FBF7E8231227E55000B7A710 /* keynote-icon.png in Resources */, FBF7E8241227E55000B7A710 /* keynote-icon@2x.png in Resources */, 03FE5A94122C79DA0054B9ED /* SessionDetailWebView.xib in Resources */, + 809FDB21122EDD2B00528305 /* bird.png in Resources */, + 809FDB26122EDD7400528305 /* TwitterFeedTableView.xib in Resources */, + 809FDBD9122EF15E00528305 /* TwitterFeedTableViewCell.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -895,7 +919,6 @@ 03AF412B12120F8D0061D5DD /* FlickrController.m in Sources */, 03AF412D12120F8D0061D5DD /* FlickrPageViewController.m in Sources */, 0341222E12148A3400B376F7 /* SessionDetailViewController.m in Sources */, - 80C1A8D11221CD02007F7D7A /* ContactExchangeViewController.m in Sources */, 80C1A8D21221CD02007F7D7A /* ContactManager.m in Sources */, 030894911226F2CA0088A584 /* AttendeeListViewController.m in Sources */, 030894971226F2DB0088A584 /* Registrant.m in Sources */, @@ -903,6 +926,8 @@ 030894A31226F4100088A584 /* PresenterListViewController.m in Sources */, 03FE5A76122C77900054B9ED /* MyStyledTextLabel.m in Sources */, 03FE5A93122C79DA0054B9ED /* SessionDetailWebView.m in Sources */, + 809FDB25122EDD7400528305 /* TwitterFeedTableViewController.m in Sources */, + 809FDCC4122F074600528305 /* NSString+XMLEntities.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/MainWindow.xib b/MainWindow.xib index a0ce0b1..13c3da3 100755 --- a/MainWindow.xib +++ b/MainWindow.xib @@ -3,16 +3,16 @@ 1024 10F569 - 788 + 804 1038.29 461.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 117 + 123 YES - + YES @@ -64,6 +64,61 @@ IBCocoaTouchFramework NO + + + People + + NSImage + group.png + + IBCocoaTouchFramework + + + + + + 1 + + IBCocoaTouchFramework + NO + + + 256 + {0, 0} + NO + YES + YES + IBCocoaTouchFramework + + + YES + + Registrants + + + Attendees + + Back + IBCocoaTouchFramework + 1 + + + Bump + IBCocoaTouchFramework + 1 + + + IBCocoaTouchFramework + + + + 1 + + IBCocoaTouchFramework + NO + + + YES @@ -110,58 +165,68 @@ - - People - - People + + + + Flickr NSImage - group.png + photoIcon.png IBCocoaTouchFramework - - ContactExchangeView + FlickrController 1 IBCocoaTouchFramework NO - - - Flickr + + + Twitter NSImage - photoIcon.png + bird.png IBCocoaTouchFramework - FlickrController + + 1 IBCocoaTouchFramework NO - - - Attendees - - You + + + 256 + {0, 0} + NO + YES + YES IBCocoaTouchFramework - - - - - 1 + + YES + + Twitter + + Twitter + IBCocoaTouchFramework + + + + 1 + + IBCocoaTouchFramework + NO + - IBCocoaTouchFramework - NO @@ -204,6 +269,14 @@ 113 + + + initiateContactExchange: + + + + 160 + @@ -241,8 +314,8 @@ - - + + @@ -276,8 +349,8 @@ YES - + @@ -286,6 +359,11 @@ + + 128 + + + 126 @@ -301,37 +379,89 @@ - 128 - - + 142 + + + YES + + + + + - 129 - + 144 + + + + + 143 + YES - + - + - 130 - - + 145 + + + YES + + + + + + + 146 + + - 131 - + 152 + YES - + + + - 132 - - + 156 + + + + + 154 + + + + + 153 + + + YES + + + + + + 155 + + + + + 157 + + + + + 158 + + @@ -348,8 +478,19 @@ 109.IBPluginDependency 110.IBPluginDependency 126.CustomClassName - 129.CustomClassName - 131.CustomClassName + 142.IBEditorWindowLastContentRect + 142.IBPluginDependency + 143.CustomClassName + 143.IBPluginDependency + 144.IBPluginDependency + 145.IBPluginDependency + 152.IBEditorWindowLastContentRect + 152.IBPluginDependency + 153.CustomClassName + 153.IBPluginDependency + 154.IBPluginDependency + 155.IBPluginDependency + 158.IBPluginDependency 2.IBAttributePlaceholdersKey 2.IBEditorWindowLastContentRect 2.IBPluginDependency @@ -360,15 +501,26 @@ YES UIApplication UIResponder - {{525, 100}, {320, 480}} + {{333, 264}, {320, 480}} com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin FlickrController com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin SessionViewController - ContactExchangeViewController + {{330, 642}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin AttendeeListViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + {{330, 619}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + TwitterFeedTableViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin YES @@ -398,7 +550,7 @@ - 134 + 160 @@ -406,6 +558,17 @@ AttendeeListViewController UITableViewController + + initiateContactExchange: + id + + + initiateContactExchange: + + initiateContactExchange: + id + + IBProjectSource Classes/AttendeeListViewController.h @@ -451,25 +614,6 @@ Classes/CocoaCampAppDelegate.h - - ContactExchangeViewController - UIViewController - - initiateContactExchange: - id - - - initiateContactExchange: - - initiateContactExchange: - id - - - - IBProjectSource - Classes/ContactExchangeViewController.h - - FlickrController UIViewController @@ -564,6 +708,14 @@ Classes/SessionViewController.h + + TwitterFeedTableViewController + UITableViewController + + IBProjectSource + Classes/TwitterFeedTableViewController.h + + YES @@ -866,17 +1018,19 @@ YES YES + bird.png calendar.png group.png photoIcon.png YES + {25, 24} {23, 25} {32, 21} {30, 30} - 117 + 123 diff --git a/RegistrantListView.xib b/RegistrantListView.xib index aafa5ef..35cd232 100644 --- a/RegistrantListView.xib +++ b/RegistrantListView.xib @@ -12,8 +12,8 @@ YES + - YES @@ -53,37 +53,31 @@ IBCocoaTouchFramework - - + 1 IBCocoaTouchFramework NO - - - Attendees - IBCocoaTouchFramework - - - - - 1 - + + + 256 + {0, 0} + NO + YES + YES IBCocoaTouchFramework - NO YES - - - - Presenters + + + + Root View Controller IBCocoaTouchFramework - - + 1 @@ -91,16 +85,6 @@ NO - - - 266 - {{129, 330}, {163, 49}} - - 3 - MCAwAA - - IBCocoaTouchFramework - @@ -133,48 +117,33 @@ - 3 - + 9 + YES - - - + + - 4 - - - - - 5 - + 10 + YES - + - + - 6 - - - YES - - - - - - 7 - - + 11 + + - 8 - - + 12 + + @@ -186,30 +155,22 @@ -2.CustomClassName 1.IBEditorWindowLastContentRect 1.IBPluginDependency - 3.IBEditorWindowLastContentRect - 3.IBPluginDependency - 4.IBPluginDependency - 5.CustomClassName - 5.IBPluginDependency - 6.CustomClassName - 6.IBPluginDependency - 7.IBPluginDependency - 8.IBPluginDependency + 10.IBPluginDependency + 11.IBPluginDependency + 12.IBPluginDependency + 9.IBEditorWindowLastContentRect + 9.IBPluginDependency YES RegistrantListViewController UIResponder - {{239, 382}, {320, 480}} + {{330, 382}, {320, 480}} com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{692, 119}, {320, 480}} com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - AttendeeListViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - PresenterListViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + {{330, 665}, {320, 480}} com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -229,19 +190,11 @@ - 8 + 12 YES - - AttendeeListViewController - UITableViewController - - IBProjectSource - Classes/AttendeeListViewController.h - - NSObject @@ -256,22 +209,6 @@ Classes/JSON/SBJsonWriter.h - - PresenterListViewController - UITableViewController - - IBProjectSource - Classes/PresenterListViewController.h - - - - RegistrantListViewController - UITableViewController - - IBProjectSource - Classes/RegistrantListViewController.h - - YES @@ -381,64 +318,61 @@ - UIBarItem - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIBarItem.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView + UIBarButtonItem + UIBarItem IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h + UIKit.framework/Headers/UIBarButtonItem.h - UISearchDisplayController + UIBarItem NSObject IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h + UIKit.framework/Headers/UIBarItem.h - UITabBar + UINavigationBar UIView - + IBFrameworkSource - UIKit.framework/Headers/UITabBar.h + UIKit.framework/Headers/UINavigationBar.h - UITabBarController + UINavigationController UIViewController - + IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h + UIKit.framework/Headers/UINavigationController.h - UITabBarItem - UIBarItem + UINavigationItem + NSObject + + + + UIResponder + NSObject + + + + UISearchBar + UIView IBFrameworkSource - UIKit.framework/Headers/UITabBarItem.h + UIKit.framework/Headers/UISearchBar.h - UITableViewController - UIViewController + UISearchDisplayController + NSObject IBFrameworkSource - UIKit.framework/Headers/UITableViewController.h + UIKit.framework/Headers/UISearchDisplayController.h @@ -458,10 +392,7 @@ UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - + UIViewController @@ -479,7 +410,10 @@ UIViewController - + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + UIViewController From b2b31381db7509832a1fe268be278c2246db5ca2 Mon Sep 17 00:00:00 2001 From: Warren Moore Date: Thu, 2 Sep 2010 16:33:22 -0400 Subject: [PATCH 9/9] Merged Toby's changes and removed files that are no longer referenced --- Classes/SessionDetailViewController.m | 16 +- Classes/SessionDetailWebView.h | 22 -- Classes/SessionDetailWebView.m | 54 ---- Classes/SessionDetailWebView.xib | 414 -------------------------- CocoaCamp.xcodeproj/project.pbxproj | 14 - 5 files changed, 4 insertions(+), 516 deletions(-) delete mode 100644 Classes/SessionDetailWebView.h delete mode 100644 Classes/SessionDetailWebView.m delete mode 100644 Classes/SessionDetailWebView.xib diff --git a/Classes/SessionDetailViewController.m b/Classes/SessionDetailViewController.m index 551566e..bbcacd5 100644 --- a/Classes/SessionDetailViewController.m +++ b/Classes/SessionDetailViewController.m @@ -8,7 +8,6 @@ #import "SessionDetailViewController.h" #import "SessionViewController.h" -#import "SessionDetailWebView.h" @implementation SessionDetailViewController @synthesize talk, schedule, portraitImg, titleText, descriptionText; @@ -79,22 +78,15 @@ - (void)viewDidLoad { } -- (void)didEndTouchOnANode{ - SessionDetailWebView *webView = [[SessionDetailWebView alloc] initWithNibName:@"SessionDetailWebView" bundle:nil]; - - [self.navigationController pushViewController:webView animated:YES]; - - self.title = @"Talk Detail"; - +- (void)didEndTouchOnANode{ NSDictionary *reg = [talk objectForKey: @"Register"]; NSString *twitter = [reg objectForKey:@"twitter"]; NSURL *url = [NSURL URLWithString: [NSString stringWithFormat: @"http://twitter.com/%@", twitter]]; - webView.title = [NSString stringWithFormat:@"@%@", twitter]; - [webView loadURL:url]; - [webView release]; - + TTWebController *webController = [[TTWebController alloc] initWithNavigatorURL: url query: nil]; + [self.navigationController pushViewController:webController animated:YES]; + [webController release]; } - (void)didReceiveMemoryWarning { diff --git a/Classes/SessionDetailWebView.h b/Classes/SessionDetailWebView.h deleted file mode 100644 index 8e0a602..0000000 --- a/Classes/SessionDetailWebView.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// SessionDetailWebView.h -// CocoaCamp -// -// Created by airportyh on 8/30/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// - -#import - - -@interface SessionDetailWebView : UIViewController { - UIWebView *webView; - UIActivityIndicatorView *progressInd; -} - -@property (nonatomic, retain) IBOutlet UIWebView *webView; -@property (nonatomic, retain) UIActivityIndicatorView *progressInd; - -- (void)loadURL: (NSURL *)url; - -@end diff --git a/Classes/SessionDetailWebView.m b/Classes/SessionDetailWebView.m deleted file mode 100644 index b622715..0000000 --- a/Classes/SessionDetailWebView.m +++ /dev/null @@ -1,54 +0,0 @@ -// -// SessionDetailWebView.m -// CocoaCamp -// -// Created by airportyh on 8/30/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// - -#import "SessionDetailWebView.h" - - -@implementation SessionDetailWebView -@synthesize webView, progressInd; - -- (void)loadURL: (NSURL *)url{ - NSURLRequest *req = [NSURLRequest requestWithURL:url]; - [self.webView loadRequest:req]; -} - -- (UIActivityIndicatorView *)progressInd { - if (progressInd == nil) - { - CGRect frame = CGRectMake(self.view.frame.size.width/2-15, self.view.frame.size.height/2-15, 30, 30); - progressInd = [[UIActivityIndicatorView alloc] initWithFrame:frame]; - [progressInd startAnimating]; - progressInd.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray; - [progressInd sizeToFit]; - progressInd.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin | - UIViewAutoresizingFlexibleRightMargin | - UIViewAutoresizingFlexibleTopMargin | - UIViewAutoresizingFlexibleBottomMargin); - - progressInd.tag = 1; // tag this view for later so we can remove it from recycled table cells - } - return progressInd; -} - -- (void)webViewDidStartLoad:(UIWebView *)webView{ - [self.view addSubview: self.progressInd]; -} - -- (void)webViewDidFinishLoad:(UIWebView *)webView{ - [self.progressInd removeFromSuperview]; -} - -- (void)dealloc { - [super dealloc]; - [self.webView release]; - if (progressInd) - [progressInd release]; -} - - -@end diff --git a/Classes/SessionDetailWebView.xib b/Classes/SessionDetailWebView.xib deleted file mode 100644 index 90f0d5c..0000000 --- a/Classes/SessionDetailWebView.xib +++ /dev/null @@ -1,414 +0,0 @@ - - - - 1024 - 10F569 - 788 - 1038.29 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 117 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - YES - - - 274 - {320, 460} - - - 1 - MSAxIDEAA - - IBCocoaTouchFramework - 1 - YES - - - {320, 460} - - - 3 - MQA - - 2 - - - - IBCocoaTouchFramework - - - - - YES - - - view - - - - 3 - - - - webView - - - - 5 - - - - delegate - - - - 6 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 4.IBPluginDependency - - - YES - SessionDetailWebView - UIResponder - {{579, 43}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 6 - - - - YES - - NSObject - - IBProjectSource - Classes/JSON/NSObject+SBJSON.h - - - - NSObject - - IBProjectSource - Classes/JSON/SBJsonWriter.h - - - - SessionDetailWebView - UIViewController - - webView - UIWebView - - - webView - - webView - UIWebView - - - - IBProjectSource - Classes/SessionDetailWebView.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - UIWebView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIWebView.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - ../CocoaCamp.xcodeproj - 3 - 117 - - diff --git a/CocoaCamp.xcodeproj/project.pbxproj b/CocoaCamp.xcodeproj/project.pbxproj index 5f02745..df6a1bb 100644 --- a/CocoaCamp.xcodeproj/project.pbxproj +++ b/CocoaCamp.xcodeproj/project.pbxproj @@ -62,8 +62,6 @@ 03CD373B120D68940054728C /* SBJsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 03CD3734120D68940054728C /* SBJsonParser.m */; }; 03CD373C120D68940054728C /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 03CD3736120D68940054728C /* SBJsonWriter.m */; }; 03FE5A76122C77900054B9ED /* MyStyledTextLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 03FE5A75122C77900054B9ED /* MyStyledTextLabel.m */; }; - 03FE5A93122C79DA0054B9ED /* SessionDetailWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 03FE5A91122C79DA0054B9ED /* SessionDetailWebView.m */; }; - 03FE5A94122C79DA0054B9ED /* SessionDetailWebView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 03FE5A92122C79DA0054B9ED /* SessionDetailWebView.xib */; }; 1D3623260D0F684500981E51 /* CocoaCampAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* CocoaCampAppDelegate.m */; }; 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; @@ -261,7 +259,6 @@ 030894961226F2DB0088A584 /* RegistrantDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegistrantDetailViewController.m; sourceTree = ""; }; 030894A11226F4100088A584 /* PresenterListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PresenterListViewController.h; sourceTree = ""; }; 030894A21226F4100088A584 /* PresenterListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PresenterListViewController.m; sourceTree = ""; }; - 0341222B12148A3400B376F7 /* SessionDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionDetailViewController.h; sourceTree = ""; }; 0341222C12148A3400B376F7 /* SessionDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionDetailViewController.m; sourceTree = ""; }; 0341222D12148A3400B376F7 /* SessionDetailViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SessionDetailViewController.xib; sourceTree = ""; }; 034654D512269693005A5D6C /* bump_button_blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bump_button_blue.png; sourceTree = ""; }; @@ -302,7 +299,6 @@ 03AF412A12120F8D0061D5DD /* FlickrPageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FlickrPageViewController.m; sourceTree = ""; }; 03AF412E12120FA80061D5DD /* photoIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = photoIcon.png; sourceTree = ""; }; 03AF412F12120FA80061D5DD /* roundrecbuttonnorm.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = roundrecbuttonnorm.png; sourceTree = ""; }; - 03CD36EA120D0F240054728C /* SessionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionViewController.h; sourceTree = ""; }; 03CD36EB120D0F240054728C /* SessionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionViewController.m; sourceTree = ""; }; 03CD36EC120D0F240054728C /* SessionViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = SessionViewController.xib; path = Classes/SessionViewController.xib; sourceTree = ""; }; 03CD372A120D68940054728C /* JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSON.h; sourceTree = ""; }; @@ -320,9 +316,6 @@ 03CD3736120D68940054728C /* SBJsonWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonWriter.m; sourceTree = ""; }; 03FE5A74122C77900054B9ED /* MyStyledTextLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyStyledTextLabel.h; sourceTree = ""; }; 03FE5A75122C77900054B9ED /* MyStyledTextLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyStyledTextLabel.m; sourceTree = ""; }; - 03FE5A90122C79DA0054B9ED /* SessionDetailWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionDetailWebView.h; sourceTree = ""; }; - 03FE5A91122C79DA0054B9ED /* SessionDetailWebView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionDetailWebView.m; sourceTree = ""; }; - 03FE5A92122C79DA0054B9ED /* SessionDetailWebView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SessionDetailWebView.xib; sourceTree = ""; }; 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 1D3623240D0F684500981E51 /* CocoaCampAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocoaCampAppDelegate.h; sourceTree = ""; }; 1D3623250D0F684500981E51 /* CocoaCampAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CocoaCampAppDelegate.m; sourceTree = ""; }; @@ -473,16 +466,11 @@ 03CD3729120D68940054728C /* JSON */, 1D3623240D0F684500981E51 /* CocoaCampAppDelegate.h */, 1D3623250D0F684500981E51 /* CocoaCampAppDelegate.m */, - 03CD36EA120D0F240054728C /* SessionViewController.h */, 03CD36EB120D0F240054728C /* SessionViewController.m */, - 0341222B12148A3400B376F7 /* SessionDetailViewController.h */, 0341222C12148A3400B376F7 /* SessionDetailViewController.m */, 0341222D12148A3400B376F7 /* SessionDetailViewController.xib */, 03FE5A74122C77900054B9ED /* MyStyledTextLabel.h */, 03FE5A75122C77900054B9ED /* MyStyledTextLabel.m */, - 03FE5A90122C79DA0054B9ED /* SessionDetailWebView.h */, - 03FE5A91122C79DA0054B9ED /* SessionDetailWebView.m */, - 03FE5A92122C79DA0054B9ED /* SessionDetailWebView.xib */, 809FDB22122EDD7400528305 /* TwitterFeedTableViewController.h */, 809FDB23122EDD7400528305 /* TwitterFeedTableViewController.m */, 809FDB24122EDD7400528305 /* TwitterFeedTableView.xib */, @@ -893,7 +881,6 @@ 030894981226F2DB0088A584 /* RegistrantDetailView.xib in Resources */, FBF7E8231227E55000B7A710 /* keynote-icon.png in Resources */, FBF7E8241227E55000B7A710 /* keynote-icon@2x.png in Resources */, - 03FE5A94122C79DA0054B9ED /* SessionDetailWebView.xib in Resources */, 809FDB21122EDD2B00528305 /* bird.png in Resources */, 809FDB26122EDD7400528305 /* TwitterFeedTableView.xib in Resources */, 809FDBD9122EF15E00528305 /* TwitterFeedTableViewCell.xib in Resources */, @@ -925,7 +912,6 @@ 030894991226F2DB0088A584 /* RegistrantDetailViewController.m in Sources */, 030894A31226F4100088A584 /* PresenterListViewController.m in Sources */, 03FE5A76122C77900054B9ED /* MyStyledTextLabel.m in Sources */, - 03FE5A93122C79DA0054B9ED /* SessionDetailWebView.m in Sources */, 809FDB25122EDD7400528305 /* TwitterFeedTableViewController.m in Sources */, 809FDCC4122F074600528305 /* NSString+XMLEntities.m in Sources */, );