#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
#import "AppDelegate.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
- (void)dealloc{
[_window release];
[super dealloc];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
UILabel *userNameLabel = [[UILabel alloc] initWithFrame:(CGRectMake(50, 50, 120, 50))];
userNameLabel.text = @"用户名 long long ago";
userNameLabel.textColor = [UIColor redColor];
userNameLabel.font = [UIFont systemFontOfSize:18];
userNameLabel.lineBreakMode = NSLineBreakByCharWrapping;
userNameLabel.numberOfLines = 0;
userNameLabel.shadowColor = [UIColor purpleColor];
userNameLabel.shadowOffset = CGSizeMake(2, 2);
[self.window addSubview:userNameLabel];
[userNameLabel release];
return YES;
}
@end