zoukankan      html  css  js  c++  java
  • iOS UI 01 课堂笔记 -设计模式

    主要是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



  • 相关阅读:
    PowerDesigner学习 ---- 系列文章
    PowerDesigner基础使用 ---- 入门学习
    PowerDesigner ---- 数据库设计(概念模型CDM和物理模型PDM)
    PowerDesigner V16.5 安装及汉化
    在树莓派是安装并配置NTP服务
    RESTful Web API 理解
    Linux或树莓派3——挂载U盘、移动硬盘并设置rwx权限
    开启树莓派自带的VNC功能
    c#代码获取web.config配置文件里面设置的 <compilation debug="true"节点
    WebService的web客户端同步、异步、多线程向服务端传入参数的数据交互方式
  • 原文地址:https://www.cnblogs.com/yuhaojishuboke/p/5043090.html
Copyright © 2011-2022 走看看