拍照,获取系统相册,更改头像

2017-05-22  本文已影响3人  爱喝农药de清凉

pragma mark - 相机 相册

        imagePickerController.delegate = self;
        
        if (sourceType == UIImagePickerControllerSourceTypeCamera) {
            
               imagePickerController.allowsEditing = NO;
        }else{
        
                imagePickerController.allowsEditing = YES;
            
        }
       
        imagePickerController.sourceType = sourceType;
        
    }

    [self presentViewController:imagePickerController animated:YES completion:^{
        
    }];
}

pragma mark - 相册 代理 方法

[picker dismissViewControllerAnimated:YES completion:^{
  
}];

}

上一篇 下一篇

猜你喜欢

热点阅读