summaryrefslogtreecommitdiffstats
path: root/Classes/PicCastAppDelegate.m
diff options
context:
space:
mode:
Diffstat (limited to 'Classes/PicCastAppDelegate.m')
-rw-r--r--Classes/PicCastAppDelegate.m42
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