From e993e7ba4e1107a875afeec33292b9d01c52035b Mon Sep 17 00:00:00 2001 From: matt handler Date: Sat, 30 Apr 2011 09:25:32 -0400 Subject: 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 gay --- Classes/PicCastAppDelegate.m | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'Classes/PicCastAppDelegate.m') 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 +// 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 -- cgit v1.2.3