using properties instead of method invocation

This commit is contained in:
Michael Starke
2018-09-03 14:21:47 +02:00
parent c46a7c0dc7
commit f13cd4df35
3 changed files with 28 additions and 2 deletions

View File

@@ -0,0 +1,13 @@
//
// KPKEntry+MPCustomAttributeProperties.h
// MacPass
//
// Created by Michael Starke on 03.09.18.
// Copyright © 2018 HicknHack Software GmbH. All rights reserved.
//
#import <KeePassKit/KeePassKit.h>
@interface KPKEntry (MPCustomAttributeProperties)
@end

View File

@@ -0,0 +1,13 @@
//
// KPKEntry+MPCustomAttributeProperties.m
// MacPass
//
// Created by Michael Starke on 03.09.18.
// Copyright © 2018 HicknHack Software GmbH. All rights reserved.
//
#import "KPKEntry+MPCustomAttributeProperties.h"
@implementation KPKEntry (MPCustomAttributeProperties)
@end

View File

@@ -112,7 +112,7 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) {
}
- (KPKEntry *)representedEntry {
if([self.representedObject isKindOfClass:[KPKEntry class]]) {
if([self.representedObject isKindOfClass:KPKEntry.class]) {
return self.representedObject;
}
return nil;
@@ -127,7 +127,7 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) {
[self.tabView bind:NSSelectedIndexBinding toObject:self withKeyPath:NSStringFromSelector(@selector(activeTab)) options:nil];
self.attachmentTableView.backgroundColor = [NSColor clearColor];
self.attachmentTableView.backgroundColor = NSColor.clearColor;
[self.attachmentTableView bind:NSContentBinding toObject:_attachmentsController withKeyPath:NSStringFromSelector(@selector(arrangedObjects)) options:nil];
self.attachmentTableView.delegate = _attachmentTableDelegate;
self.attachmentTableView.dataSource = _attachmentDataSource;