IRPhotoGallery
- IRPhotoGallery是iOS上功能强大的相册。
功能
- 支持多种相册模式。
- 水平
- 垂直
- 普通
- 可删除
- 可缩放
- 带按钮
- 无按钮
- 全屏相册。
- 可定制功能。
- 惊人的相机。
安装
Git
- 克隆此项目。
- 将此项目复制到您的项目中。
- 将.xcodeproj添加到您的项目中,并将其作为嵌入式框架链接。
选项
- 您可以移除
ScreenShots
文件夹。
Cocoapods
- 尚不支持。
使用方法
基本
- 从代码实现
self.tableView = [[BranchTableIView alloc] init];
self.tableView.delegate = self;
Device *devicebranch1 = [[Device alloc] init];
devicebranch1.name = @"branch1";
Device *devicebranch2 = [[Device alloc] init];
devicebranch2.name = @"branch2";
Device *devicebranch3 = [[Device alloc] init];
devicebranch3.name = @"branch3";
Device *devicebranch4 = [[Device alloc] init];
devicebranch4.name = @"branch4";
Device *devicebranch5 = [[Device alloc] init];
devicebranch5.name = @"branch5";
Device *deviceleaf = [[Device alloc] init];
deviceleaf.name = @"leaf";
Device *deviceleaf2 = [[Device alloc] init];
deviceleaf2.name = @"leaf2";
Device *deviceleaf3 = [[Device alloc] init];
deviceleaf3.name = @"leaf3";
Device *deviceleaf4 = [[Device alloc] init];
deviceleaf4.name = @"leaf4";
Device *deviceleaf5 = [[Device alloc] init];
deviceleaf5.name = @"leaf5";
Device *deviceleaf6 = [[Device alloc] init];
deviceleaf6.name = @"leaf6";
Device *deviceleaf7 = [[Device alloc] init];
deviceleaf7.name = @"leaf7";
Device *deviceleaf8 = [[Device alloc] init];
deviceleaf8.name = @"leaf8";
Device *deviceleaf9 = [[Device alloc] init];
deviceleaf9.name = @"leaf9";
Device *deviceleaf10 = [[Device alloc] init];
deviceleaf10.name = @"leaf10";
Device *deviceleaf11 = [[Device alloc] init];
deviceleaf11.name = @"leaf11";
Device *deviceleaf12 = [[Device alloc] init];
deviceleaf12.name = @"leaf12";
branch = [[Branch alloc] initWithTableView:self.tableView];
Branch *branch1 = [[Branch alloc] initWithDevice:devicebranch1];
Branch *branch2 = [[Branch alloc] initWithDevice:devicebranch2];
Branch *branch3 = [[Branch alloc] initWithDevice:devicebranch3];
Branch *branch4 = [[Branch alloc] initWithDevice:devicebranch4];
Branch *branch5 = [[Branch alloc] initWithDevice:devicebranch5];
Leaf *leaf = [[Leaf alloc] initWithDevice:deviceleaf];
Leaf *leaf2 = [[Leaf alloc] initWithDevice:deviceleaf2];
Leaf *leaf3 = [[Leaf alloc] initWithDevice:deviceleaf3];
Leaf *leaf4 = [[Leaf alloc] initWithDevice:deviceleaf4];
Leaf *leaf5 = [[Leaf alloc] initWithDevice:deviceleaf5];
Leaf *leaf6 = [[Leaf alloc] initWithDevice:deviceleaf6];
Leaf *leaf7 = [[Leaf alloc] initWithDevice:deviceleaf7];
Leaf *leaf8 = [[Leaf alloc] initWithDevice:deviceleaf8];
Leaf *leaf9 = [[Leaf alloc] initWithDevice:deviceleaf9];
Leaf *leaf10 = [[Leaf alloc] initWithDevice:deviceleaf10];
Leaf *leaf11 = [[Leaf alloc] initWithDevice:deviceleaf11];
Leaf *leaf12 = [[Leaf alloc] initWithDevice:deviceleaf12];
FunctionModelBranchItem *branchItem = [[FunctionModelBranchItem alloc] initWithRowCount:1];
[model addItem:branchItem];
[branch add:leaf];
[branch add:branch1];
[branch add:leaf2];
[branch1 add:branch2];
[branch1 add:leaf3];
[branch1 add:leaf4];
[branch2 add:leaf5];
[branch2 add:leaf6];
[branch2 add:branch3];
[branch3 add:leaf7];
[branch3 add:leaf8];
[branch2 add:branch4];
[branch4 add:leaf9];
[branch2 add:branch5];
[branch5 add:leaf10];
[branch5 add:leaf11];
[branch5 add:leaf12];
[self.view addSubview:self.tableView];
- 从UI实现:创建一个名为
BranchTableIView
的 UITableView 扩展类。
高级设置
IRHierarchyTreeTableView 可以与另一个强大的表格视图/集合视图框架完美结合:IRCollectionTableViewModel。
- 示例如下,您可以自定义您的 ViewModel
self.tableView = [[BranchTableIView alloc] init];
model = [[Model alloc] init];
model.delegate = self;
self.tableView.dataSource = model;
屏幕截图
Demo1 | Demo2 |
---|---|
![]() |
![]() |
Demo3 | Demo4 |
![]() |
![]() |