Post

Replies

Boosts

Views

Activity

Comment on Buttons in the title bar
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"
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’22
Comment on Buttons in the title bar
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.
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’22
Comment on Scroll View with text and img inside
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.
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’21
Comment on Open a View from the menu
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)
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’21
Comment on Usable screen space in a Mac
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.
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Comment on Submit an macOS app and Xcode version
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
Replies
Boosts
Views
Activity
Jul ’22
Comment on Submit an macOS app and Xcode version
Ok, thank you. A MacBook Air M1 refurbished now seems a good value.
Replies
Boosts
Views
Activity
Jul ’22
Comment on Do something at a specific time
If I use dispatch, what is the best way to wake up the computer if it is sleeping?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’22
Comment on Buttons in the title bar
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"
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’22
Comment on Buttons in the title bar
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.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’22
Comment on Scroll View with text and img inside
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
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’21
Comment on Scroll View with text and img inside
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.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’21
Comment on Open a View from the menu
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.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on Open a View from the menu
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)
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on How to open a view
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)
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on Completion with JSON
It works perfectly. Thank you!
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on Completion with JSON
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.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on Completion with JSON
It gives me an error I do not understand: Escaping closure capture non-escaping parameter 'completion'
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on Usable screen space in a Mac
Thank you. I love to learn new things!
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on Usable screen space in a Mac
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.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21