Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing contentView accessor - fix for keyboard access crash #9

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SFBPopover.m
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ - (id) initWithContentViewController:(NSViewController *)contentViewController

NSView *contentView = [_contentViewController view];
_popoverWindow = [[SFBPopoverWindow alloc] initWithContentRect:[contentView frame] styleMask:0 backing:NSBackingStoreBuffered defer:YES];
[_popoverWindow setContentView:contentView];
[_popoverWindow setPopoverContentView:contentView];
[_popoverWindow setMinSize:[contentView frame].size];

CAAnimation *animation = [CABasicAnimation animation];
Expand Down
5 changes: 5 additions & 0 deletions SFBPopoverWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
// ========================================
@interface SFBPopoverWindow : NSWindow

// ========================================
// Popover content view property
- (NSView *_Nullable)popoverContentView;
- (void)setPopoverContentView:(NSView *_Nullable)view;

// ========================================
// Popover window properties
- (SFBPopoverPosition) popoverPosition;
Expand Down
6 changes: 3 additions & 3 deletions SFBPopoverWindow.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ - (BOOL) canBecomeMainWindow
return NO;
}

- (NSView *) contentView
- (void) setContentView:(NSView *)view
{
return _popoverContentView;
[self setPopoverContentView:view];
}

- (void) setContentView:(NSView *)view
- (void) setPopoverContentView:(NSView *)view
{
if([_popoverContentView isEqualTo:view])
return;
Expand Down