会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
誓言の真嗳
博客园
首页
新随笔
联系
订阅
管理
2015年9月12日
block传值
摘要: block作为苹果主推的方法,同样是可以用来传值的。两个页面,第一个页面有一个label,第二个页面有一个textField,将第二个页面输入的信息,在第一个页面显示。按照代码中的步骤,并附有说明,应该很容易懂了。第二个页面controller的.h文件(声明block)#import #pragm...
阅读全文
posted @ 2015-09-12 14:53 誓言の真嗳
阅读(144)
评论(0)
推荐(0)
2015年9月7日
UISwitch | UIStepper
摘要: UISwitch 开关空间- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. UISwitch *switchC = [[UISwitch...
阅读全文
posted @ 2015-09-07 14:58 誓言の真嗳
阅读(118)
评论(0)
推荐(0)
2015年8月29日
UILabel
摘要: UILabel:显示文本的控件 // 1.创建对象 UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(30, 250, 100, 30)]; // 2.设置相关属性// label.backgroundCol...
阅读全文
posted @ 2015-08-29 21:16 誓言の真嗳
阅读(115)
评论(0)
推荐(0)
滑块控件UISlider
摘要: 滑块控件UISlider继承与UIControlUISlider *slider = [[UISlider alloc] initWithFrame:CGRectMake(30, 200, 300, 34)]; slider.minimumValue = 0; // 最小值 默认0 sl...
阅读全文
posted @ 2015-08-29 20:53 誓言の真嗳
阅读(193)
评论(0)
推荐(0)
分段控件UISegmentedControl
摘要: 分段控件UISegmentedControl继承与UIControl UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] initWithItems:@[@"全部商家", @"优惠商家", @"我的"]]; ...
阅读全文
posted @ 2015-08-29 20:51 誓言の真嗳
阅读(180)
评论(0)
推荐(0)
2015年8月27日
delegate设计模式
摘要: delegate设计模式1.代理三方:委托方、代理方、协议2.定义协议协议:一堆方法的声明(面试题)#import #warning 1.定义协议@class TouchView;@protocol TouchViewDelegate @optional// touchView开始被点击- (voi...
阅读全文
posted @ 2015-08-27 20:14 誓言の真嗳
阅读(199)
评论(0)
推荐(0)
target-action设计模式
摘要: target-action是模仿系统的button。即将事件的处理交给外界,不在自己内部写死。target-action设计模式主要涉及到两方面的内容target:目标action:动作target-action可以让不同的实例对象在相同的时间点执行不同的方法,从而达到不同的效果target-act...
阅读全文
posted @ 2015-08-27 20:08 誓言の真嗳
阅读(262)
评论(0)
推荐(0)
手势识别器
摘要: UITapGestureRecognizer是轻拍⼿手势识别器,能识别轻拍操作UILongPressGestureRecognizer是⻓长按⼿手势识别器,能识别⻓长按操作。UIRotationGestureRecognizer是旋转⼿手势识别器,能识别旋转操作。UIPinchGestureReco...
阅读全文
posted @ 2015-08-27 19:58 誓言の真嗳
阅读(126)
评论(0)
推荐(0)
TouchView
摘要: UIEvent:事件类。在IOS中将用户的操作封装了一个类是UIEvent。UIEvent根据用户的操作分为三种类型:触摸、晃动、远程控制。 触摸对应的UI类是UITouch。#import "RootViewController.h"#import "TouchView.h"@interfa...
阅读全文
posted @ 2015-08-27 19:39 誓言の真嗳
阅读(269)
评论(0)
推荐(0)
控件的用户交互(特例:label、imageView)
摘要: 在UI中,基本上所有的控件的用户交互都是打开的,但是也有一些特例,例如label、imageView。 userInteractionEnabled这个属性影响了响应者链的检测过程,所以如果将一个button放在一个label或者imageView上,都需要将label或者imageView的用户交
阅读全文
posted @ 2015-08-27 19:32 誓言の真嗳
阅读(588)
评论(0)
推荐(0)
下一页
公告