- (void)buttonClickedWith:(UIButton *)button event:(UIEvent *)event{ NSSet *touches =[event allTouches]; UITouch *touch =[touches anyObject]; ...
分类:
其他好文 时间:
2015-10-30 10:37:03
阅读次数:
204
原文 : http://www.cnblogs.com/GISerYang/p/3340937.html 1、集合:集合(NSSet)和数组(NSArray)有相似之处,都是存储不同的对象的地址;不过NSArray是有序的集合,NSSet是无序的集合。集合是一种哈希表,运用散列算法,查找集合中的元素...
分类:
其他好文 时间:
2015-10-23 18:33:10
阅读次数:
163
Objective - C Foundation 框架...
分类:
移动开发 时间:
2015-10-21 12:40:39
阅读次数:
292
一、概述iPhone中处理触摸屏的操作,在3.2之前是主要使用的是由UIResponder而来的如下4种方式:- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event- (void)touchesCancelled:(NSSet...
分类:
移动开发 时间:
2015-10-18 12:37:43
阅读次数:
182
//开始触摸-(void)touchesBegan:(NSSet
*)toucheswithEvent:(UIEvent*)event{//NSSet集合和数组类似都是用来装多个对象的但是区别是set无序//获取set集合中任意对象
[touchesanyObject];//把set集合转成array数组NSArray*arr=touches.allObjects;UITouch*t=[touchesanyObject];..
分类:
其他好文 时间:
2015-10-13 01:45:37
阅读次数:
127
#import "TestViewController.h"#import "OneViewController.h"在TextViewController写入点击事件:- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{...
分类:
其他好文 时间:
2015-10-07 13:22:44
阅读次数:
176
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UIGraphicsBeginImageContextWithOptions(self.view.frame.size, YES, 0.0); [self.vie.....
分类:
移动开发 时间:
2015-09-30 23:21:40
阅读次数:
649
//如果想排序以后再取,可以这样:NSSet *users = [groupUser users];//如果是存的字典,则key后面写的是想按照哪个关键字进行排序NSSortDescriptor *sd = [[NSSortDescriptor alloc] initWithKey:@"displa...
分类:
其他好文 时间:
2015-09-29 12:49:21
阅读次数:
134
1 //触摸四个方法 2 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ 3 UITouch *touch = [touches anyObject]; 4 CGPoint point = [tou...
分类:
移动开发 时间:
2015-09-26 15:55:23
阅读次数:
444
点击空白处退出键盘1 -(void)touchesBegan:(nonnull NSSet *)touches withEvent:(nullable UIEvent *)event{2 [self.view endEditing:YES];3 }
分类:
移动开发 时间:
2015-09-24 23:56:32
阅读次数:
528