开发者

Cocoa NSImage full view question

I am trying to automatically load an image full screen after the application is launched but it looks just a little bit funky. The outside edge of the image view can be seen - how do I eliminate that? My code looks like this:

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {

    NSImage *imageFromBundle = [NSImage imageNamed:@"Screen.png"];
    [image setImage:imageFromBundle];


    [image enterFullScreenMode:[window screen] withOptions:nil];
}

He开发者_如何学JAVAre is the Image:

Cocoa NSImage full view question


Set your image view's border to none before you take it full screen. If you want, change it back when coming back from full screen, or use a separate image view for full-screen.

Also, you should name your variables more descriptively. A variable named “image” should contain a pointer to an image, not to an image view. Consider it naming imageView instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