diff options
Diffstat (limited to 'Classes/TopicsViewController.m')
-rw-r--r-- | Classes/TopicsViewController.m | 91 |
1 files changed, 41 insertions, 50 deletions
diff --git a/Classes/TopicsViewController.m b/Classes/TopicsViewController.m index 1d93566..78258d7 100644 --- a/Classes/TopicsViewController.m +++ b/Classes/TopicsViewController.m @@ -31,18 +31,9 @@ [super viewDidLoad]; NSLog(@"viewDidLoad"); self.tableView.rowHeight = 100; - //UIBarButtonItem *doneItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(returnToParserChoices)] autorelease]; - //self.navigationItem.rightBarButtonItem = doneItem; - // Create the object manager objMan = [[HJObjManager alloc] initWithLoadingBufferSize:6 memCacheSize:20]; - //if you are using for full screen images, you'll need a smaller memory cache than the defaults, - //otherwise the cached images will get you out of memory quickly - //objMan = [[HJObjManager alloc] initWithLoadingBufferSize:6 memCacheSize:1]; - - // Create a file cache for the object manager to use - // A real app might do this durring startup, allowing the object manager and cache to be shared by several screens NSString* cacheDirectory = [NSHomeDirectory() stringByAppendingString:@"/Library/Caches/imgcache/icons/"] ; HJMOFileCache* fileCache = [[[HJMOFileCache alloc] initWithRootPath:cacheDirectory] autorelease]; objMan.fileCache = fileCache; @@ -67,7 +58,7 @@ - (void) getTopicsFromDb { // grab topics [db open]; - FMResultSet *fResult = [db executeQuery:@"SELECT * FROM picCasts"]; //order by date, limite _max + FMResultSet *fResult = [db executeQuery:@"SELECT * FROM picCasts ORDER BY releaseDate DESC"]; //order by date, limite _max // put into sections while([fResult next]) @@ -116,46 +107,6 @@ } #pragma mark - -#pragma mark View lifecycle - -/* -- (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)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); -} -*/ - -#pragma mark - #pragma mark custom sheeyit - (void) addTopicsFromJson:(NSData *)data { @@ -352,6 +303,46 @@ } +#pragma mark - +#pragma mark View lifecycle + +/* + - (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)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); + } + */ + #pragma mark <iTunesRSSParserDelegate> Implementation - (void)startParsing { |