Hi all,
I am making an application in which:
1. when user selects display menu option -> the window is displayed over whole screen and
2. when user selects hide menu option - >the window which was visible over whole screen gets hidden.
Problem is -
Can anyone suggest me, how can I resolve it?
Below is the part of code:
Thanks,
Monaj
I am making an application in which:
1. when user selects display menu option -> the window is displayed over whole screen and
2. when user selects hide menu option - >the window which was visible over whole screen gets hidden.
Problem is -
When I am performing step 1 then step 2nd then step 1, the window does not appear as it appeared for the first time.
Can anyone suggest me, how can I resolve it?
Below is the part of code:
Code:
- (IBAction)hideMenuAction:(id)sender
{
[window orderOut:nil];
if (CGDisplayRelease( kCGDirectMainDisplay ) != kCGErrorSuccess) {
NSLog( @"Couldn't release the main display!" );
}
}
- (IBAction)displayMenuAction:(id)sender
{
[window makeKeyAndOrderFront:nil];
if (CGDisplayCapture( kCGDirectMainDisplay ) != kCGErrorSuccess) {
NSLog( @"Couldn't capture the main display!" );
}
[window setLevel:CGShieldingWindowLevel()];
}
Thanks,
Monaj