Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wigging/swift-macos

Swift Programming for macOS.
https://github.com/wigging/swift-macos

macintosh macos swift swift-programming swiftui

Last synced: 6 days ago
JSON representation

Swift Programming for macOS.

Awesome Lists containing this project

README

        

# 🍎 🖥 Swift Programming for macOS

There are plenty of books, videos, and online resources for developing iOS apps. Despite the fact that iPhone and iPad apps require a Mac for code development, there is very little information about actually creating native Mac applications. The examples in this repository and the accompanying articles demonstrate various aspects of Mac app development using the latest versions of Swift and SwiftUI.

## Contents

Links to articles that explain each code example are provided below. Code files are located in the scripts, xcode-projects, and xcode-playgrounds directories. Some articles do not have code files in this repository.

### Swift

- [Arrays](https://gavinw.me/notes/swift/arrays.html), `scripts/arrays.swift`
- [Comments](https://gavinw.me/notes/swift/comments.html)
- [Compiler optimizations](https://gavinw.me/notes/swift/compiler-optimizations.html)
- [Create a package](https://gavinw.me/notes/swift/create-package.html)
- [Date formatting](https://gavinw.me/notes/swift/date-formatting.html), `scripts/dateformatted.swift`
- [Defaults command line tool](https://gavinw.me/notes/swift/defaults-tool.html)
- [Dictionaries](https://gavinw.me/notes/swift/dictionaries.html)
- [Directory contents](https://gavinw.me/notes/swift/directory-contents.html)
- [Discardable result](https://gavinw.me/notes/swift/discardable-result.html)
- [Elapsed time](https://gavinw.me/notes/swift/discardable-result.html), `scripts/elapsedtime.swift`
- [Element-wise array addition](https://gavinw.me/notes/swift/element-array-addition.html), `xcode-projects/ArrayAddition/`
- [Flat indexing an N-dimensional array](https://gavinw.me/notes/swift/flat-indexing.html), `scripts/flat-indexing.swift`
- [Image from array data](https://gavinw.me/notes/swift/image-data.html), `xcode-playgrounds/ImageFromData/`
- [Image from colormap filter](https://gavinw.me/notes/swift/image-colormap.html), `xcode-playgrounds/ImageColormap/`
- [Install Xcode](https://gavinw.me/notes/swift/install-xcode.html)
- [Normalize array values](https://gavinw.me/notes/swift/normalize-array.html), `xcode-playgrounds/NormalizeArray/`
- [Package a library](https://gavinw.me/notes/swift/package-library.html)
- [Range](https://gavinw.me/notes/swift/range.html)
- [Read Eval Print Loop (REPL)](https://gavinw.me/notes/swift/repl.html)
- [Resources](https://gavinw.me/notes/swift/resources.html)
- [Strides](https://gavinw.me/notes/swift/strides.html)
- [Strings](https://gavinw.me/notes/swift/strings.html)
- [Terminal setup and commands](https://gavinw.me/notes/swift/terminal.html)

### SwiftUI

- [AppStorage](https://gavinw.me/notes/swiftui/appstorage.html), `xcode-projects/AppStorageProperty/`
- [Async for-in loop](https://gavinw.me/notes/swiftui/async-for-loop.html), `xcode-projects/AsyncForLoop/`
- [Blur effect](https://gavinw.me/notes/swiftui/blur-effect.html), `xcode-projects/BlurEffect/`
- [Button styles](https://gavinw.me/notes/swiftui/button-styles.html), `xcode-projects/ButtonStyles/`
- [Credits](https://gavinw.me/notes/swiftui/credits.html), `xcode-projects/Credits/`
- [Cursors](https://gavinw.me/notes/swiftui/cursors.html), `xcode-projects/Cursor/`
- [Display scale](https://gavinw.me/notes/swiftui/display-scale.html), `xcode-projects/DisplayScale/`
- [Grid lines](https://gavinw.me/notes/swiftui/grid-lines.html), `xcode-projects/GridLines/`
- [Heat map chart](https://gavinw.me/notes/swiftui/heatmap-chart.html), `xcode-projects/HeatMap/`
- [Image from colormap filter](https://gavinw.me/notes/swiftui/image-colormap.html), `xcode-projects/ImageColormap/`
- [Images and symbols](https://gavinw.me/notes/swiftui/images-symbols.html), `xcode-projects/Image/`, `xcode-projects/ImageSFSymbols/`, `xcode-projects/ImageSystem/`
- [Label](https://gavinw.me/notes/swiftui/label.html), `xcode-projects/LabelText/`
- [LabeledContent](https://gavinw.me/notes/swiftui/labeledcontent.html), `xcode-projects/LabeledContentExample`
- [Line chart](https://gavinw.me/notes/swiftui/line-chart.html), `xcode-projects/LineChart/`
- [Menu items](https://gavinw.me/notes/swiftui/menu-items.html), `xcode-projects/MenuItems/`
- [NSPasteboard](https://gavinw.me/notes/swiftui/nspasteboard.html), `xcode-projects/NSPasteboard/`
- [Open a window](https://gavinw.me/notes/swiftui/window-open.html), `xcode-projects/WindowOpen/`
- [Path markers](https://gavinw.me/notes/swiftui/path-markers.html), `xcode-projects/PathMarkers/`
- [Picker control](https://gavinw.me/notes/swiftui/picker-control.html), `xcode-projects/PickerControl`
- [Preferences window](https://gavinw.me/notes/swiftui/prefs-window.html), `xcode-projects/PreferencesWindow/`
- [ProgressView](https://gavinw.me/notes/swiftui/progressview.html), `xcode-projects/ProgressView/`, `xcode-projects/ProgressViewBackground/`
- [ScrollView](https://gavinw.me/notes/swiftui/scrollview.html), `xcode-projects/ScrollView/`
- [Sidebar DisclosureGroup](https://gavinw.me/notes/swiftui/sidebar-disclosuregroup.html), `xcode-projects/SidebarDisclosureGroup/`
- [Sidebar toggle](https://gavinw.me/notes/swiftui/sidebar-toggle.html), `xcode-projects/SidebarToggle/`
- [Sine wave](https://gavinw.me/notes/swiftui/sine-wave.html), `xcode-projects/SineWave/`
- [Stepper](https://gavinw.me/notes/swiftui/stepper.html), `xcode-projects/Stepper/`
- [Table](https://gavinw.me/notes/swiftui/table.html), `xcode-projects/TableBasic/`, `xcode-projects/TableSelection/`, `xcode-projects/TableSort/`
- [Text](https://gavinw.me/notes/swiftui/text.html), `xcode-projects/Text/`, `xcode-projects/TextFont/`, `xcode-projects/TextStyles/`, `xcode-projects/TextVertical/`
- [TextField](https://gavinw.me/notes/swiftui/textfield.html), `xcode-projects/TextField/`
- [Thee column NavigationView](https://gavinw.me/notes/swiftui/three-column-nav.html), `xcode-projects/ThreeColumnNav`
- [Toggle animation](https://gavinw.me/notes/swiftui/toggle-animation.html), `xcode-projects/ToggleAnimation/`
- [Toolbar dropdown](https://gavinw.me/notes/swiftui/toolbar-dropdown.html), `xcode-projects/ToolbarDropdown/`
- [Two column NavigationSplitView](https://gavinw.me/notes/swiftui/twocol-navsplit.html), `xcode-projects/TwoColNavSplit/`, `xcode-projects/TwoColNavSplitFill/`
- [Two column NavigationView](https://gavinw.me/notes/swiftui/two-column-nav.html), `xcode-projects/TwoColumnNav/`, `xcode-projects/TwoColumnNav2/`
- [View Tap Gesture](https://gavinw.me/notes/swiftui/viewtapgesture.html), `xcode-projects/ViewTapGesture/`
- [ViewBuilder](https://gavinw.me/notes/swiftui/viewbuilder.html), `xcode-projects/ViewBuilder/`
- [WebView](https://gavinw.me/notes/swiftui/webview.html), `xcode-projects/WebViewLoadHtml/`, `xcode-projects/WebViewLoadString/`, `xcode-projects/WebViewLoadUrl/`
- [Window and toolbar style](https://gavinw.me/notes/swiftui/window-toolbar-style.html), `xcode-projects/WindowStyle/`
- [Window default size](https://gavinw.me/notes/swiftui/window-defaultsize.html), `xcode-projects/WindowDefaultSize/`
- [Window resizability](https://gavinw.me/notes/swiftui/window-resizability.html), `xcode-projects/WindowResizability/`

### Accelerate

- [Absolute value](https://gavinw.me/notes/accelerate/absolute-value.html)
- [Complex multiplication](https://gavinw.me/notes/accelerate/complex-multiplication.html)
- [Matrix multiplication](https://gavinw.me/notes/accelerate/matrix-multiplication.html), `scripts/matmul-accel.swift`
- [Reverse array elements](https://gavinw.me/notes/accelerate/reverse.html)
- [Sort array values](https://gavinw.me/notes/accelerate/sort.html)

### Metal

- [Clear color](https://gavinw.me/notes/metal/clear-color.html), `xcode-projects/MetalClear/`
- [Color view with compute kernel](https://gavinw.me/notes/metal/color-compute.html), `xcode-projects/MetalColorCompute/`
- [Matrix multiplication](https://gavinw.me/notes/metal/matrix-multiplication.html), `scripts/matmul-metal.swift`
- [Noise](https://gavinw.me/notes/metal/noise.html), `xcode-projects/MetalNoise/`
- [Particles](https://gavinw.me/notes/metal/particles.html), `xcode-projects/MetalParticles/`
- [Sampler](https://gavinw.me/notes/metal/sampler.html), `xcode-projects/MetalSampler/`
- [Triangle](https://gavinw.me/notes/metal/triangle.html), `xcode-projects/MetalTriangle/`

## Contributing

If you have questions or find errors in the code examples then please submit an issue. Pull requests for new code examples are not accepted because this repository is for my own personal notes. However, pull requests to fix errors in existing code are welcome.

## Support

Support this project by using the **:heart: Sponsor** button at the top of this page. Thank you :smile:.

## License

Code in this repository is available under the MIT License - see the [LICENSE](LICENSE.md) file for more information.