Swift macOS Tutorial: OutlineView (Tree Controller, Cocoa bindings, add and remove nodes)

preview_player
Показать описание
In this Swift macOS tutorial video we'll look at using Cocoa bindings in an OutlineView and a Tree Controller, to allow you to add or remove nodes from your outline view using the tree controller.

00:00 Intro
00:33 Create Node class
02:48 Adding UI elements in Storyboard
03:27 Tree Controller bindings
04:32 Column bindings
04:58 Table View Cell bindings
05:39 selectionIndexPaths bindings
06:18 Connecting UI to Storyboard
06:58 Building the Buy action
10:47 Testing the add functionality
12:10 Building the Remove action
12:53 selectionIndexPaths explanation
14:24 Deleting selected Node
16:24 End

Subscribe for more content, as I will be creating more tutorial and how-to videos for coding in Swift, as well as longer tutorials on building macOS apps.

If you'd like to support my work to help me improve video quality and bring more content, please consider donating to my PayPal:

Thank you for watching!

Huge thank you to the channels below for helping me get started!
Uncreated Light Press
and

Mr. Macintosh
and

The Apple Ninja
Рекомендации по теме
Комментарии
Автор

How to use OutlineView and TreeController via Cocoa Bindings in macOS Swift! I hope you enjoy the video!

swift_goose
Автор

Thanks for the practical example! It's pretty similar to ArrayController it looks like.

thewayasmr
Автор

Great vid Swift Goose! Thanks for sharing!

AppleNinja
Автор

Great Video, and this was exactly what I've been looking for. It didn't work for me the first four times I went through it. I was determined I wanted to know how to use OutlineView and TreeContoller. The app window would not display the Tree text info when I put in a number into About and then pressed Buy Chesecoin. What amazed me, was the only thing I had not followed exactly in the first four attempts was I did not enlarge the ViewController window as shown in the very beginning of working the StoryBoard. When I enlarged this from its basic default size, then everything worked... VERY IMPORTANT STEP.... Thanks again

jrhk
Автор

Another great video @Swift Goose, thank you!!

Mr.Macintosh
Автор

This is easy to follow, thanks for the upload!

etg