登陆页面 注册页面 密码找回页面
登陆页面:
//1.创建视图, 给出其位置和大小
UIView *signinView = [[UIView alloc] initWithFrame:CGRectMake(80, 130, 235, 40)];
//2.设置视图属性
//颜色
signinView.backgroundColor = [UIColor blueColor];
signinView.alpha = 1;
//3.添加到window上
[self.window addSubview:signinView];
//4.释放视图
[signinView release];
UIView *signinView1 = [[UIView alloc] initWithFrame:CGRectMake(80, 200, 90, 40)];
signinView1.backgroundColor = [UIColor greenColor];
signinView1.alpha = 1;
[self.window addSubview:signinView1];
[signinView1 release];
UIView *signView2 = [[UIView alloc] initWithFrame:CGRectMake(225, 200, 90, 40)];
signView2.backgroundColor = [UIColor greenColor];
signView2.alpha = 1;
[self.window addSubview:signView2];
[signView2 release];
注册页面:
CGFloat y = 90;
for (NSInteger i = 0; i < 6; i++) {
//六个红
UIView *redView = [[UIView alloc] initWithFrame:CGRectMake(60, y + 70 * i, 51, 40)];
redView.backgroundColor = [UIColor redColor];
redView.alpha = 1;
[self.window addSubview:redView];
[redView release];
//六个蓝
UIView *blueView = [[UIView alloc] initWithFrame:CGRectMake(152, y + 70 * i, 163, 40)];
blueView.backgroundColor = [UIColor blueColor];
blueView.alpha = 1;
[self.window addSubview:blueView];
[blueView release];
}
CGFloat x = 60;
for (NSInteger i = 0; i < 2; i++) {
//两个黄
UIView *yellowView = [[UIView alloc] initWithFrame:CGRectMake(x + 158 * i, 540, 97, 40)];
yellowView.backgroundColor = [UIColor yellowColor];
yellowView.alpha = 1;
[self.window addSubview:yellowView];
[yellowView release];
}
密码找回页面:
CGFloat y = 100;
for (NSInteger i = 0; i < 2; i++) {
UIView *redView = [[UIView alloc] initWithFrame:CGRectMake(60, y + 70 * i, 71, 40)];
redView.backgroundColor = [UIColor redColor];
redView.alpha = 1;
[self.window addSubview:redView];
[redView release];
UIView *blueView = [[UIView alloc] initWithFrame:CGRectMake(161, y + 70 * i, 154, 40)];
blueView.backgroundColor = [UIColor blueColor];
blueView.alpha = 1;
[self.window addSubview:blueView];
[blueView release];
}
CGFloat x = 60;
for (NSInteger i = 0; i < 3; i++) {
UIView *greenView = [[UIView alloc] initWithFrame:CGRectMake(x + 96 * i,300, 63, 40)];
greenView.backgroundColor = [UIColor greenColor];
greenView.alpha = 1;
[self.window addSubview:greenView];
[greenView release];
}