我想知道如何为pdf列表实现封面流效果,并且在双击时,它应该打开相应的pdf。我真的很喜欢,请帮帮我
提前致谢
答案 0 :(得分:3)
在openFlowView.m文件中搜索此方法
- (void)awakeFromNib {
[self setUpInitialState];
}
Now when you find this replace this method by below or add lines of tapGestureRecognizer.
- (void)awakeFromNib {
[self setUpInitialState];
UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(screenTapped:)];
[tapRecognizer setNumberOfTapsRequired:2];
[self addGestureRecognizer:tapRecognizer];
[tapRecognizer release];
}
screenTapped is my method that gets called when I tap twice on cover flow.
- (void)screenTapped:(UITapGestureRecognizer *)tap {
NSLog(@"Screen tapped");
//put your points of your coverflow coordinates
if(coverPointimage.x > 0 && coverPointimage.x <= 265 && coverPointimage.y >0 && coverPointimage.y <= 205){
[self imageClicked];//either write code or made seperate method that should gets called when you do double tap.
}
}
希望这段代码能节省你几个小时。快乐的编码。
答案 1 :(得分:1)
您应该尝试Tapku库以获得封面效果。它非常容易和可定制。你可以找到它here。