Dark background behind UINavigationBar in push transition from UICollectionViewController with iOS 7.1

StackOverflow https://stackoverflow.com/questions/22721221

質問

I'm having a little problem when trying to go to the next UIViewController from a UICollectionViewController. The problem is: While the next view is pushed, a black background seems to be added behind the right side of the navigation bar. I tried to replace the next view controller but the problem is still there. But when replacing the UICollectionViewController with another one, the problem vanishes.

Note: this problem seems to be an iOS 7.1 bug. Because i don't remember that it happened before I updated my devices.

Here is a Video of my problem if you didn't understand me

Anyone can help ?

Thank you all in advance and sorry for my english,

Bader

役に立ちましたか?

解決 3

Ok, i finally knew what caused this problem. That was because i added an ILTranslucentView as a subview of a UICollectionView cell. Also, using a UIToolbar instead causes the same issue ( i still believe this is an iOS 7.1 bug because this wasn't happening before ).

Solution: remove any UIToolbar from your view controller.

他のヒント

Setting self.navigationController.view.backgroundColor to the color you want will solve this problem.

I had exactly the same problem. It's a bug. UINavigationController view has a black background, and it spoils translucent Navigation Bar at transition time. To resolve this issue, you should change background of UINavigationController in code by this way: self.navigationController.view.backgroundColor = [UIColor whiteColor];

Or set view color of UINavigationController in Interface Builder: enter image description here

While the next view is pushed, in that view controller’s .m file remove self.edgesForExtendedLayout = UIRectEdgeNone; if you wrote in your code.

self.navigationController.navigationBar.translucent = NO

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top