赞
踩
自己开发时需求要求,就自己开发了一个,个人思路:
1、创建View放在window上
self = [super initWithFrame:CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT)];
self.backgroundColor = [UIColor purpleColor];
id <UIApplicationDelegate> delegate = [[UIApplication sharedApplication] delegate];
if ([delegate respondsToSelector:@selector(window)])
{
self.window = [delegate performSelector:@selector(window)];
}
else
{
self.window = [[UIApplication sharedApplication] keyWindow];
}
[self.window addSubview:self];
2、添加拖拽和显示手势
UIPanGestureRecognizer *gesture = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(panGestureRecognizer:)];
gesture.delegate = self;
[self addGestureRecognizer:gesture];
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapGestureRecognizer:)];
[self addGestureRecognizer:tapGesture];
[UIView setAnim
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。