zoukankan      html  css  js  c++  java
  • IOS简单的登陆界面

    主要需要注意的几个问题:

           1.导入图片方式最好用文件导入

             代码:

             在ViewController.m文件中

             

           2.UILable常用属性

             @property(nonatomic,copy)   NSString           *text; //设置文本内容         

             @property(nonatomic,retain) UIFont             *font; //设置字体       

             @property(nonatomic,retain) UIColor            *textColor; //设置文本颜色     

             @property(nonatomic)        NSTextAlignment    textAlignment;   //设置文本的排列方式     

             @property(nonatomic) NSInteger numberOfLines;//设置文本多行显示

           3.UITextField 文本输入框

              1、密码输入框要隐藏输入字符,以黑点代替 
              2、Login时会检查输入框,若输入不合法,弹窗提示用户 
              3、点击界面空白地方的时候,能够收起输入键盘,防止挡住用户点击登陆。 

         代码:

                         

               //点击界面空白地方的时候,能够收起输入键盘,防止挡住用户点击登陆

                 

                //登陆按钮

                 

                 

    总结:

            熟悉@property(nonatomic) NSInteger numberOfLines;//设置文本多行显示

            熟悉密码安全设置secureTextEntry变黑点

            熟悉-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event回收键盘方法

            熟悉按钮addTarget控制点击事件的使用

            熟悉UIAlertView类的使用

         

  • 相关阅读:
    CentOS 7拨号上网(ADSL & PPPoE)
    linux使用nmcli重新生成网卡配置文件
    Linux 内存缓存占用过大,Centos7设置定时清除buff/cache的脚本
    部署redis6.0 常见问题
    ssh 升级导致的hadoop 主备切换失败
    配置zookeeper的 ACL权限
    sqoop 创建跟mysql相同表结构的hive表报错
    vim中显示不可见字符
    supervisor 使用
    使用hive streaming 统计Wordcount
  • 原文地址:https://www.cnblogs.com/taopengcun/p/3697018.html
Copyright © 2011-2022 走看看