<UIImagePickerControllerDelegate,UINavigationControllerDelegate>
self.headImageView.userInteractionEnabled = YES;
UITapGestureRecognizer * tapGesture = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(respondToTapGesture:)];
[self.headImageView addGestureRecognizer:tapGesture];
-(void)respondToTapGesture:(UITapGestureRecognizer *)gestrue{
UIImagePickerController * imageController = [[UIImagePickerController alloc]init];
imageController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info{
UIImage *image = info[@"UIImagePickerControllerEditedImage"];
self.headImageView.image = image;
[self dismissViewControllerAnimated:YES completion:nil];
}