Latest 1.0.2
Homepage https://github.com/junhaiyang/MRGalleryView
License MIT
Platforms ios 6.0, requires ARC
Authors

轻量级左右滑动View,基本实现tableView功能

创建方法:

glleryview = [[MRGalleryView alloc] initWithFrame:self.view.bounds];
glleryview.dataSource = self;
glleryview.delegate = self;
glleryview.pagingEnabled = YES;
glleryview.bounces = NO;
glleryview.sideBarWidth=5.0f;
glleryview.backgroundColor = [UIColor clearColor];
[self.view addSubview:glleryview];
[glleryview reloadData];

数目:

- (NSInteger)numberOfRowsInGalleryView:(MRGalleryView *)GalleryView{ 
    return 5;
}

宽度

- (CGFloat)galleryView:(MRGalleryView *)galleryView widthForRow:    (NSInteger)row{
    return self.view.frame.size.width;
}

视图

- (MRGalleryCell *)galleryView:(MRGalleryView *)galleryView cellAtRow:  (NSInteger)row{

static NSString *CellIdentifier = @"Cell";
MRGalleryCell *cell = [galleryView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
    cell = [[MRGalleryCell alloc] initWithIdentifier:CellIdentifier];
}else{
    //TODO: clear
}

cell.selectionType=GalleryCellSelectionTypeNone;
//TODO: 

return cell;
}

点击

- (void)galleryView:(MRGalleryView *)galleryView didSelectRow:(NSInteger)row{

}

Latest podspec

{
    "name": "MRGalleryView",
    "version": "1.0.2",
    "summary": "u81eau5b9au4e49u7684u6a2au5411u6ed1u52a8tableview",
    "homepage": "https://github.com/junhaiyang/MRGalleryView",
    "license": "MIT",
    "authors": {
        "yangjunhai": "[email protected]"
    },
    "platforms": {
        "ios": "6.0"
    },
    "source": {
        "git": "https://github.com/junhaiyang/MRGalleryView.git",
        "tag": "1.0.2"
    },
    "requires_arc": true,
    "source_files": "*.{h,m,mm}"
}

Pin It on Pinterest

Share This