The video on this page was made using Xcode 9 beta 6.
Make sure there are good entries for Product Name (this will become the app name), Organization Name, and Organization Identifier. Language should be set to Swift.
Copy items if needed should be checked ON.
Before you add the Tin Framework into your Project, you will need a copy of the Framework. You can download the framework from the GitHub repo, and build it yourself. Or, find the latest release, and there will be a zip of the framework binary. The latest release at this time is here. Here is a direct link to the framework zip.
Note that doing this also adds Tin to the Linked Frameworks and Libraries section.
Note TController is a subclass of NSViewController.
override func viewWillAppear() {
super.viewWillAppear()
}
Add this code to the viewWillAppear method, after the call to super.viewWillAppear().
makeView(width: 800.0, height: 400.0) let scene = Scene() present(scene: scene)
a. The makeView method will create a TView object, and assign it to the controller's view property. The arguments width and height will set the window and view size.
b. The second line creates an instance of a Scene object.
c. The third line sets the Scene object as the current scene for the TView object. The TView object will draw and update the scene inside the view.
class Scene: TScene {
override func update() {
background(gray: 0.5)
}
}
MakeANewTinProject from Loren Olson on Vimeo.