//
//  SelectPhotoView.m
//  ALand
//
//  Created by Z on 16/4/5.
//  Copyright © 2016年 Z. All rights reserved.
//

#import "SelectPhotoView.h"

@interface SelectPhotoView ()<UIImagePickerControllerDelegate, UINavigationControllerDelegate>
@property (nonatomic, assign) CGFloat viewHeight;
@end

@implementation SelectPhotoView

- (void)setFrame:(CGRect)frame {
    [super setFrame:frame];
    self.viewHeight = frame.size.height;
}

- (void)showView {
    WS(weakSelf)
    CLog(@"%f",self.viewHeight);
    [UIView animateWithDuration:0.3 animations:^{
        weakSelf.bottom = kHeight;
    }];
}
- (void)hideView {
    WS(weakSelf)
    [UIView animateWithDuration:0.3 animations:^{
        weakSelf.top = kHeight;
    }];
}

- (IBAction)cameraAction:(id)sender {
    self.takePhotoBlock();
}

- (IBAction)galleryAction:(id)sender {
    self.galleryBlock();
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
