Odd Translucent Navigation Bar Side Affect
February 5, 2014
Yesterday I was working on my Objective-C iOS app that has a navigationBar
with leftBarButton
and rightBarButton
as well as a custom TitleView
. I noticed a weird side affect when setting the translucent property on the navigationBar
like so:
You see, the rest of my view is a drawing context made with the CoreGraphics framework. When the translucent property is set to YES, everything works fine, but when it is set to NO, the drawing board goes crazy as you can see in the the picture on the left when it should be like the picture on the right which has the translucent property set to YES.
It appears that the brush strokes are falling off the view and not being drawn continuously. I didn’t think I was doing anything out of the ordinary with my drawing board, but there seems to be some issues in iOS 7 with translucent property affecting other parts of the view. It is possible something else in my app is interfering, but regardless, this is odd behavior to happen just by changing a boolean value. Comment if you have an idea of why, otherwise, I hope you enjoyed this little adventure.
Tweet