diff options
author | matt handler <matt.handler@gmail.com> | 2011-04-30 09:25:32 -0400 |
---|---|---|
committer | matt handler <matt.handler@gmail.com> | 2011-04-30 09:25:32 -0400 |
commit | e993e7ba4e1107a875afeec33292b9d01c52035b (patch) | |
tree | 059ff9c8032b1a6a0dc18781e8eb388f9a8ea58f /Classes/PicCastAppDelegate.m | |
parent | 869398ebfb18702b9de42f723ff8072b116eb04f (diff) | |
download | piccast-app-master.tar.gz piccast-app-master.zip |
added loading animation, piccast color title, navigation controllers for browse and search, uicolor orange and yellow, custom headers for search view, redid loading screen, fixed backgroundGradient, background white for topic table, etc etc etc gayHEADmaster
Diffstat (limited to 'Classes/PicCastAppDelegate.m')
-rw-r--r-- | Classes/PicCastAppDelegate.m | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Classes/PicCastAppDelegate.m b/Classes/PicCastAppDelegate.m index 3da5a07..854e3c7 100644 --- a/Classes/PicCastAppDelegate.m +++ b/Classes/PicCastAppDelegate.m @@ -9,6 +9,17 @@ #import "PicCastAppDelegate.h" #import <Three20Network/TTURLRequestQueue.h> +// monkey patches! what a racist term :'(, smh lol + +@implementation UIColor (PicCastColors) +-(void) orangeColor { + return [UIColor colorWithRed:1.0 green:143/255.0 blue:0.0 alpha:1.0]; +} + +-(void) yellowColor { + return [UIColor colorWithRed:209/255.0 green:231/255.0 blue:0.0 alpha:1.0]; +} +@end @implementation UINavigationBar (CustomImage) - (void)drawRect:(CGRect)rect { @@ -23,6 +34,37 @@ } //[super drawRect:rect]; } +- (void)drawLogo { + NSLog(@"logo"); + UIImageView *iv = [[[UIImageView alloc] initWithImage:[UIImage imageNamed: @"titleLogo.png"]] retain]; + [iv setFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; + [self addSubview:iv]; + [iv release]; +} +- (void)animateLoading { + UIImageView* animatedImageView = [[UIImageView alloc] initWithFrame:CGRectMake(6, 6, 32, 32)]; + + animatedImageView.animationImages = [NSArray arrayWithObjects: + [UIImage imageNamed:@"loading.1.png"], + [UIImage imageNamed:@"loading.2.png"], + [UIImage imageNamed:@"loading.3.png"], + [UIImage imageNamed:@"loading.4.png"], + nil]; + + animatedImageView.animationDuration = 0.25; + animatedImageView.animationRepeatCount = 0; + //add quartz core? + //animatedImageView.layer.opacity = 0.5; + + [self addSubview:animatedImageView]; + [animatedImageView startAnimating]; +} +- (void)stopLoadingAnimation { + for (id obj in [self subviews]) { + if ([obj isKindOfClass:[UIImageView class]] && [(UIImageView *)obj animationDuration] == 0.25) + [obj removeFromSuperview]; + } +} @end @implementation PicCastAppDelegate |