objective c - UIView with xib ignores size classes -


i'm working on custom notification view, must show on everything. achive i've implemented subview of separate uiwindow , works fine except layout: use size classes, , layout ignores it. here code use setup view:

notificationview *notificationview = [[[nsbundle mainbundle] loadnibnamed:@"notificationview"                                                                     owner:self                                                                   options:nil] firstobject]; uiwindow *window = [[uiwindow alloc] initwithframe:frame]; // additional window setup..  [window addsubview:notificationview]; 

you need add constraints, in code, relate 2 views after adding 1 other.

read here more information:

https://adoptioncurve.net/archives/2014/08/working-with-size-classes-in-interface-builder/


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -