0 Replies
      Latest reply on Mar 19, 2019 10:19 AM by itisme
      itisme Level 1 Level 1 (0 points)

        I'm not sure if this is the correct place for this question, so apologies if this belongs somewhere else, just let me know.


        I am trying to add a configuration sheet to a screensaver I have developed in XCode 10.1, but after installing the .saver file pressing the "Screen Saver Options" button doesn't open my window, and other tutorials seem to be too far out of date. So far, this is what I have:


        I have made a window in Interface Builder called ConfigureSheet.nib

        My .m file contains the following relavent code:

        - (BOOL)hasConfigureSheet
            return YES;
        - (NSWindow*)configureSheet
            NSBundle* configBundle;
            if (configureSheet == nil ) {
                [configBundle loadNibNamed:kConfigSheetNIB owner:self topLevelObjects:nil];
            [shouldFadeCheckbox setState: isFading];
            return configureSheet;
        - (IBAction) cancelSheetAction: (id) sender {
            //  close the sheet without saving the settings
            [NSApp endSheet: configureSheet];
        - (IBAction) okSheetAction: (id) sender {
            //  record the settings in the configuration sheet
            isFading = [shouldFadeCheckbox state];
            [NSApp endSheet: configureSheet];

        My .h file contains the following relavent code:

        #define kConfigSheetNIB @"ConfigureSheet"
        @interface My_ScreensaverView: ScreenSaverView {
            IBOutlet NSWindow* configureSheet;
            IBOutlet id shouldFadeCheckbox;
            BOOL isFading;
             [all of my initialized variables]
        - (IBAction) cancelSheetAction: (id) sender;
        - (IBAction) okSheetAction: (id) sender;


        Can anyone help?