Permalink
Browse files

Hello World!

  • Loading branch information...
0 parents commit 2a48a4bdd2f039879815a0ef2ead601c8bf9265e Evadne Wu committed Jun 21, 2010
@@ -0,0 +1,75 @@
+# Finder
+
+.DS_Store
+
+
+
+
+
+# Sparkle
+
+dsa_priv.pem
+
+
+
+
+
+# Xcode Config
+
+*.mode1
+*.mode1v3
+*.mode2v3
+*.perspective
+*.perspectivev3
+*.pbxuser
+
+
+
+
+
+# Generated files
+
+VersionX-revision.h
+
+
+
+
+
+# Builds
+
+build/
+Build/
+*.[oa]
+
+
+
+
+
+# Other SCMs
+
+.hg
+.svn
+CVS
+
+
+
+
+
+# Backups
+
+*~.nib
+*.swp
+*~
+*(Autosaved).rtfd/
+
+Backup[ ]of[ ]*.pages/
+Backup[ ]of[ ]*.key/
+Backup[ ]of[ ]*.numbers/
+
+
+
+
+
+# Time Machine
+
+*.timemachine.supported
@@ -0,0 +1,3 @@
+[submodule "Dependencies/CGGeometry-IRFittingAdditions"]
+ path = Dependencies/CGGeometry-IRFittingAdditions
+ url = git://github.com/iridia/CGGeometry-IRFittingAdditions.git
@@ -0,0 +1,41 @@
+//
+// IRInnerShadowedView.h
+// iridia-IRInnerShadowedView
+//
+// Created by Evadne Wu on 6/21/10.
+// Copyright 2010 Iridia Productions. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import <QuartzCore/QuartzCore.h>
+#import "CGGeometry+IRFittingAdditions.h"
+
+
+
+
+
+@interface IRInnerShadowedView : UIView {
+
+ CGFloat irShadowSpread;
+ CGSize irShadowOffset;
+ UIColor *irShadowColor;
+
+}
+
+
+
+
+
+@property (assign) CGFloat irShadowSpread;
+@property (assign) CGSize irShadowOffset;
+@property (retain) UIColor *irShadowColor;
+
+
+
+
+
+@end
+
+
+
+
@@ -0,0 +1,92 @@
+//
+// IRInnerShadowedView.m
+// iridia-IRInnerShadowedView
+//
+// Created by Evadne Wu on 6/21/10.
+// Copyright 2010 Iridia Productions. All rights reserved.
+//
+
+
+
+
+
+#import "IRInnerShadowedView.h"
+
+
+
+
+
+@implementation IRInnerShadowedView
+@synthesize irShadowSpread, irShadowOffset, irShadowColor;
+
+
+
+
+
+- (IRInnerShadowedView *) initWithFrame:(CGRect)frame {
+
+ IRInnerShadowedView *theView = [super initWithFrame:frame];
+ if (theView == nil) return nil;
+
+ theView.irShadowColor = nil;
+ theView.irShadowOffset = CGSizeZero;
+ theView.irShadowSpread = 0.0f;
+
+ return theView;
+
+}
+
+
+
+
+
+- (void) drawRect:(CGRect)rect {
+
+ if (self.irShadowSpread == 0) return;
+ if (self.irShadowColor == nil) return;
+
+ CGContextRef context = UIGraphicsGetCurrentContext();
+ CGContextSaveGState(context);
+
+ CGPathRef offsetPathRef = [UIBezierPath bezierPathWithRoundedRect:CGRectInset(
+
+ IRCGRectMoveToPoint(self.frame, CGPointZero),
+ (-0.5 * self.irShadowSpread),
+ (-0.5 * self.irShadowSpread)
+
+ ) cornerRadius:(self.layer.cornerRadius * sqrt(1.5))].CGPath;
+
+ CGContextSetStrokeColorWithColor(context, self.irShadowColor.CGColor);
+ CGContextSetShadowWithColor(context, CGSizeZero, self.irShadowSpread, self.irShadowColor.CGColor);
+ CGContextSetLineWidth(context, self.irShadowSpread);
+
+ CGContextAddPath(context, offsetPathRef);
+ CGContextStrokePath(context);
+
+ CGContextAddPath(context, offsetPathRef);
+ CGContextStrokePath(context);
+
+ CGContextRestoreGState(context);
+
+}
+
+
+
+
+
+- (void) dealloc {
+
+ [self.irShadowColor release];
+ [super dealloc];
+
+}
+
+
+
+
+
+@end
+
+
+
+
@@ -0,0 +1,34 @@
+//
+// iridia_IRInnerShadowedViewAppDelegate.h
+// iridia-IRInnerShadowedView
+//
+// Created by Evadne Wu on 6/21/10.
+// Copyright Iridia Productions 2010. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import <QuartzCore/QuartzCore.h>
+
+#import "IRInnerShadowedView.h"
+
+
+
+
+
+@interface IRInnerShadowedViewApplicationDelegate : NSObject <UIApplicationDelegate> {
+
+ UIWindow *window;
+
+}
+
+@property (nonatomic, retain) IBOutlet UIWindow *window;
+
+
+
+
+
+@end
+
+
+
+
@@ -0,0 +1,98 @@
+//
+// iridia_IRInnerShadowedViewAppDelegate.m
+// iridia-IRInnerShadowedView
+//
+// Created by Evadne Wu on 6/21/10.
+// Copyright Iridia Productions 2010. All rights reserved.
+//
+
+#import "IRInnerShadowedViewApplicationDelegate.h"
+
+
+
+
+
+@implementation IRInnerShadowedViewApplicationDelegate
+
+@synthesize window;
+
+
+#pragma mark -
+#pragma mark Application lifecycle
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+
+ // Override point for customization after application launch.
+
+ [window makeKeyAndVisible];
+
+ IRInnerShadowedView *testView = [[[IRInnerShadowedView alloc] initWithFrame:CGRectInset(window.frame, 64, 64)] autorelease];
+
+ testView.backgroundColor = [UIColor redColor];
+ testView.layer.cornerRadius = 12.0f;
+ testView.layer.masksToBounds = YES;
+ testView.irShadowColor = [UIColor colorWithWhite:0.0f alpha:0.75f];
+ testView.irShadowSpread = 8.0f;
+
+ [window addSubview:testView];
+
+ return YES;
+
+}
+
+
+- (void)applicationWillResignActive:(UIApplication *)application {
+ /*
+ Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+ */
+}
+
+
+- (void)applicationDidEnterBackground:(UIApplication *)application {
+ /*
+ Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
+ */
+}
+
+
+- (void)applicationWillEnterForeground:(UIApplication *)application {
+ /*
+ Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
+ */
+}
+
+
+- (void)applicationDidBecomeActive:(UIApplication *)application {
+ /*
+ Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+ */
+}
+
+
+- (void)applicationWillTerminate:(UIApplication *)application {
+ /*
+ Called when the application is about to terminate.
+ See also applicationDidEnterBackground:.
+ */
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+
+- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
+ /*
+ Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
+ */
+}
+
+
+- (void)dealloc {
+ [window release];
+ [super dealloc];
+}
+
+
+@end
Oops, something went wrong.

0 comments on commit 2a48a4b

Please sign in to comment.