summaryrefslogtreecommitdiffstats
path: root/Classes
diff options
context:
space:
mode:
authormatt handler <matt.handler@gmail.com>2011-04-21 19:54:47 -0400
committermatt handler <matt.handler@gmail.com>2011-04-21 19:54:47 -0400
commit901729c7eefcc10f27f306fff6170e80fa653ebe (patch)
treef963e0c1d54f7895066ae6c33e59f5b250c88703 /Classes
parent64e9e2e8d01ec34e5d7a2c1cb11d3780408403c4 (diff)
downloadpiccast-app-901729c7eefcc10f27f306fff6170e80fa653ebe.tar.gz
piccast-app-901729c7eefcc10f27f306fff6170e80fa653ebe.zip
lots of display images, titlebars are badass, defaultstyle changing the button though
Diffstat (limited to 'Classes')
-rw-r--r--Classes/PhotoViewController.m4
-rw-r--r--Classes/TopicsViewController.h3
-rw-r--r--Classes/TopicsViewController.m23
3 files changed, 17 insertions, 13 deletions
diff --git a/Classes/PhotoViewController.m b/Classes/PhotoViewController.m
index fb8931b..5a34670 100644
--- a/Classes/PhotoViewController.m
+++ b/Classes/PhotoViewController.m
@@ -23,8 +23,8 @@
}
- (void)viewWillDisappear:(BOOL)animated {
- //self.navigationController.navigationBar.barStyle = UIBarStyleDefault;
- self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:24/255.0 green:45/255.0 blue:64/255.0 alpha:1.0];
+ self.navigationController.navigationBar.barStyle = UIBarStyleDefault;
+ //self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:24/255.0 green:45/255.0 blue:64/255.0 alpha:1.0];
}
- (void)setPhotoList:(NSArray *)list {
diff --git a/Classes/TopicsViewController.h b/Classes/TopicsViewController.h
index 631a5d0..fac4e7d 100644
--- a/Classes/TopicsViewController.h
+++ b/Classes/TopicsViewController.h
@@ -13,7 +13,7 @@
#import "SourcesEditViewController.h"
#import "PhotoViewController.h"
-@interface TopicsViewController : UITableViewController <XMLParserDelegate, SourcesEditViewControllerDelegate>{
+@interface TopicsViewController : UIViewController <XMLParserDelegate, SourcesEditViewControllerDelegate, UITableViewDataSource>{
UINavigationController *topicsNavigationController;
NSMutableArray *topics;
// PicDumpViewController *picDumpViewController;
@@ -24,6 +24,7 @@
- (IBAction)showSources:(id)sender;
+@property (nonatomic, retain) IBOutlet UITableView *tableView;
@property (nonatomic, retain, readonly) UINavigationController *topicsNavigationController;
@property (nonatomic, retain) PhotoViewController *photoViewController;
@property (nonatomic, retain) NSMutableArray *topics;
diff --git a/Classes/TopicsViewController.m b/Classes/TopicsViewController.m
index 9969962..aa9ab85 100644
--- a/Classes/TopicsViewController.m
+++ b/Classes/TopicsViewController.m
@@ -20,19 +20,22 @@
@implementation UINavigationBar (CustomImage)
- (void)drawRect:(CGRect)rect {
-// NSLog(@"titlebar");
-// if (self.barStyle == UIBarStyleDefault) {
+ //NSLog(@"titlebar: %@", self.barStyle);
+ if (self.barStyle == UIBarStyleDefault) {
UIImage *image = [UIImage imageNamed: @"titleBarBackground.png"];
[image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
-// }
-// else
+ }
+ else {
+ UIImage *image = [UIImage imageNamed: @"titleBarBackgroundBlack.png"];
+ [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
+ }
//[super drawRect:rect];
}
@end
@implementation TopicsViewController
-@synthesize topics, parser;
+@synthesize topics, parser, tableView;
- (void)viewDidLoad {
[super viewDidLoad];
@@ -81,6 +84,11 @@
// return picDumpViewController;
//}
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+ // Return the number of rows in the section.
+ return [topics count];
+}
+
- (void) sourcesEditViewControllerDidFinish:(SourcesEditViewController *)controller {
[self dismissModalViewControllerAnimated:YES];
@@ -136,11 +144,6 @@
[parser start];
}
-
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- return [topics count];
-}
-
//- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
//{
// return 100;