2

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

sujay
  • 1,845
  • 9
  • 34
  • 55
  • atleast suggest me how can we load pdf s through cover flow effect – sujay Aug 25 '11 at 06:17
  • @sujay what is your exact problem have you implement cover flow effect and having problem in double tap or you wnat help in how to implement cover flow effect. – Gypsa Aug 25 '11 at 06:18
  • @Gypsa :i implemented it by loading the images ,but now i want to load the pdf files to it – sujay Aug 25 '11 at 06:27
  • 1
    I think you should do something like :- if you can show your pdf files as a image in cover flow and when you double click on that image then you can open pdf corresponding to that image. – Gypsa Aug 25 '11 at 06:45
  • @Gypsa :hey can u help me how can i implement double click event here – sujay Aug 26 '11 at 04:57
  • sure I have implemented that. – Gypsa Aug 26 '11 at 05:16
  • @Gypsa :can u please give some tutorial or code on that – sujay Aug 26 '11 at 05:42

2 Answers2

3

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.

Gypsa
  • 11,230
  • 6
  • 44
  • 82
1

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

mayuur
  • 4,736
  • 4
  • 30
  • 65