iOS--APP 登录界面图(xuer)
ViewController.h
#import "ViewController.h" @interface ViewController () @property(strong,nonatomic)UIImageView *beijing;
@property(strong,nonatomic) UIImageView *welcome;
@property(strong,nonatomic) UIImageView *phoneIcon;
@property(strong,nonatomic)UITextField *Intele;
@property(strong,nonatomic) UIView *InteleView;
@property(strong,nonatomic) UIImageView *passwordIcon;
@property(strong,nonatomic) UITextField *Inpassword;
@property(strong,nonatomic) UIView *InpasswordView;
@property(strong,nonatomic) UIImageView *logo;
@property(strong,nonatomic) UIButton *loginButton;
@property(strong,nonatomic) UIButton *rigisterButton; @end
ViewController.m
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// 添加父视图beijing背景图
self.beijing=[[UIImageView alloc] initWithFrame:CGRectMake(, , self.view.frame.size.width, self.view.frame.size.height)];
// 插入图片
[self.beijing setImage:[UIImage imageNamed:@"beijing"]];
[self.view addSubview:self.beijing];
// 添加子视图welcome背景图
self.welcome=[[UIImageView alloc] initWithFrame:CGRectMake(, , , )];
// 插入图片
[self.welcome setImage:[UIImage imageNamed:@"welcome"]];
// 插入子视图
[self.view addSubview:self.welcome];
// 添加phoneIcon输入图标
self.phoneIcon=[[UIImageView alloc] initWithFrame:CGRectMake(, , , )];
// 插入图片
[self.phoneIcon setImage:[UIImage imageNamed:@"phoneIcon"]];
[self.view addSubview:self.phoneIcon];
// 添加手机号码输入框
self.Intele=[[UITextField alloc] initWithFrame:CGRectMake(, , , )];
// 设置隐身字
self.Intele.placeholder=@"请输入手机号码";
// 设置数字弹出键盘
self.Intele.keyboardType=UIKeyboardTypeNumberPad;
// 设置无边框的UITextField
self.Intele.borderStyle=UITextBorderStyleNone;
[self.view addSubview:self.Intele];
self.InteleView=[[UIView alloc] initWithFrame:CGRectMake(, , , )];
self.InteleView.backgroundColor=[UIColor whiteColor];
[self.view addSubview:self.InteleView];
// 添加密码输入框
self.Inpassword=[[UITextField alloc] initWithFrame:CGRectMake(, , , )];
self.Inpassword.placeholder=@"请输入密码";
self.Inpassword.secureTextEntry=YES;
self.Inpassword.borderStyle=UITextBorderStyleNone;
[self.view addSubview:self.Inpassword];
self.InpasswordView=[[UIView alloc] initWithFrame:CGRectMake(, , , )];
self.InpasswordView.backgroundColor=[UIColor whiteColor];
[self.view addSubview:self.InpasswordView];
// 添加passwordIcon输入图标
self.passwordIcon=[[UIImageView alloc] initWithFrame:CGRectMake(, , , )];
[self.passwordIcon setImage:[UIImage imageNamed:@"passwordIcon"]];
[self.view addSubview:self.passwordIcon];
// 添加logo背景图
self.logo=[[UIImageView alloc] initWithFrame:CGRectMake(, , , )];
[self.logo setImage:[UIImage imageNamed:@"logo"]];
[self.view addSubview:self.logo];
// 登录按钮的相关设置
self.loginButton=[[UIButton alloc] initWithFrame:CGRectMake(, , , )];
[self.loginButton setBackgroundImage:[UIImage imageNamed:@"loginButton"] forState:UIControlStateNormal];
[self.loginButton setTitle:@"登录" forState:UIControlStateNormal];
// 事件监听
[self.loginButton addTarget:self action:@selector(hideKeyBoard) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:self.loginButton];
// 注册按钮的相关设置
self.rigisterButton=[[UIButton alloc] initWithFrame:CGRectMake(, , , )];
[self.rigisterButton setBackgroundImage:[UIImage imageNamed:@"rigisterButton"] forState:UIControlStateNormal];
[self.rigisterButton setTitle:@"注册" forState:UIControlStateNormal];
// 事件监听
[self.rigisterButton addTarget:self action:@selector(hideKeyBoard) forControlEvents:UIControlEventTouchUpInside];
[self.rigisterButton setTitleColor:[UIColor greenColor] forState:UIControlStateNormal];
[self.view addSubview:self.rigisterButton];
}
// 点击空白区域 隐藏键盘
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
[self hideKeyBoard];
}
-(void)hideKeyBoard
{
if ([self.Intele isFirstResponder]||[self.Inpassword isFirstResponder]){
[self.Intele resignFirstResponder];
[self.Inpassword resignFirstResponder];
}
}
运行结果:

