zoukankan      html  css  js  c++  java
  • 3种常用IOS弹框

    目前为止,已经知道3种IOS弹框:
    1、系统弹框-底部弹框 UIActionSheet 
    (1)用法:处理用户非常危险的操作,比如注销系统等
    (2)举例:
    UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"确定要注销?" delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:@"确定" otherButtonTitles:nil, nil];
      [sheet showInView:self.view];
    (3)效果
     
    2、系统弹框-中间弹框
    (1)用法:处理一般提醒,如果非必须,尽量不用,影响友好性。
    (2)举例:
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"警告" message:@"账号或者密码错误" delegate:nil cancelButtonTitle:@"好的" otherButtonTitles:nil, nil];
           [alert show];
    (3)效果:
    在登陆界面,输入账号密码,如果有一项输入错误,弹框提示,必须点击“好的”才能重新输入
     
    3、三方框架MBProgressHuD弹框-中间弹框
    (1)用法:需要引入该框架文件,这里在它基础上,写了一个分类,头文件“MBprogressHUD+MJ.h”,更方便方法调用。其他需要调用方法的文件包含该头文件即可。优点在于只提示1秒钟,然后迅速消失,不需要用户去点击。比较友好。
    (2)举例:
    [MBProgressHUD showError:@"密码错误"];
    [MBProgressHUD showMessage:@"登录中...."];
    (3)效果:
     
     
    弹框插件MBProgressHUD.zip
    百度网盘地址:链接:http://pan.baidu.com/s/1pJJXymZ 密码:5euj
     
  • 相关阅读:
    python 匿名函数lambda()
    python列表推导式
    python数组的基本操作一(添加,扩展,插入)
    Python的数字类型
    Python初识以及Windows安装教程
    字典简单使用
    two sum(LeetCode)
    python读写文件
    C++ volatile关键字(转)
    实验一
  • 原文地址:https://www.cnblogs.com/exclusiveZhang/p/4445522.html
Copyright © 2011-2022 走看看