Skip to content
Open
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
27 changes: 18 additions & 9 deletions ButtonTest/ButtonViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,28 @@ - (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn
- (NSTableRowView *)tableView:(NSTableView *)tableView rowViewForRow:(NSInteger)row{

NSTableRowView *rowView = [[NSTableRowView alloc] init];

NSView *buttonSuperView = rowView;

if (row % 2 == 0) {
NSVisualEffectView *vibrancyView = [[NSVisualEffectView alloc] init];

vibrancyView.blendingMode = NSVisualEffectBlendingModeBehindWindow;

[rowView addSubview:vibrancyView];
[vibrancyView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(rowView);
}];
}

MXButton *testButton = self.examples[row];
[rowView addSubview:testButton];
[buttonSuperView addSubview:testButton];
[testButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.equalTo(rowView);
make.center.equalTo(buttonSuperView);
}];


return rowView;
}

- (void)tableView:(NSTableView *)tableView didAddRowView:(NSTableRowView *)rowView forRow:(NSInteger)row
{
if (row % 2 == 0){
rowView.backgroundColor = [NSColor colorWithCalibratedWhite:0.0 alpha:0.15];
}
}

@end