通过 UINavigationController push 出一个新页面, 但是页面被 push 之后是透明的, 没有显示任何 UI, 就导致当前 Controller 上面有一个透明的层, 点击当前页面就没有任何反应, 但是通过 Xcode 自带的Debug view Hierarchy可以看到新页面已经push, 但是手机上并没有显示
可能是我叙述的不够清楚, 不是没有设背景色, 页面是是有 UI 的, 平时都没问题, push 之后 UI 就显示了, 然后拉接口刷新页面, 偶尔会出现这种情况, 点击 push 之后代码执行了, 页面也 push 了, 但是手机上没有显示, 只能用Debug view Hierarchy才能看到
The problem has been found. It is a defect of the system's NavigationController. Swipe right two or three times on the root page of NavigationController and then execute push. This problem will occur. The NavigationController has been rewritten to solve it
The default color of UIViewController should be clearColor
You need to set a self.view.backgroundColor
Don’t worry about this problem. In actual development, would you push a transparent viewController?
The background color is not set, the default is transparent