Skip to content

Instantly share code, notes, and snippets.

@beefon
Created January 15, 2013 13:39
Show Gist options
  • Save beefon/4538704 to your computer and use it in GitHub Desktop.
Save beefon/4538704 to your computer and use it in GitHub Desktop.
Вот как я юзаю BFImage.
NSImage *backgroundImage = [[NSImage imageNamed:@"PopoverBackgroud.png"] stretchableImageWithEdgeInsets:[self backgroundImageInsets]];
NSImageView *backgroundImageView = [[NSImageView alloc] initWithFrame:contentRect];
backgroundImageView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
backgroundImageView.imageScaling = NSImageScaleAxesIndependently;
backgroundImageView.image = backgroundImage;
[_positioningWindow.contentView addSubview:backgroundImageView];
[backgroundImageView release];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment