IOS 学习笔记(Beginning IOS 5 Development XCode 4.2)

转载:http://blog.163.com/lx_nju/blog/static/203476298201211711470520/

 

第三章

1.ACTIONThe sender argument exists so that you can respond to multiplecontrols using a single action method.sender存在的话,你可以用一个单独的ACTION响应多个控件(control)

2.ACTION 参数 1 控件 2 事件类型- (IBAction)doSomething:(id)senderforEvent:(UIEvent *)event;

3.delegate在退出之前调用 会调用 applicationWillTerminate

4.协议的查看方法要查看协议的说明及定义:Hold down the option key. Yourcursor should turn into crosshairs. Move your cursor so that it is over the wordUIApplicationDelegate. Your cursor should turn into a pointing hand with a questionmark in the center, and the word UIApplicationDelegate should be highlighted, as if itwere a link in a browser点击option 选择协议.

5.viewDidUnload只要用输出口连接代码的方法,则viewDidUnload中的[self setOutlet:nil];代码会自动实现。

6 查询一个按键的title。NSString *title = [sender titleForState:UIControlStateNormal];

7.Touch Up Inside:当用户的手指离开屏幕时,如果他最后触摸的位置在按钮内部,则会触发事件。

8.按option键拖动可以复制视图中的控件

9.Product菜单中的Analyze命令可以分析并发现内存泄露等缺陷,

10.连接IBOutlet 时,先按ctrl键,再用鼠标连接。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值