Moder Objective-C. Adoping changed KeePassKit API

Signed-off-by: michael starke <michael.starke@hicknhack-software.com>
This commit is contained in:
michael starke
2015-08-04 17:18:08 +02:00
parent fa4094ee01
commit 731384ca1e
11 changed files with 133 additions and 34 deletions

View File

@@ -285,12 +285,7 @@ typedef NS_ENUM(NSUInteger, MPContentTab) {
[self.itemImageView bind:NSValueBinding toObject:item withKeyPath:NSStringFromSelector(@selector(iconImage)) options:nil];
[[self.notesTextView enclosingScrollView] setHidden:NO];
[self.notesTextView bind:NSValueBinding toObject:item withKeyPath:NSStringFromSelector(@selector(notes)) options:nil];
if([item respondsToSelector:@selector(title)]) {
[self.itemNameTextField bind:NSValueBinding toObject:item withKeyPath:NSStringFromSelector(@selector(title)) options:nil];
}
else if( [item respondsToSelector:@selector(name)]) {
[self.itemNameTextField bind:NSValueBinding toObject:item withKeyPath:NSStringFromSelector(@selector(name)) options:nil];
}
[self.itemNameTextField bind:NSValueBinding toObject:item withKeyPath:NSStringFromSelector(@selector(title)) options:nil];
[self.itemImageView setHidden:NO];
[self.itemNameTextField setHidden:NO];
}