Git Product home page Git Product logo

menusapp's Introduction

When I started trying to write a Mac app for the first time, I started out knowing what I wanted to achieve but not knowing how to go about it. I spent a lot of time googling for Mac development help and found very little of it. What i did find was mostly related to Objective-C and not Swift/SwiftUI.

So, I spent a lot of time going round in circles, extracting the bits that I thought relevant and heading down a lot of blind alleys.

This project is part of a series of development notes I want to write to document some of the stuff I learnt along the way. The notes that go with it can be found on my web site.

There are three notes. The first deals with menus in general, the second with connecting your menu to the active view and the third with popup context menus:

Menus

Menus and View Models

Context Menus

Menus

The Menus note walks you through modifying the existing menus provided by the template MacOS app and shows how to add a custom menu to it.

Display menu

The note goes on to show how to create toggle switches and to create sub-menus using a Pcker.

Menus and View Models

A lot can be achieved using simple menus. However, the power of menus comes from being able to interact between the menu and the currently active window (view). In this note, I go over the mechanism that allows a menu to read from a views view model and to call functions in that view model, giving us a simple mechanism to customise and respond to menu items.

View Model Menu

Context Menus

The third note covers the use of popup context menus. These are menus attached to a specific UI element that provide menus with functionality specific to that element.

Context Menus

menusapp's People

Contributors

sabarnett avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.