Posts

Post not yet marked as solved
1 Replies
536 Views
for example. I want to create 100 items (rows). each item(row) will have 100% width and height for ((i+1)*10) : item-row 0 = height 10. item-row 1 = height 20. item-row 2 = height 30 this is just for testing purpose, but i will have real fixed heights before loading the collection view. with flow layout I used _:layout:sizeForItemAt: and got set the size from my model-entities how can i achieve this with compositional layout ? I don't want to use Self size cell or/and auto layout. just continue to set the height my self, but enjoy the other benefits of the compositional layout. i will use it on appkit and uikit. thanks.
Posted
by ec100.
Last updated
.
Post marked as solved
3 Replies
1.1k Views
spend X hours on this. test *** combinations.I have mac OS app without storyboard.I also have menu status bar.I click on the manu status bar to hide/unhide my app.- (void) menuBarControllerStatusChanged: (BOOL) active { if([[NSApplication sharedApplication] isHidden]) { NSImage *image = [UIImage imageNamed:@"newsFeedsAlertOFF"]; self.mainStatusBar.image = image; NSAssert(self.windowController!=nil, @"window controll is nil"); NSAssert(self.windowController.window!=nil, @"window is nil"); [[NSApplication sharedApplication] unhide:self]; [self.windowController.window makeKeyAndOrderFront:self]; [[NSApplication sharedApplication] activateIgnoringOtherApps:YES]; } else { [NSApplication sharedApplication] hide:self]; [[NSApplication sharedApplication] deactivate]; } }The problem :on unhide, the app is visible and active (focused) BUT the NSWindow 3 button are gray color.ONLY if I active another app (safari for example) and return to my app, then the NSWindow 3 buttons are display with color.In what situation the NSWindow is active and the 3 buttons are gray ? If there is no "normal" situation, maybe I need to report bug ?attention 1 : I don't use storyboard. everthing is created by code (EXCEPT the MainMenu.xib)attention 2 : this was tested on Mojave and Catalina .attention3 : the 3 buttons are flickering for 0.1 seconds with their color and then turn gray.(with this sample code, but not in all code combinations I tested)Thanks in adavnce.
Posted
by ec100.
Last updated
.