Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift - Offscreen Rendering [closed]

I encountered as issue while debugging an app performance written in Swift. It is important note about Swift because the app uses code rewritten from Obj-C. I mean same methods and functions but in a different language.

I launched the app on the 9.3 simulator, turned on offscreen rendered coloring and everything were lightening with yellow.

enter image description here

But I know every element is optimised and it shouldn't look like that. Here how the same screen looks for Obj-C version. Only the status bar is highlighted and corners of the text input field below the table.

enter image description here

How could I deal with that? Is it my bad or a Swift bug in charge?

Edit: The issue is reproduced even for an empty table. Look for the Swift project and move on to ChatViewController. It contains only a tableView inherited from SLKTextViewController.

Edit2: The issue also could be reproduced on an empty project with just a navigation controller and its root view controller.

enter image description here

PS: A source code could be found here for a Swift version: https://github.com/Kilograpp/Mattermost-iOS-Swift

An Obj-C version: https://github.com/Kilograpp/Mattermost-iOS

like image 439
Mehdzor Avatar asked Aug 09 '16 16:08

Mehdzor


1 Answers

I've finally figured out what was it all about. When a root navigation controller has a translucent navigation bar it causes the issue.

like image 167
Mehdzor Avatar answered Oct 12 '22 10:10

Mehdzor