原文网址:http://www.jianshu.com/p/f797793d683f 参考文章 navigationItem UINavigationItem UINavigationBar UIBarButtonItem UIButton iOS 7 教程:定制iOS 7中的导航栏和状态栏 nav ...
分类:
移动开发 时间:
2016-06-02 00:46:07
阅读次数:
358
在常见iOS开发中,我们常遇到这样的需求,如下: 我们需要自定义导航栏右侧按钮,常见的自定义包装按钮如下: //设置rightItem; UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; btn.frame = CGRectM ...
分类:
移动开发 时间:
2016-05-29 16:32:35
阅读次数:
580
_interestedBtn = [UIButton buttonWithType:UIButtonTypeCustom]; _interestedBtn.layer.cornerRadius = 8; _interestedBtn.layer.borderColor = [UIColor oran ...
分类:
其他好文 时间:
2016-05-29 12:15:16
阅读次数:
118
继承自UIButton的 首先我们要知道为什么要自定义Button,因为现有的Button无法满足我们要实现功能的要求 比如我们要给Button新添加一些属性的时候,如果写分类,就要研究一下进行时,显然这样没有添加一个子类来的痛快。 再有我们对按钮的内部标题和图片的布局不满意的时候也可以自定义,有人 ...
分类:
其他好文 时间:
2016-05-27 20:25:52
阅读次数:
171
创建一个UIButton 并用Target - Action来监听它的点击事件 Target -- self控制器 Action -- 具体动作,self控制器中的某个方法 forControlEvents:UIControlEventTouchUpInside -- 表示监听的事件 ...
分类:
移动开发 时间:
2016-05-22 20:01:50
阅读次数:
162
#import "ViewController.h" #import "WDJQuestions.h" @interface ViewController () /** * 显示金币 */ @property (weak, nonatomic) IBOutlet UIButton *moneyBtn ...
分类:
其他好文 时间:
2016-05-22 00:39:22
阅读次数:
164
UISegmentedControl类似于UIButton,它可以提供多个选择操作,响应事件,但具有很大的局限性,我们更多的是使用自定义的,不过在这里还是介绍下它的基本用法. ...
分类:
其他好文 时间:
2016-05-19 14:49:09
阅读次数:
167
#import <UIKit/UIKit.h>@interface ViewController : UIViewController@property (weak,nonatomic)IBOutlet UIButton *startBtn;@property (weak,nonatomic)IBO ...
分类:
其他好文 时间:
2016-05-18 17:35:36
阅读次数:
135
这里来介绍一下NGUI的各种脚本的作用,以便以后需要某种效果的时候,去添加相应的脚本去实现效果 UIButton --> 按钮脚本 UIPanel --> 面板脚本 UIToggle --> 自动开闭脚本 UISlider --> 滑动条脚本 UIInput --> 输入框脚本 UISprite - ...
分类:
编程语言 时间:
2016-05-17 11:33:50
阅读次数:
404
(1)UIButton类继承自UIControl,而UIControl继承自UIView,因为UIView就是个矩形区域,所以UIButton实例化的对象其实都是一个矩形,虽然有各种圆角、增加联系人、信息按钮等等,给它们加个背景它们就现形成矩形了,而且它们有个frame属性,这就是设置位置和矩形框的 ...
分类:
其他好文 时间:
2016-05-15 16:36:24
阅读次数:
359