onLongPress

Description

Long press event. It is fired under the view mode DIVME_MULTIPLE when an image with a specified index in the image gallery view is long pressed.

Syntax

- (void) onLongPress: (id) sender
index: (NSInteger) index

Parameters

ID sender: The current DcsUIImageGalleryView object that triggers the event.
NSInteger index: The index of an image.

Return value

void

Example


@interface ViewController ()<DcsUIImageGalleryViewDelegate>{
    DcsView *dcsView;
}
@end
 
@implementation ViewController
 
- (void)viewDidLoad {
    [super viewDidLoad];
     
    dcsView = [[DcsView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
 
    dcsView.imageGalleryView.delegate = self; 
    [self.view addSubview:dcsView];
}

- (void)onLongPress:(id)sender index:(NSInteger)index{
    NSLog(@"onLongPress fired and index: %ld", index);
}

@end

Is this page helpful?

Leave a Reply

Your email address will not be published.