Hi,
I'm working on a slide show application, in that I have a Custom View which has a layer. On top of that layer I've several sub-layers. The custom view is enclosed in a scroll view. When the user switches to fullscreen, I'm calling enterFullScreenMode:withOptions: method on the custom view.

When I switch back to the window mode (using exitFullScreenMode:withOptions:), I'm facing several problems with the scrollers. If I drag the scrollers, they are scrolling back to the initial position, when I release the mouse. Scaling is also not working properly. The layer is going to the center of the view.
        
        Am I doing anything wrong here?

Here is the code. Thanks for any info/directions in resolving these issues.

- (IBAction)runSlideShow:(id)sender
{
        if ([displayBaseView isInFullScreenMode]) {
                [displayBaseView exitFullScreenModeWithOptions:nil];
                //Scale view back to the scalevalue.
                [self  scaleViewToValue:scaleValue];
                [NSCursor unhide];
        } else {
                [NSCursor hide];
                [self  scaleViewToValue:1.0f];
[displayBaseView enterFullScreenMode:[NSScreen mainScreen] withOptions:nil];
        }
}

- (void)scaleViewToValue:(float)theValue
{
        scaleValue = theValue;
        
        [displayBaseView.layer setTransform:CATransform3DIdentity];
[displayBaseView.layer setTransform:CATransform3DMakeScale(theValue, theValue, 1.0f)];
        
        NSView *clipView = [[displayBaseView enclosingScrollView] contentView];
NSSize newBoundsSize = NSMakeSize(NSWidth([clipView frame])/theValue, NSHeight([clipView frame])/theValue);
        [clipView setBoundsSize: newBoundsSize];
}


Thanks
Kishore
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to