Post

Replies

Boosts

Views

Activity

Reply to UITabBarController crashes when editing the items
Until 26.4 is generally available, I have found an ugly, but usable, workaround: First perform method swizzling to replace addSubiew:, then in the replacement implementation do nothing when a view is being added to it self This will avoid the crash, but results in a graphic glitch where the selection overlay is opaque over some tabs. Very ugly. To solve this problem: Implement the tab-bar-controller delegate method to detect when customization has ended. When it has ended, set the tab-bar-controller's view-controllers to just the first view-controller, without animation. Then immediately restore the original set of view-controllers, again without animation. This will force the tab-bar to refresh and resolve the graphic glitch from (1) Finally, set the more-view-controller as the selected-view-controller again, since the re-setting of view-controllers in (2) will reset the selected tab. With the above, I do not experience crashes, and there is about 1/2 a second of visual "glitching", but things is otherwise find afterwards. Lastly, note that (2) will reset customizable-view-controllers.
Topic: UI Frameworks SubTopic: UIKit
3w
Reply to UITabBarController crashes when editing the items
Until 26.4 is generally available, I have found an ugly, but usable, workaround: First perform method swizzling to replace addSubiew:, then in the replacement implementation do nothing when a view is being added to it self This will avoid the crash, but results in a graphic glitch where the selection overlay is opaque over some tabs. Very ugly. To solve this problem: Implement the tab-bar-controller delegate method to detect when customization has ended. When it has ended, set the tab-bar-controller's view-controllers to just the first view-controller, without animation. Then immediately restore the original set of view-controllers, again without animation. This will force the tab-bar to refresh and resolve the graphic glitch from (1) Finally, set the more-view-controller as the selected-view-controller again, since the re-setting of view-controllers in (2) will reset the selected tab. With the above, I do not experience crashes, and there is about 1/2 a second of visual "glitching", but things is otherwise find afterwards. Lastly, note that (2) will reset customizable-view-controllers.
Topic: UI Frameworks SubTopic: UIKit
Replies
Boosts
Views
Activity
3w