Changed layout to accommodate locking

Fixed Autolayout hickups
Added lock screen
Removed unused views
Some refactorings
This commit is contained in:
michael starke
2013-06-08 23:54:57 +02:00
parent a014f2925c
commit 53850d8d35
26 changed files with 280 additions and 840 deletions

View File

@@ -76,22 +76,6 @@
selector:@selector(_didChangeSelectedGroup:)
name:MPOutlineViewDidChangeGroupSelection
object:nil];
self.showConstraint = [NSLayoutConstraint constraintWithItem:[self view] attribute:NSLayoutAttributeWidth
relatedBy:NSLayoutRelationGreaterThanOrEqual
toItem:nil
attribute:NSLayoutAttributeNotAnAttribute
multiplier:1
constant:200];
self.hideConstraint = [NSLayoutConstraint constraintWithItem:[self view] attribute:NSLayoutAttributeWidth
relatedBy:NSLayoutRelationEqual
toItem:nil
attribute:NSLayoutAttributeNotAnAttribute
multiplier:1
constant:0];
[self.view addConstraint:self.showConstraint];
[self _clearContent];
}
@@ -99,14 +83,6 @@
return [[self view] frame].size.width > 0;
}
- (void)toggleVisible {
NSLayoutConstraint *add = [self isVisible] ? self.hideConstraint : self.showConstraint;
NSLayoutConstraint *remove = [self isVisible] ? self.showConstraint : self.hideConstraint;
[[self view] removeConstraint:remove];
[[self view] addConstraint:add];
[[[self view] window] layoutIfNeeded];
}
- (void)_updateContent {
if(self.showsEntry && self.selectedEntry) {
[self _showEntry];