Created
December 13, 2009 07:50
-
-
Save shayne/255335 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
int main(int argc, char *argv[]) { | |
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; | |
int retVal = UIApplicationMain(argc, argv, nil, @"RoundedCornerTestAppDelegate"); | |
[pool release]; | |
return retVal; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
@interface RoundedCornerTestAppDelegate : NSObject <UIApplicationDelegate> { | |
UIWindow *window_; | |
} | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "RoundedCornerTestAppDelegate.h" | |
#import <QuartzCore/QuartzCore.h> | |
@implementation RoundedCornerTestAppDelegate | |
- (void)applicationDidFinishLaunching:(UIApplication *)application { | |
window_ = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; | |
UINavigationBar *navBar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, 20, 320, 42)]; | |
[window_ addSubview:navBar]; | |
UIView *tab = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 75, 40)] autorelease]; | |
tab.backgroundColor = [UIColor colorWithRed:228.0/255.0 | |
green:230.0/255.0 | |
blue:235.0/255.0 | |
alpha:1]; | |
tab.layer.cornerRadius = 5; | |
UIView *tabContainer = [[[UIView alloc] initWithFrame:CGRectMake(0, 5, 75, 35)] autorelease]; | |
tabContainer.clipsToBounds = YES; | |
[tabContainer addSubview:tab]; | |
[navBar addSubview:tabContainer]; | |
[window_ makeKeyAndVisible]; | |
} | |
- (void)dealloc { | |
[window_ release]; | |
[super dealloc]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment