Re: sharing code between screensaver and regular app
Re: sharing code between screensaver and regular app
- Subject: Re: sharing code between screensaver and regular app
- From: Jonathan Prescott via Cocoa-dev <email@hidden>
- Date: Mon, 2 Mar 2020 20:48:03 -0500
When you created the application, you should have created two pairs of files,
AppDelegate.h/.m and ViewController.h/.m. The AppDelegate is used to augment
and tailor the behavior of the NSApplication that is implicitly created as part
of the AppKit framework. For your purposes, you may not need to implement this
code (however, you should look at the AppDelegate documentation to make sure).
The ViewController is derived from NSViewController, and is the container for
your screen saver view (which is probably derived from ScreenSaverView, which
is derived from NSView). An instance of this view is a property of your
ViewController.
If you look back at the link you referred to, you’ll see that is creating a
ViewController that will be a container for you screen saver view. Although
it’s in Swift, it should be straightforward to translate back into Objective-C
Jonathan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden