2

Cover flow effect for pdf list

 2 years ago
source link: https://www.codesd.com/item/cover-flow-effect-for-pdf-list.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Cover flow effect for pdf list

advertisements

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


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.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK