首先在view上添加手势 UIPanGestureRecognizer1 UIPanGestureRecognizer *panGes = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(goAnimation...
分类:
其他好文 时间:
2014-11-12 00:34:54
阅读次数:
176
-(id)initWithFrame:(CGRect)frame{ self=[super initWithFrame:frame]; if (self) { //使用self. 表示调用了set方法 retain了一次 self.lineArray=[NSMutableArray ...
分类:
移动开发 时间:
2014-11-11 20:45:26
阅读次数:
163
两种方法,实现一件事情做完,再做另外一件事情。
1、
dispatch_async(dispatch_get_main_queue(), ^{
[self.navigationController popToRootViewControllerAnimated:NO];
});
dispatch_...
分类:
其他好文 时间:
2014-11-11 19:10:18
阅读次数:
178
Python要self的理由Python的类的方法和普通的函数有一个很明显的区别,在类的方法必须有个额外的第一个参数 (self ),但在调用这个方法的时候不必为这个参数赋值 (显胜于隐 的引发)。Python的类的方法的这个特别的参数指代的是对象本身,而按照Python的惯例,它用self来表示。...
分类:
编程语言 时间:
2014-11-11 18:44:59
阅读次数:
198
BEFORE STARTING IT IS IMPORTANT TO KNOW THAT THIS ENVIRONMENT IS NOT SUPPORTED BY MICROSOFT. USE IT ONLY FOR SELF STUDY AND LABORATORY OF CLUSTER OF H...
分类:
Web程序 时间:
2014-11-11 18:25:06
阅读次数:
238
在ipad的ios8.0系统上,actionsheet上点击响应后如果调用了UIImagePickerController *picker = [[UIImagePickerController alloc] init];1 [self.controller presentViewControlle...
分类:
移动开发 时间:
2014-11-11 12:39:10
阅读次数:
204
OC中提供了4种访问权限,@private, @public, @protected这三种和其他的C++, Java是一样的,@package这个访问权限并不是Java里的包访问权限,OC中没有包的概念,这个是框架级的访问权限,在当前的framework的类中视为@protected,在框架以外的类中访问被视为@private。
//
// Goods.h
// 05_Self
//
// ...
分类:
其他好文 时间:
2014-11-11 10:51:18
阅读次数:
192
1.swipe手势简单代码:_mySwipeGR = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(handleSwipes:)]; //设定轻扫手势方向: //只检测符合设定的这个方向的手势 ...
分类:
其他好文 时间:
2014-11-10 19:33:55
阅读次数:
241
- (UIImage *)roundedCornerImageWithCornerRadius:(CGFloat)cornerRadius { CGFloat w = self.size.width; CGFloat h = self.size.height; CGFloat scale = ...
分类:
其他好文 时间:
2014-11-10 13:45:12
阅读次数:
166
LeNet-5是一种用于手写字符识别的卷积神经网络(效果见这),为了熟悉theano的卷积神经网络工具包,对它进行了研究。1. 模型2. ConvPoolLayerclass ConvPoolLayer(object): """ 卷积层 """ def __init__(self...
分类:
其他好文 时间:
2014-11-09 23:26:53
阅读次数:
685