I like what Apple is doing in the App Store and I think it is worth the 30%. In any case, it is good to know other options
Post
Replies
Boosts
Views
Activity
Ok, thank you. A MacBook Air M1 refurbished now seems a good value.
If I use dispatch, what is the best way to wake up the computer if it is sleeping?
The answer related to NSTitlebarAccessoryViewController I do not understand. Probably they give as known some steps that I do not know. That is what I have tried:
1- I put a Window Controller from the Library
2- I suppose I have to create a new document? File > New File > Cocoa Class > Class WindowController / Subclass of NSWindowController / Also create XIP NOT selected. How do I connect that with the main window?
3- Do I have to put a button on that new Window controller?
4- I just do not understand the next step: "I connected the accessory view to an outlet (cleverly named accessoryView) in my NSWindowController subclass"
Thank you. I saw that answer before making the question but those options do not work for me or perhaps I do not understand. One answer only accepts some kind of buttons, another seems objective-c? and the other I just do not understand. Thank you in any case. I will try to solve the problem in another way.
In your answer you say "Create a Container View..." That's in the image. Did you mean a Custom View? In any case, the problem is the same in macOS
I tried many things and I cannot make it work for macOS. Then I tried with iOS and it worked well easily. There must be something in macOS that must be different. Perhaps what is different is the height of the Container View and its View Controller. I tried different options and none worked for me.
It works very well. Thank you. If I understand, this only works if the app only has one window. If it has more windows the menu items will not be active if the user is in another window.
There must be something I do wrong or do not understand in point 2: I select the Window Controller > Identity Inspector > Class > I cannot change it. I write MyWindowController and when I make intro or go away, it disappears. What am I missing? (in point 1 I have created File > New > Cocoa Class > Class: MyWindowController, Subclass of NSViewController, no XIP selected)
It works very well. Thank you.
How would it be if I call the window from an item menu?
(control drag from an item menu to the AppDelegate to create an @IBAction)
It works perfectly. Thank you!
Like with my code I can run but I only get result 2 when I click a second time to the button. I suppose that it means that the functions do not go one after the other.
It gives me an error I do not understand: Escaping closure capture non-escaping parameter 'completion'
Thank you. I love to learn new things!
It works very well. Thank you!
Can you explain this line? Where can I learn more about it?:
let usableHight = NSMenu.menuBarVisible() ? totalHight - 23 : totalHight
I would like to learn more. I understand what it does, but I do not know what it is or how to reproduce in another circumstance.