class - iOS Size Classes, Uninstalled Views and Outlets -
i have outlet uilabel. label "installed" width , height, "uninstalled" compact width , height.
when run project iphone 5 simulator (compact width, height), can still see valid outlet. why this? shouldn't nil or something? thinking valid hidden (i can't see outlet, ishidden false). happens it?
what missing?
thanks in advance!
from apple's size classes design help
a runtime object uninstalled view still created. however, view , related constraints not added view hierarchy , view has superview property of nil. different being hidden. hidden view in view hierarchy along related constraints.
if @ superview
property of uninstalled uilabel
see nil
.
if outlet nil have issues if tried access it; code have explicitly check active size class , adapt behaviour. still creating object not adding view hierarchy code can still operate on label, operations won't have visible effect.
Comments
Post a Comment