iOS 13.3. UIToolbar button array reloaded fails to redraw a button.

Hi ,


We have used UIToolbar inside our app. We have added UIBarButtonItems to that toolbar.

Each UIBarButtonItem is initialized using CustomView. All CustomViews used for UIBarButtonItems are UIButtons except one.


For one of the UIBarButtonItem, we derived a Custom view from UIView and inside its overridden Draw function we have drawn shapes.


The toolbar loads fine very first time and shows shapes correctly.The overridden Draw function gets called.


But when we reload tollbar by changing its buttons array, the overridden Draw function is not getting called. And a blank space is seen at that place because nothing gets drawn.


The same code works fine for iOS < 13.


What is the issue with iOS 13?

iOS 13.3. UIToolbar button array reloaded fails to redraw a button.
 
 
Q