objective c - How to Override NSScrollView's -tile When Using AutoLayout -
what i'm doing
i have nsscrollview subclass. in it, override tile method drop contentview's frame height 1 can custom drawing of top border (as explained here: nsscrollview: fade in top-border messages.app)
 - (void) tile {     id contentview = [self contentview];     [super tile];      nsrect newrect = [contentview frame];     newrect.size.height -= 1.0f;     newrect.origin.y += 1.0f;     [contentview setframe:newrect]; }   when autolayout enabled, message:
layout still needs update after calling -[lpautoborderscrollview layout]. lpautoborderscrollview or 1 of superclasses may have overridden -layout without calling super. or, may have dirtied layout in middle of updating it. both programming errors in cocoa autolayout. former pretty arise if pre-cocoa autolayout class had method called layout, should fixed.
and scrollview not scroll properly. attempting causes bit of flickering (as if clipview moving content , snapping back)
the issue
obviously, [super tile] triggering layout , subsequent modification contentview frame qualifies "dirtying layout in middle of updating it". 
so, how take care of layout issue?
note: i'm relatively new autolayout. every year or try adopting , end running headaches force me abandon it. time, i'm making effort damn thing.
 
 
Comments
Post a Comment