iOS--APP 登录界面图(xuer)的更多相关文章
- 仿知乎app登录界面(Material Design设计框架拿来就用的TexnInputLayout)
在我脑子里还没有Material Design这种概念,就我个人而言,PC端应用扁平化设计必须成为首选,手当其冲的两款即时通讯旺旺和QQ早就完成UI扁平化的更新,然而客户端扁平化的设计本身就存在天生的 ...
- iOS app应用界面加载卡顿的问题
刚发布版本,忽然发现加载界面需要3-5秒延迟,那么问题来了. 首先,发现问题: 1.看代码,基于之前版本更新都没出问题,还是比较确信不是代码中的bug,以防万一,还是仔细看了下关于界面跳转部分的代码, ...
- 如何设计App登录模块?
1.熟悉目前常见的手机APP登陆方式 ① 账号登陆(手机.邮箱) ② 第三方登陆(微信,QQ,微博) ③ 一键快捷登录(工具类,如不记单词) ④ 游客登陆(bbs) ⑤ demo测试登陆(如友盟等) ...
- 萌货猫头鹰登录界面动画iOS实现分析
动画效果仿自国外网站readme.io的登录界面,超萌可爱的猫头鹰,具体效果如下图所示. 动画实现核心: 动画核心的是用到了iOS中UIView的transform属性,然后根据尺寸坐标对四张图片进行 ...
- [IOS NSUserDefaults]的使用:登陆后不再显示登录界面。
之前搜了好多地方都没找到实现“登陆后不再显示登录界面,而默认自动登录”的方法. 待我发现有种存储方式叫NSUserDefaults的时候,立马又感觉新技能get了. 简介: NSUserDefault ...
- iOS开发UI篇—模仿ipad版QQ空间登录界面
iOS开发UI篇—模仿ipad版QQ空间登录界面 一.实现和步骤 1.一般ipad项目在命名的时候可以加一个HD,标明为高清版 2.设置项目的文件结构,分为home和login两个部分 3.登陆界面的 ...
- jquery自己主动旋转的登录界面的背景代码登录页背景图
在其他网站上看到比较爽Web登录界面.背景图片可以自己主动旋转. 介绍给大家.有兴趣的可以改改下来作为自己的系统登录界面. 如图: watermark/2/text/aHR0cDovL2Jsb2cuY ...
- iOS中三种方式实现登录界面播放视频或gif效果
现在app都做的越来越炫酷,各种动画效果,各种特效很好的提高了用户的体验.很多app在登录界面都使用了动画效果,比如Uber,Keep,QQ等等.这些动画效果基本都是使用gif或者MP4来实现的. 效 ...
- 1、IOS开发--iPad之仿制QQ空间(登录界面搭建+登录逻辑实现)
开始搭建登录界面 登录界面效果图: 相关的图片资源下载百度云备份链接: http://pan.baidu.com/s/1o71cvMU 密码: 2h7e 步骤开始: 设置辅助窗口的位置在下方 快捷键o ...
随机推荐
- 微信公众号开发第六课 BAE结合实现迅雷账号随机分享
迅雷离线是个好东西,那么我们能不能实现这样一个功能,回复迅雷,随机返回一个迅雷账户和密码. 首先在t_type类型表中添加 迅雷以及对应用值xunlei,这样返回的case值中对应值xunlei. 建 ...
- storm分组模式
Shuffle grouping: Tuples被随机分配到每一个bolt’s task,以便于每一个bolt’s task获得相同数量的tuples. Fields grouping: Stream ...
- Windows Phone后台音乐播放本地代理实现讨论
前一篇文章讨论的wp平台音乐播放的一些遇到的问题,经过苦思冥想和多方参考安卓实现:发现我们可以考虑一种本地代理的思想来完成我们的边听边存,并且流畅拖动进度条.希望大家一起讨论.可以下载我的代码一同研究 ...
- 关于Assembly.CreateInstance()与Activator.CreateInstance()方法
于Assembly.CreateInstance()与Activator.CreateInstance()方法 动 态创建类对象,大多是Activator.CreateInstance()和Activ ...
- Android 学习笔记之AndBase框架学习(三) 使用封装好的函数完成Http请求..
PS:踏踏实实走好每一步... 学习内容: 1.使用AndBase框架实现无参Http Get请求... 2.使用AndBase框架实现有参Http Post请求... 3.使用AndBase框架实现 ...
- 3D拓扑自动布局之Node.js篇
上篇将3D弹力布局的算法运行在Web Workers后台,这篇我们将进一步折腾,将算法运行到真正的后台:Node.js,事先申明Node.js篇和Web Workers篇一样,在这个应用场景下并不能提 ...
- R语言简单聚类分析
#以R基础包自带的鸢尾花(Iris)数据进行聚类分析iris data <- iris[,:] #系统聚类法(层次聚类法) distance <- dist(data) #计算距离 iri ...
- Winform开发框架之权限管理系统改进的经验总结(3)-系统登录黑白名单的实现
在一般的权限系统里面,可能经常会看到系统的黑名单或者白名单的拦截功能.在一般权限系统里面,常见的黑名单就是禁止用户在某些IP上登录系统,白名单就是允许用户只在某些IP上登录系统.本随笔主要介绍在我的权 ...
- 小白学Linux(四)--系统常用命令
这里记录一下基础的系统常用命令,都是日常可能用到的,需要记住的一些命令.主要分为5个模块:关于时间,输出/查看,关机/重启,压缩归档和查找. 时间: date :查看设置当前系统时间,dat ...
- 泛函编程(19)-泛函库设计-Parallelism In Action
上节我们讨论了并行运算组件库的基础设计,实现了并行运算最基本的功能:创建新的线程并提交一个任务异步执行.并行运算类型的基本表达形式如下: import java.util.concurrent._ o ...