UI
来源:互联网 发布:ios仿新浪微博源码 编辑:程序博客网 时间:2024/04/29 03:48
// AppDelegate.h
// 729 作业 登陆界面
//
// Created by dllo on 15/7/29.
// Copyright (c) 2015年 flg. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
//
// AppDelegate.m
// 729 作业 登陆界面
//
// Created by dllo on 15/7/29.
// Copyright (c) 2015年 flg. All rights reserved.
//
#import "AppDelegate.h"
@interface AppDelegate ()
@property(nonatomic,strong)NSString *placeholder;
@end
@implementation AppDelegate
-(void)dealloc{
[_window release];
[super dealloc];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
[_window release];
UILabel *label=[[UILabel alloc] initWithFrame:CGRectMake(50, 100, 60, 30)];
label.backgroundColor=[UIColor whiteColor];
[self.window addSubview:label];
[label release];
label.text=@"用户名";
label.numberOfLines = 0;
UITextField *view=[[ UITextField alloc] initWithFrame:CGRectMake(150, 100, 200, 30)];
view.backgroundColor=[UIColor whiteColor];
[self.window addSubview:view];
[view release];
view.textColor=[UIColor lightGrayColor];
view.layer.cornerRadius=8;
view.layer.masksToBounds=YES;
view.layer.borderWidth=1;
view.layer.borderColor=[UIColor lightGrayColor].CGColor;
//view.text=@"请输入用户名";
view.placeholder=@"请输入用户名";
//view.alpha=0.5;
view.font=[UIFont systemFontOfSize:16];
UILabel *lable1=[[UILabel alloc] initWithFrame:CGRectMake(50, 150, 60, 30)];
lable1.backgroundColor=[UIColor whiteColor];
[self.window addSubview:lable1];
[lable1 release];
lable1.text=@"密码";
UITextField *view1=[[ UITextField alloc] initWithFrame:CGRectMake(150, 150, 200, 30)];
view1.backgroundColor=[UIColor whiteColor];
[self.window addSubview:view1];
[view1 release];
view1.textColor=[UIColor lightGrayColor];
view1.layer.cornerRadius=8;
view1.layer.masksToBounds=YES;
view1.layer.borderWidth=1;
view1.layer.borderColor=[UIColor lightGrayColor].CGColor;
//view1.text=@"请输入密码";
view1.placeholder=@"请输入密码";
//view1.alpha=0.5;
view1.font=[UIFont systemFontOfSize:16];
UILabel *lable2=[[UILabel alloc] initWithFrame:CGRectMake(50, 200, 80, 30)];
lable2.backgroundColor=[UIColor whiteColor];
[self.window addSubview:lable2];
[lable2 release];
lable2.text=@"确认密码";
UITextField *view2=[[ UITextField alloc] initWithFrame:CGRectMake(150, 200, 200, 30)];
view2.backgroundColor=[UIColor whiteColor];
[self.window addSubview:view2];
[view2 release];
view2.textColor=[UIColor lightGrayColor];
view2.layer.cornerRadius=8;
view2.layer.masksToBounds=YES;
view2.layer.borderWidth=1;
view2.layer.borderColor=[UIColor lightGrayColor].CGColor;
//view2.text=@"再次输入密码";
view2.placeholder=@"再次输入密码";
//view2.alpha=0.5;
view2.font=[UIFont systemFontOfSize:16];
UILabel *lable3=[[UILabel alloc] initWithFrame:CGRectMake(50, 250, 80, 30)];
lable3.backgroundColor=[UIColor whiteColor];
[self.window addSubview:lable3];
[lable3 release];
lable3.text=@"手机号";
UITextField *view3=[[ UITextField alloc] initWithFrame:CGRectMake(150, 250, 200, 30)];
view3.backgroundColor=[UIColor whiteColor];
[self.window addSubview:view3];
[view3 release];
view3.textColor=[UIColor lightGrayColor];
view3.layer.cornerRadius=8;
view3.layer.masksToBounds=YES;
view3.layer.borderWidth=1;
view3.layer.borderColor=[UIColor lightGrayColor].CGColor;
//view3.text=@"请输入联系方式";
view3.placeholder=@"请输入联系方式";
//view3.alpha=0.5;
view3.font=[UIFont systemFontOfSize:16];
UILabel *lable4=[[UILabel alloc] initWithFrame:CGRectMake(50, 300, 80, 30)];
lable4.backgroundColor=[UIColor whiteColor];
[self.window addSubview:lable4];
[lable4 release];
lable4.text=@"邮箱";
UITextField *view4=[[ UITextField alloc] initWithFrame:CGRectMake(150, 300, 200, 30)];
view4.backgroundColor=[UIColor whiteColor];
[self.window addSubview:view4];
[view4 release];
view4.textColor=[UIColor lightGrayColor];
view4.layer.cornerRadius=8;
view4.layer.masksToBounds=YES;
view4.layer.borderWidth=1;
view4.layer.borderColor=[UIColor lightGrayColor].CGColor;
//view4.text=@"请输入邮箱";
view4.placeholder=@"请输入邮箱";
//view4.alpha=0.5;
view4.font=[UIFont systemFontOfSize:16];
UIButton *button=[UIButton buttonWithType:UIButtonTypeSystem];
//button.backgroundColor=[UIColor whiteColor];
button.frame=CGRectMake(80, 400, 80, 30);
[button setTitle:@"注册" forState:UIControlStateNormal];
[self.window addSubview:button];
UIButton *button1=[UIButton buttonWithType:UIButtonTypeSystem];
button1.frame=CGRectMake(200, 400, 80, 30);
[button1 setTitle:@"取消" forState:UIControlStateNormal];
[self.window addSubview:button1];
[button addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
[button1 addTarget:self action:@selector(click1:) forControlEvents:UIControlEventTouchUpInside];
return YES;
}
- (void)click:(UIButton *)button{
NSLog(@"点击注册");
}
- (void)click1:(UIButton *)button1{
NSLog(@"点击取消");
}
- (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, this method is called instead of applicationWillTerminate: when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
// Called as part of the 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. Save data if appropriate. See also applicationDidEnterBackground:.
}
@end
- UI
- UI
- UI
- UI
- ui
- UI
- UI
- ui
- ui
- ui
- Ui
- UI
- ui
- UI
- UI
- Ui
- UI
- UI
- UIViewController视图控制器(移动self.view,随机颜色)
- UI01_UILabel
- java中数组与泛型的自我理解
- Oracle数据库导入导出命令总结
- a*b(mod m)的实现过程
- UI
- [leetcode]Merge Two Sorted Lists
- Keil MDK5.15使用Jlink下载时出现Jlink clone版无法使用
- UI02_UIButton
- hihoCoder 1070 RMQ问题再临
- 面试总结
- 开源 java CMS - FreeCMS2.3会员我的投稿
- Mac 下连接PPTP的VPN,一连上就断开
- if(!+"\v1"){IE代码}else{其他浏览器代码} 判断浏览器类型