Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

打开相册, 照片顶部被导航栏遮盖 #10

Closed
guorenlei opened this issue Jun 5, 2020 · 4 comments
Closed

打开相册, 照片顶部被导航栏遮盖 #10

guorenlei opened this issue Jun 5, 2020 · 4 comments

Comments

@guorenlei
Copy link

UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.allowsEditing = YES;

imagePicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
[self presentViewController:imagePicker animated:YES completion:nil];
@wwmz
Copy link
Owner

wwmz commented Jun 5, 2020

UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.allowsEditing = YES;

imagePicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
[self presentViewController:imagePicker animated:YES completion:nil];

你在哪里调用这代码啊 我在子控制器调用没啥问题呀

@guorenlei
Copy link
Author

UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.allowsEditing = YES;

imagePicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
[self presentViewController:imagePicker animated:YES completion:nil];

你在哪里调用这代码啊 我在子控制器调用没啥问题呀

在WMZCustomOnePage这个控制器中调用会有问题

@guorenlei
Copy link
Author

@implementation WMZCustomOnePage

  • (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.

    __weak WMZCustomOnePage *weakSelf = self;

    self.view.backgroundColor = [UIColor whiteColor];

    self.navigationController.navigationBar.backgroundColor = [UIColor yellowColor];

    UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
    imagePicker.delegate = self;
    imagePicker.allowsEditing = YES;

    imagePicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
    [self presentViewController:imagePicker animated:YES completion:nil];

这样调用会有问题, 在我的项目中, 只要显示了这个控制器, push到新的页面, 照片选择的时候顶部图片也是被遮挡。

@wwmz
Copy link
Owner

wwmz commented Jun 7, 2020

@implementation WMZCustomOnePage

  • (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    __weak WMZCustomOnePage *weakSelf = self;
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationController.navigationBar.backgroundColor = [UIColor yellowColor];
    UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
    imagePicker.delegate = self;
    imagePicker.allowsEditing = YES;
    imagePicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
    [self presentViewController:imagePicker animated:YES completion:nil];

这样调用会有问题, 在我的项目中, 只要显示了这个控制器, push到新的页面, 照片选择的时候顶部图片也是被遮挡。

没重现到 你加我q 925457662给我看图吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants