wenzhaot / InstagramPhotoPicker

Present Image Picker like Instagram
MIT License
449 stars 71 forks source link

There will be a padding between topView and CollectionView #13

Closed dreamgo closed 9 years ago

dreamgo commented 9 years ago

I add a navigationController to the photoPickerView, However, there will a padding between topView and collectionView. I tried to adjust the collection position to fix it, however, when I scroll the view or tap dragbar. the padding will be return back. Any idea?

Thanks! screen shot 2015-04-27 at 2 16 38 pm

wenzhaot commented 9 years ago
    TWPhotoPickerController *photoPicker = [[TWPhotoPickerController alloc] init];

    photoPicker.cropBlock = ^(UIImage *image) {
        //do something
        self.imageView.image = image;
    };

    UINavigationController *navCon = [[UINavigationController alloc] initWithRootViewController:photoPicker];
    [navCon setNavigationBarHidden:YES];

    [self presentViewController:navCon animated:YES completion:NULL];
dreamgo commented 9 years ago

Thanks for your reply. It works well. However , when I commented out this line [navCon setNavigationBarHidden:YES]; the problem still exists. What I need in my project is always keep the navBar. Any idea? thanks.

dreamgo commented 9 years ago

Whatever the problems can be fixed by adding navbar to each subview.