gliubc
5/28/2019 - 2:15 AM

photo view

@interface PostLoanVC () <HXPhotoViewDelegate>

@property (weak, nonatomic) IBOutlet HXPhotoView *photoView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *constraintPhotoViewHeight;

    self.photoView.addImageName = @"detail_button_add";
    self.photoView.lineCount = 5;
    self.photoView.delegate = self;
    self.photoView.manager.configuration.restoreNavigationBar = YES;
    self.photoView.manager.configuration.albumShowMode = HXPhotoAlbumShowModePopup;

- (void)photoView:(HXPhotoView *)photoView updateFrame:(CGRect)frame {
    if (photoView == self.photoView) {
        [UIView animateWithDuration:0.25 animations:^{
            self.constraintPhotoViewHeight.constant = frame.size.height;
            [self.view layoutIfNeeded];
        }];
    }
}

        NSMutableArray<UIImage *> *images = [NSMutableArray new];
        NSMutableArray<NSString *> *imageNames = [NSMutableArray new];
        for (int i = 0; i < self.photoView.manager.afterSelectedArray.count; i++) {
            HXPhotoModel *model = self.photoView.manager.afterSelectedArray[i];
            UIImage *image = [Util getImageFromHXPhotoModel:model];
            [images addObject:image];
            NSString *imageName = [NSString stringWithFormat:@"topicimg-%@.png", [NSUUID UUID].UUIDString];
            [imageNames addObject:imageName];
        }