Search code examples
iosswiftautolayoutxibprogrammatically-created

Custom xib view is not visibly displayed when programmatically invoked


Here are several properties which I have already checked.

  • isHidden = false
  • (lldb) po ghostingShimmerView.frame ▿ (0.0, 0.0, 375.0, 667.0) ▿ origin : (0.0, 0.0) - x : 0.0 - y : 0.0 ▿ size : (375.0, 667.0) - width : 375.0 - height : 667.0
  • The xib's instance is not nil, ShimmerView: 0x7fea24914d90; frame = (0 0; 375 667); layer = <CALayer: 0x608000225440>>
  • When I click on debug view hierarchy button, I can clearly see the xib's view is present, and no views are in front of it, however in the simulator and phone it is not displaying.

What are the other potential causes?


Solution

  • The only other thing I can think of that could cause this is a mask, or a low alpha value.