[view sizeToFit];
[view setNeedsLayout];
20 jan. 2023 kl. 09:29 skrev Luke <luke....@gmail.com>:
My app currently won't layout quite right when it initially displays a vertical split pane.The divider isn't drawn the whole height on first drawing.
<BadLayout.png>However, if (in this case), I flip between the tabs of the parent view, then the split pane and its vertical divider _do_ size and draw correctly:
<GoodLayout.png>I suppose I could hack in a programmatic switch between the tabs when the app first loads and displays, but perhaps there are other ideas about what might fix this discretely, or some other trick to more elegantly force the resize/layout of the view hierarchy once the cib has been loaded and initialized?As far as I can tell, all the sizes of the views are correct in the original xib, and as noted, the sizing does behave correctly once you've 'poked' it (and continues to behave well after that as you move dividers, switch tabs or resize the whole window). Therefore, it does seem to be an initialization/first sizing thing.
--
You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objectivej+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/objectivej/22a83064-18b0-476c-b646-83348883a5acn%40googlegroups.com.
<GoodLayout.png><BadLayout.png>