Permalink
Browse files

ignoring build, added basic view, as much as analyzing view - no trac…

…k selection yet
  • Loading branch information...
George Cook
George Cook committed Jul 11, 2009
1 parent 9243721 commit 731767fd55e6fcab7aa145485082b02a91abb4af
Showing with 1,954 additions and 285 deletions.
  1. +387 −0 AnalyzingViewController.xib
  2. +16 −0 Classes/AnalyzingViewController.h
  3. +29 −0 Classes/AnalyzingViewController.m
  4. +6 −0 Classes/RootViewController.h
  5. +65 −118 Classes/RootViewController.m
  6. +350 −35 RootViewController.xib
  7. +676 −0 attachDemo.xib
  8. BIN build/Debug-iphonesimulator/musichackday.app.dSYM/Contents/Resources/DWARF/musichackday
  9. BIN build/Debug-iphonesimulator/musichackday.app/AnalyzingViewController.nib
  10. BIN build/Debug-iphonesimulator/musichackday.app/RootViewController.nib
  11. BIN build/Debug-iphonesimulator/musichackday.app/attachDemo.nib
  12. BIN build/Debug-iphonesimulator/musichackday.app/musichackday
  13. BIN ...kDay.build/Debug-iphonesimulator/musichackday.build/Objects-normal/i386/AnalyzingViewController.o
  14. BIN ...icHackDay.build/Debug-iphonesimulator/musichackday.build/Objects-normal/i386/RootViewController.o
  15. +1 −0 ...kDay.build/Debug-iphonesimulator/musichackday.build/Objects-normal/i386/musichackday.LinkFileList
  16. +108 −42 build/MusicHackDay.build/Debug-iphonesimulator/musichackday.build/build-state.dat
  17. BIN build/MusicHackDay.build/Debug-iphonesimulator/musichackday.build/musichackday-project-headers.hmap
  18. +8 −5 build/MusicHackDay.build/Debug-iphonesimulator/musichackday.build/musichackday.dep
  19. BIN build/MusicHackDay.build/Debug-iphonesimulator/musichackday.build/musichackday.hmap
  20. BIN build/MusicHackDay.build/musichackday.pbxindex/categories.pbxbtree
  21. BIN build/MusicHackDay.build/musichackday.pbxindex/cdecls.pbxbtree
  22. BIN build/MusicHackDay.build/musichackday.pbxindex/decls.pbxbtree
  23. BIN build/MusicHackDay.build/musichackday.pbxindex/files.pbxbtree
  24. BIN build/MusicHackDay.build/musichackday.pbxindex/imports.pbxbtree
  25. BIN build/MusicHackDay.build/musichackday.pbxindex/pbxindex.header
  26. BIN build/MusicHackDay.build/musichackday.pbxindex/protocols.pbxbtree
  27. BIN build/MusicHackDay.build/musichackday.pbxindex/refs.pbxbtree
  28. BIN build/MusicHackDay.build/musichackday.pbxindex/strings.pbxstrings/control
  29. BIN build/MusicHackDay.build/musichackday.pbxindex/strings.pbxstrings/strings
  30. BIN build/MusicHackDay.build/musichackday.pbxindex/subclasses.pbxbtree
  31. BIN build/MusicHackDay.build/musichackday.pbxindex/symbols0.pbxsymbols
  32. +82 −55 musichackday.xcodeproj/georgecook.mode1v3
  33. +212 −30 musichackday.xcodeproj/georgecook.pbxuser
  34. +14 −0 musichackday.xcodeproj/project.pbxproj
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,16 @@
+//
+// AnalyzingViewController.h
+// musichackday
+//
+// Created by George Cook on 11/07/2009.
+// Copyright 2009 __MyCompanyName__. All rights reserved.
+//
+
+
+#import <UIKit/UIKit.h>
+
+@interface AnalyzingViewController : UIViewController
+{
+}
+
+@end
@@ -0,0 +1,29 @@
+//
+// AnalyzingViewController.m
+// musichackday
+//
+// Created by George Cook on 11/07/2009.
+// Copyright 2009 __MyCompanyName__. All rights reserved.
+//
+
+#import "AnalyzingViewController.h"
+
+
+@implementation AnalyzingViewController
+
+- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
+{
+ if (!(self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]))
+ return nil;
+
+ self.title = @"Analyzin...";
+
+ return self;
+}
+
+- (void)viewDidLoad
+{
+ //TODO - add code to move to next view when analyzed
+}
+
+@end
@@ -6,7 +6,13 @@
// Copyright __MyCompanyName__ 2009. All rights reserved.
//
+#import "AnalyzingViewController.h"
+
@interface RootViewController : UITableViewController {
+ NSMutableArray *trackList;
+ AnalyzingViewController *analyzingViewController;
}
+@property (nonatomic, retain) NSMutableArray *trackList;
+@property (nonatomic, retain) AnalyzingViewController *analyzingViewController;
@end
@@ -10,144 +10,91 @@
@implementation RootViewController
+@synthesize trackList, analyzingViewController;
+static NSArray *trackNames = nil;
-/*
-- (void)viewDidLoad {
- [super viewDidLoad];
-
- // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
- // self.navigationItem.rightBarButtonItem = self.editButtonItem;
+- (void)dealloc{
+ [trackList release];
+ [analyzingViewController release];
+ [super dealloc];
}
-*/
-/*
-- (void)viewWillAppear:(BOOL)animated {
- [super viewWillAppear:animated];
-}
-*/
-/*
-- (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);
-}
- */
-
-- (void)didReceiveMemoryWarning {
- // Releases the view if it doesn't have a superview.
- [super didReceiveMemoryWarning];
+- (void)viewDidLoad
+{
+ // Make the title of this page the same as the title of this app
+ self.title = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
+
+ self.trackList = [NSMutableArray array];
+ if (!trackNames)
+ {
+ trackNames = [[NSArray alloc] initWithObjects:@"track one", @"track two", @"track three", nil];
+ }
+
+ for (NSString *trackName in trackNames)
+ {
+ [self.trackList addObject:trackName];
+ }
+ [self.tableView reloadData];
- // Release any cached data, images, etc that aren't in use.
}
-- (void)viewDidUnload {
- // Release anything that can be recreated in viewDidLoad or on demand.
- // e.g. self.myOutlet = nil;
+- (void)viewDidUnload
+{
+ self.tableView = nil;
+ self.trackList = nil;
}
-
#pragma mark Table view methods
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
-
-// Customize the number of rows in the table view.
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- return 0;
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
+{
+ return trackList.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:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+ static NSString *kCellIdentifier = @"cellID";
+
+ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellIdentifier];
+ if (!cell)
+ {
+ cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kCellIdentifier] autorelease];
+
+ cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+
+ cell.textLabel.backgroundColor = [UIColor clearColor];
+ cell.textLabel.opaque = NO;
+ cell.textLabel.textColor = [UIColor blackColor];
+ cell.textLabel.highlightedTextColor = [UIColor whiteColor];
+ cell.textLabel.font = [UIFont boldSystemFontOfSize:18];
+
+ cell.detailTextLabel.backgroundColor = [UIColor clearColor];
+ cell.detailTextLabel.opaque = NO;
+ cell.detailTextLabel.textColor = [UIColor grayColor];
+ cell.detailTextLabel.highlightedTextColor = [UIColor whiteColor];
+ cell.detailTextLabel.font = [UIFont systemFontOfSize:14];
}
-
- // Configure the cell.
-
- return cell;
-}
-
-
-
-/*
-// Override to support row selection in the table view.
-- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-
- // Navigation logic may go here -- for example, create and push another view controller.
- // AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil];
- // [self.navigationController pushViewController:anotherViewController animated:YES];
- // [anotherViewController release];
-}
-*/
-
-
-/*
-// 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:UITableViewRowAnimationFade];
- }
- 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;
-}
-*/
-
-
-- (void)dealloc {
- [super dealloc];
+ cell.textLabel.text = [trackList objectAtIndex:indexPath.row];
+ return cell;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
+{
+ //NSMutableDictionary *rowData = [self.trackList objectAtIndex:indexPath.row];
+ //TODO - wire up the current playing track
+ if (!self.analyzingViewController)
+ {
+ self.analyzingViewController = [[AnalyzingViewController alloc]
+ initWithNibName:@"AnalyzingViewController" bundle:nil];
+ }
+ [self.navigationController pushViewController:analyzingViewController animated:YES];
}
-
@end
Oops, something went wrong.

0 comments on commit 731767f

Please sign in to comment.