UIButton、UIImageView、UILabel的选择
UIButton
特点
既能显示文字,又能显示图片(能显示2张图片,背景图片、内容图片)
长按高亮的时候可以切换图片\文字
直接通过addTarget...方法监听点击
UIImageView
能显示图片,不能直接通过addTarget...方法监听点击
UILabel
能显示文字,不能直接通过addTarget...方法监听点击
选择
仅仅是显示数据,不需要点击
建议选择UIImageView、UILabel
不仅显示数据,还需要监听点击
建议选择UIButton
其实UIImageView、UILabel也可以通过手势识别器来监听
长按控件后,会改变显示的内容
不用考虑了,选择UIButton(因为UIButton有highlighted这种状态)
同时显示2张图片:背景图片、内容图片
不用考虑了,选择UIButton
UIButton、UIImageView、UILabel的选择的更多相关文章
- iOS开发——UI基础-UIButton、UIImageView、UILabel的选择
1.UILabel - UILabel的常见属性 @property(nonatomic,copy) NSString *text; 显示的文字 @property(nonatomic,retain) ...
- iOS学习21之UILabel, UITextField, UIButton, UIImageView
1.UILabel 1> 概述 UILabel (标签): 是显示文本的控件.在App中 UILabel 是出现频率最高的控件 UILabel 是 UIView 子类,作为子类一般是为了扩充父类 ...
- 你真的了解UIButton、UILabel 吗?
一:首先查看一下关于UIButton的定义 @class UIImage, UIFont, UIColor, UIImageView, UILabel; //设置UIButton的样式 typedef ...
- iOS:UIView、UIControl、UIButton、UILabel简单的属性和方法常识
常见属性和方法 一 .UIVIew 常见属性 1.frame 位置和尺寸(以父控件的左上角为原点(0,0)) 2.center 中点 (以父控件的左上角为原点(0,0)) 3.bounds 位置和尺寸 ...
- 设置UIButton或者UILabel显示文字的行数
需要在UIButton的titleLabel或者UILabel的text 字符串里面添加换行符号 “\n”,并且设置 UILabel的numberOfLines属性 栗子:行数要和“\n”的个数对应, ...
- UIButton、UILabel、UITextField 初学者需要了解的基本定义和常用设置
以下是三个IOS开发中最常用的控件,作为IOS基础学习教程知识 ,初学者需要了解其基本定义和常用设置,以便在开发在熟练运用. UIButton按钮 第一.UIButton的定义 UIButton * ...
- iOS基础 - UIButton - UIImageView
封装思想:将相同的重复东西保存到方法里,不同的东西用参数代替.不相同的东西交给方法调用者,相同东西自己搞定. 一.UIButton和UIImageView的区别 1.显示图片 1> UIImag ...
- ios 延迟调用 && UIImageView && UILabel && UISegmentedControl && UISwitch && UISlider
// // ViewController.m // UI_Lesson3 // // Created by archerzz on 15/8/13. // Copyright (c) 2015 ...
- iOS - UIButton
前言 NS_CLASS_AVAILABLE_IOS(2_0) @interface UIButton : UIControl <NSCoding> @available(iOS 2.0, ...
随机推荐
- Wall(凸包POJ 1113)
Wall Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 32360 Accepted: 10969 Description On ...
- SQLite不支持的SQL语法总结
1 TOP 这是一个大家经常问到的问题,例如在SQLSERVER中可以使用如下语句来取得记录集中的前十条记录: SELECT TOP 10 * FROM [index] ORDER BY indexi ...
- MFCC常用类介绍
http://www.cnblogs.com/lzmfywz/archive/2012/04/22/2465069.html CStatic CObject └CCmdTarget └CWnd └CS ...
- Poj(1274),二分图匹配
题目链接:http://poj.org/problem?id=1274 The Perfect Stall Time Limit: 1000MS Memory Limit: 10000K Tota ...
- tomcant报错The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path
下载与你Tomcat对应版本的 tcnative-1.dll,放到apache-tomcat-7.0.57\bin 目录下,重启tomcat http://archive.apache.org/dis ...
- 2016年10月27日 星期四 --出埃及记 Exodus 19:12
2016年10月27日 星期四 --出埃及记 Exodus 19:12 Put limits for the people around the mountain and tell them, `Be ...
- 适配 iOS尺寸
http://liumh.com/2015/10/21/ios-image-related-matching/ 苹果IPHONE 5主屏尺寸: 4英寸 屏幕尺寸: iPhone 6 Plus 5.5英 ...
- PHP判断用户设备是否是移动设备
摘自http://www.oschina.net/code/snippet_1432190_46913 <?php function isMobile() { // 如果有HTTP_X_WA ...
- ios照片获取,拍照功能
// // HYBPhotoPickerManager.h // ehui // // Created by 黄仪标 on 14/11/26. // Copyright (c) 2014年 黄 ...
- UVA 11795 七 Mega Man's Mission
七 Mega Man's Mission Time Limit:1000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Subm ...