我想知道我们如何才能实现pdf列表的覆盖流效果,并且双击它应该打开相应的pdf。我真的很惊讶,请帮帮我

提前致谢

最佳答案

在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.
    }


}

希望这段代码可以节省您几个小时。

关于iphone - pdf列表的封面流效果,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/7185711/

10-12 00:15
查看更多