-----------------------------------------------------------------------------------@interface ImageView : UIView-(void)Up:(UIPanGestureRecognizer *)up;
@end------------------------------------------------------------------------------------
#import "ImageView.h"@implementation ImageView/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/-(void)Up:(UIPanGestureRecognizer *)up{
NSLog(@"dsa");
}@end---------------------------------------------------------------------------------------
#import "ViewController.h"
#import "ImageView.h"@interface ViewController ()
@property ImageView * view1;@end@implementation ViewController//-(IBAction)handlePan:(UIPanGestureRecognizer* )sender
//{
// NSLog(@"dsa");
//}
- (void)viewDidLoad { [super viewDidLoad];// self.view1.userInteractionEnabled = true; // Do any additional setup after loading the view, typically from a nib. [self.view1 addGestureRecognizer:[[UIPanGestureRecognizer alloc] initWithTarget:self.view1 action:@selector(Up:)]];
}
@end
@end------------------------------------------------------------------------------------
#import "ImageView.h"@implementation ImageView/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/-(void)Up:(UIPanGestureRecognizer *)up{
NSLog(@"dsa");
}@end---------------------------------------------------------------------------------------
#import "ViewController.h"
#import "ImageView.h"@interface ViewController ()
@property ImageView * view1;@end@implementation ViewController//-(IBAction)handlePan:(UIPanGestureRecognizer* )sender
//{
// NSLog(@"dsa");
//}
- (void)viewDidLoad { [super viewDidLoad];// self.view1.userInteractionEnabled = true; // Do any additional setup after loading the view, typically from a nib. [self.view1 addGestureRecognizer:[[UIPanGestureRecognizer alloc] initWithTarget:self.view1 action:@selector(Up:)]];
}
@end
解决方案 »
- IOS NSCalendar里一个月的第一天成了上个月的最后一天(如:2012/11/15 该日期所在月份的第一天为 2012/10/31)?
- xCode版本能降级吗?
- 请问 定义局部变量 __block是什么意思?
- 怎样用objective c编程获取网页脚本,说法可能不对
- iPad 开发相册打开如何显示横屏
- 关于ios app 基于lbs定位服务的问题
- ios支付宝啊集成问题,
- ios7自带的二维码扫描不能扫描gbk编码生成的二维码吗
- 关于iOS 私钥加密公钥解密的问题
- JSON转数据流提交
- OC中 数组的addObject: 方法在任何一个类中都有可能会被调用,如果在数组中插入了一个 nil值而导致系统崩溃,如何判断是在哪个类中调用引起的呢?
- ios 怎么获取imei
这个属性要设置一下 拖控件 这个属性默认是 YES的