pdf列表的封面流效果

发布于 2024-12-01 10:56:35 字数 71 浏览 0 评论 0原文

我想知道如何实现 pdf 列表的封面流效果,双击后,它应该打开相应的 pdf。我真的很困惑,请帮助我,

提前致谢

I wanted to know how can we implement the cover flow effect for the list of pdfs and on double tap ,it should open respective pdf. I m really struck between ,please help me out

thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

萌梦深 2024-12-08 10:56:36

您应该尝试使用 Tapku Library 来获得封面流效果。它非常简单且可定制。您可以在此处找到它。

You should try out the Tapku Library for coverflow effect. Its really easy and customizable. You can find it here.

无所的.畏惧 2024-12-08 10:56:35

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


}

希望此代码可以节省您的几个小时。快乐编码。

In openFlowView.m file search this method

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


}

Hope this code will save your couple of hours.Happy Coding.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文