iOS UI 01 课堂笔记 -设计模式
2015-12-13 15:40
417 查看
主要是mvc 模式
但此处没有涉及到数据, 只是铺键视图和vc 掌握即可
//
// RootViewController.m
// ui2 _设计模式
//
// Created by dllo on 15/11/9.
// Copyright (c) 2015年 dllo. All rights reserved.
//
#import "RootViewController.h"
#import "LTFView.h"
@interface
RootViewController () <UIAlertViewDelegate>
@end
@implementation RootViewController
- (void)viewDidLoad {
[super
viewDidLoad];
self.view.backgroundColor = [UIColor
blackColor];
LTFView *view = [[LTFView
alloc]initWithFrame:CGRectMake(50, 100, [UIScreen
mainScreen].bounds.size.width - 50 * 2, 30)];
view.label1.text =
@"用户名";
view.field1.placeholder =
@"请输入用户名";
LTFView *view1 = [[LTFView
alloc]initWithFrame:CGRectMake(view.frame.origin.x,
view.frame.origin.y + view.frame.size.height +
30, view.frame.size.width, view.frame.size.height)];
view1.label1.text =
@"密码";
view1.field1.placeholder =
@"请输入密码";
UIAlertView *q = [[[UIAlertView
alloc]initWithTitle:@"提示"
message:@"尊敬的用户"
delegate:self
cancelButtonTitle:@"确定"
otherButtonTitles:@"取消",
nil]
autorelease];
[q show];
q.delegate = self;
[self.view
addSubview:view];
[self.view
addSubview:view1];
[view release];
[view1 release];
}
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
NSLog(@"ni hao");
}
- (void)didReceiveMemoryWarning {
[super
didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
//
// RootViewController.m
// ui2 _设计模式
//
// Created by dllo on 15/11/9.
// Copyright (c) 2015年 dllo. All rights reserved.
//
#import "RootViewController.h"
#import "LTFView.h"
@interface
RootViewController () <UIAlertViewDelegate>
@end
@implementation RootViewController
- (void)viewDidLoad {
[super
viewDidLoad];
self.view.backgroundColor = [UIColor
blackColor];
LTFView *view = [[LTFView
alloc]initWithFrame:CGRectMake(50, 100, [UIScreen
mainScreen].bounds.size.width - 50 * 2, 30)];
view.label1.text =
@"用户名";
view.field1.placeholder =
@"请输入用户名";
LTFView *view1 = [[LTFView
alloc]initWithFrame:CGRectMake(view.frame.origin.x,
view.frame.origin.y + view.frame.size.height +
30, view.frame.size.width, view.frame.size.height)];
view1.label1.text =
@"密码";
view1.field1.placeholder =
@"请输入密码";
UIAlertView *q = [[[UIAlertView
alloc]initWithTitle:@"提示"
message:@"尊敬的用户"
delegate:self
cancelButtonTitle:@"确定"
otherButtonTitles:@"取消",
nil]
autorelease];
[q show];
q.delegate = self;
[self.view
addSubview:view];
[self.view
addSubview:view1];
[view release];
[view1 release];
}
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
NSLog(@"ni hao");
}
- (void)didReceiveMemoryWarning {
[super
didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
但此处没有涉及到数据, 只是铺键视图和vc 掌握即可
//
// RootViewController.m
// ui2 _设计模式
//
// Created by dllo on 15/11/9.
// Copyright (c) 2015年 dllo. All rights reserved.
//
#import "RootViewController.h"
#import "LTFView.h"
@interface
RootViewController () <UIAlertViewDelegate>
@end
@implementation RootViewController
- (void)viewDidLoad {
[super
viewDidLoad];
self.view.backgroundColor = [UIColor
blackColor];
LTFView *view = [[LTFView
alloc]initWithFrame:CGRectMake(50, 100, [UIScreen
mainScreen].bounds.size.width - 50 * 2, 30)];
view.label1.text =
@"用户名";
view.field1.placeholder =
@"请输入用户名";
LTFView *view1 = [[LTFView
alloc]initWithFrame:CGRectMake(view.frame.origin.x,
view.frame.origin.y + view.frame.size.height +
30, view.frame.size.width, view.frame.size.height)];
view1.label1.text =
@"密码";
view1.field1.placeholder =
@"请输入密码";
UIAlertView *q = [[[UIAlertView
alloc]initWithTitle:@"提示"
message:@"尊敬的用户"
delegate:self
cancelButtonTitle:@"确定"
otherButtonTitles:@"取消",
nil]
autorelease];
[q show];
q.delegate = self;
[self.view
addSubview:view];
[self.view
addSubview:view1];
[view release];
[view1 release];
}
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
NSLog(@"ni hao");
}
- (void)didReceiveMemoryWarning {
[super
didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
//
// RootViewController.m
// ui2 _设计模式
//
// Created by dllo on 15/11/9.
// Copyright (c) 2015年 dllo. All rights reserved.
//
#import "RootViewController.h"
#import "LTFView.h"
@interface
RootViewController () <UIAlertViewDelegate>
@end
@implementation RootViewController
- (void)viewDidLoad {
[super
viewDidLoad];
self.view.backgroundColor = [UIColor
blackColor];
LTFView *view = [[LTFView
alloc]initWithFrame:CGRectMake(50, 100, [UIScreen
mainScreen].bounds.size.width - 50 * 2, 30)];
view.label1.text =
@"用户名";
view.field1.placeholder =
@"请输入用户名";
LTFView *view1 = [[LTFView
alloc]initWithFrame:CGRectMake(view.frame.origin.x,
view.frame.origin.y + view.frame.size.height +
30, view.frame.size.width, view.frame.size.height)];
view1.label1.text =
@"密码";
view1.field1.placeholder =
@"请输入密码";
UIAlertView *q = [[[UIAlertView
alloc]initWithTitle:@"提示"
message:@"尊敬的用户"
delegate:self
cancelButtonTitle:@"确定"
otherButtonTitles:@"取消",
nil]
autorelease];
[q show];
q.delegate = self;
[self.view
addSubview:view];
[self.view
addSubview:view1];
[view release];
[view1 release];
}
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
NSLog(@"ni hao");
}
- (void)didReceiveMemoryWarning {
[super
didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
相关文章推荐
- iOS UI 01 课堂笔记 -设计模式
- IOS UI 01 课堂笔记 -label
- IOS UI 01 课堂笔记 -label
- 使用yuicompressor-maven-plugin插件压缩JS和CSS静态资源
- UILabel: 如何可以更改除底部外的所有边框?
- Android 异步更新UI----handler+thread
- WebKit之CSSValue的继承关系
- JSP利用过滤器解决request中文乱码问题
- JavaSe String,StringBuffer,StringBuilder 简要区别(随记一)
- iOS环信3.0集成 (二)UI文件集成
- iOS多线程开发——NSOperation/NSOperationQueue浅析
- 使用Fluent API进行属性映射【Code-First系列】
- leetcode -- Permutation Sequence -- 重点
- APUE学习记录——进程环境
- Company BDui 面试 笔试 : 从10个已按从大到小排列好的数组中,求top 15个最大的数
- 62 You have enabled backup optimization in RMAN. You issue the following RMAN command to configure a
- HDU 1005:Number Sequence【规律】
- PyQt5系列教程(二)利用QtDesigner设计UI界面
- hdu 3397 Sequence operation 线段树
- ZOJ 3293 Simple Sequence