Hi everyone, I was just wondering if there are any macOS app developers on here that could tell me some good resources to help me learn to make apps for macOS. I currently know enough to make apps on iOS, but cannot seem to figure out macOS. Any links or references will be really appreciated!
Post
Replies
Boosts
Views
Activity
Hey Everyone, I am new to macOS development and am currently working on a project using storyboards where I would like a menu item in the main menu to be set to enabled when the user clicks on an row in a NSTableView.
Here is the code I am currently using in my ViewController:
let mainMenu = NSApplication.shared.mainMenu!
func tableViewSelectionDidChange(_ notification: Notification) {
if assetTableView.numberOfSelectedRows > 0 {
mainMenu.item(withTitle:"Edit")?.submenu?.item(withTag:0)!
.isEnabled = true
}
}
My project is setup to have a button called "Edit Asset" disabled on start until the user selects a row from an NSTableview to edit. Once they have a row selected I would like the main menu item "Edit Asset" to be enabled.
I used print statements to confirm that the code above does execute as well as has the correct menu item selected, yet it will still stay disabled during testing.
My only assumptions are that I am accessing a new or different instance of the main menu rather than the desired one, or I need to create a delegate protocol and tell the AppDelegate file to disable it for me. (Though these could be wrong approaches anyway)
I am quite stuck, so any suggestions or solutions would be greatly appreciated!
I know this may not be the place to post this but I can't think of any where else so bare with me:
I have been looking everywhere online and cannot seem to find an answer to this anywhere else but, Is there any place online where people can join a community of other native iOS developers to chat, make connections and work on projects together?
I really want to team up with other like minded developers to make amazing projects, to help improve my own skills as well as getting better at working in a team and even making friends in the process.
I have tried Reddit subs regarding iOS development but no one seems friendly or interested in some form of community. Any recommendations would be greatly appreciated.