MTPhotoPicker 0.1.1

MTPhotoPicker 0.1.1

测试已测试
语言语言 Obj-CObjective C
许可协议 MIT
发布最新发布2015年10月

Ulyanov Dima 维护。




  • 作者
  • Ulyanov Dmitry

MTPhotoPicker 是一个具有自定义和旋转支持的 iMessage 风格的照片选择器,适用于您的应用程序

特性

  • 自动解析图库
  • 您可以自定义按钮/添加您自己的
  • 流畅的动画和 iMessage 风格的设计
  • 支持屏幕旋转

屏幕截图

enter image description here

使用方法

要运行示例项目,请首先从 Example 目录克隆仓库,然后运行 pod install

或者

创建照片选择器对象

MTPhotoPicker * _pickerView = [MTPhotoPicker pickerWithTitle:@"Choose Photo" alternateTitle:@"Attach photos (%ld)" otherTitles:@[@"Choose video",@"Capture"] cancelTitle:@"Cancel"];

实现委托方法

#pragma mark - MTPhotoPickerDelegate
-(BOOL)photoPickerShouldDismissWithAssets:(NSArray *)assets{
    return YES;
}

-(void)photoPickerAssetsSelected:(NSArray *)assets{
    //use ALAsset array
}


-(void)photoPickerDidDismiss{

    _pickerView = nil;

}

-(void)photoPickerButtonItemClicked:(NSInteger)itemInedx{
    //handle custom  buttons click
}

显示选择器

[_pickerView loadAssets:^{       
    [self.pickerView showInView:self.view];
}];

要求

安装

MTPhotoPicker 通过 CocoaPods 提供。要安装它,只需在 Podfile 中添加以下行

pod "MTPhotoPicker"

作者

Ulyanov Dmitry, [email protected]

许可协议

MTPhotoPicker 在 MIT 许可协议下提供。有关更多信息,请参阅 LICENSE 文件。