一、Foundation框架中一些常用的类字符串型:NSString:不可变字符串NSMutableString:可变字符串集合型:1)NSArray:OC不可变数组NSMutableArray:可变数组2)NSSet:NSMutableSet:3)NSDictioraryNSMutableDict...
分类:
其他好文 时间:
2015-08-09 20:37:31
阅读次数:
98
画画板1.搭建界面(3个按钮,1个View)2.为重写touchesBegan:等方法,需要自定义一个View,新建一个View,名为NJView,然后在故事板将这个View的Class设置为NJView3.在NJView.m中重写方法//开始触摸-(void)touchesBegan:(NSSet...
分类:
移动开发 时间:
2015-08-07 12:59:09
阅读次数:
145
iPhone上有非常流畅的用户触摸交互体验,能检测各种手势:点击,滑动,放大缩小,旋转。大多数情况都是用UI*GestureRecognizer这样的手势对象来关联手势事件和手势处理函数。也有时候,会看到第三方代码里会在如下函数中进行处理:-(void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event;
那么问题就来了,手势和touch到底...
分类:
移动开发 时间:
2015-08-06 15:12:33
阅读次数:
187
今天,在实现play gif时间功能,我看见两个陌生班,只需看看这个纪录:NSSet和NSDictionary是两个经常使用的类,可是他们默认假定了当中对象的内存行为。对于NSSet。object是强引用的,和NSDictionary中的value是一样的。而NSDictionary中的key则是c...
分类:
其他好文 时间:
2015-07-30 18:50:06
阅读次数:
198
int main(int argc, const char * argv[]) {
@autoreleasepool {
// 4 NSArray -> NSSet
NSArray * array = @[@"one",@"two",@"three"];
NSSet * set = [NSSet setWithArray:arr...
分类:
其他好文 时间:
2015-07-27 09:30:05
阅读次数:
103
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{方法1 [self.view endEditing:YES];2 [[UIApplication sharedApplication]sendAction:@select....
分类:
其他好文 时间:
2015-07-25 22:47:33
阅读次数:
132
代码:-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^...
分类:
其他好文 时间:
2015-07-25 00:03:29
阅读次数:
119
代码:
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
//在后台进行网址的解析操作
...
分类:
其他好文 时间:
2015-07-24 22:39:15
阅读次数:
137
//NSset {()}集//不可变的 //便利构造器创建一个集 NSSet *set1=[NSSet setWithObjects:@"1",@"2",@"3",@"4", nil]; NSLog(@"%@",set1); //使用集 //返回元素个数 [set1 count]; //随机返回.....
分类:
其他好文 时间:
2015-07-24 12:25:29
阅读次数:
97
先要遵循协议 设置代理 self.jiagetextfield.delegate=self; self.mingchengtextfield.delegate=self;//释放第一响应者-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent ...
分类:
移动开发 时间:
2015-07-24 10:41:11
阅读次数:
117