Skip to content

Commit

Permalink
Always enable edit buttons and fix HUD
Browse files Browse the repository at this point in the history
  • Loading branch information
soffes committed Jul 28, 2012
1 parent d89fef8 commit 06d670f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
6 changes: 2 additions & 4 deletions Cheddar for iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@
B208C11015BF63E20080705D /* LocalyticsSession.m in Sources */ = {isa = PBXBuildFile; fileRef = B208BE6215BF63E00080705D /* LocalyticsSession.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
B208C11115BF63E20080705D /* LocalyticsUploader.m in Sources */ = {isa = PBXBuildFile; fileRef = B208BE6415BF63E00080705D /* LocalyticsUploader.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
B208C11215BF63E20080705D /* LocalyticsUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = B208BE6615BF63E00080705D /* LocalyticsUtilities.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
B208C11315BF63E20080705D /* Readme.markdown in Resources */ = {isa = PBXBuildFile; fileRef = B208BE6715BF63E00080705D /* Readme.markdown */; };
B208C14015BF63E20080705D /* SSPullToRefreshDefaultContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = B208BEC515BF63E00080705D /* SSPullToRefreshDefaultContentView.m */; };
B208C14115BF63E20080705D /* SSPullToRefreshSimpleContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = B208BEC715BF63E00080705D /* SSPullToRefreshSimpleContentView.m */; };
B208C14215BF63E20080705D /* SSPullToRefreshView.m in Sources */ = {isa = PBXBuildFile; fileRef = B208BEC915BF63E00080705D /* SSPullToRefreshView.m */; };
Expand All @@ -142,6 +141,7 @@
B208C1FB15BF64630080705D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B208C1F315BF64630080705D /* UIKit.framework */; };
B208C5FC15BF658D0080705D /* libCheddarKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B208C5BF15BF654B0080705D /* libCheddarKit.a */; };
B23261AA15C207FF00D455EF /* CDIWebSignInViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B23261A915C207FF00D455EF /* CDIWebSignInViewController.m */; };
B28F84DB15C37E1D003E4595 /* SSToolkitResources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = B208C1E315BF63E30080705D /* SSToolkitResources.bundle */; };
B28FD2BE15BF730100365CD6 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B28FD2BD15BF730100365CD6 /* CFNetwork.framework */; };
B28FD2C015BF731100365CD6 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B28FD2BF15BF731000365CD6 /* CoreGraphics.framework */; };
B28FD2C215BF731B00365CD6 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B28FD2C115BF731B00365CD6 /* MessageUI.framework */; };
Expand Down Expand Up @@ -375,7 +375,6 @@
B208BE6415BF63E00080705D /* LocalyticsUploader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocalyticsUploader.m; sourceTree = "<group>"; };
B208BE6515BF63E00080705D /* LocalyticsUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalyticsUtilities.h; sourceTree = "<group>"; };
B208BE6615BF63E00080705D /* LocalyticsUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocalyticsUtilities.m; sourceTree = "<group>"; };
B208BE6715BF63E00080705D /* Readme.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Readme.markdown; sourceTree = "<group>"; };
B208BE6815BF63E00080705D /* WebserviceConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebserviceConstants.h; sourceTree = "<group>"; };
B208BEC215BF63E00080705D /* SSPullToRefresh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSPullToRefresh.h; sourceTree = "<group>"; };
B208BEC415BF63E00080705D /* SSPullToRefreshDefaultContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSPullToRefreshDefaultContentView.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -595,7 +594,6 @@
B208BE6415BF63E00080705D /* LocalyticsUploader.m */,
B208BE6515BF63E00080705D /* LocalyticsUtilities.h */,
B208BE6615BF63E00080705D /* LocalyticsUtilities.m */,
B208BE6715BF63E00080705D /* Readme.markdown */,
B208BE6815BF63E00080705D /* WebserviceConstants.h */,
);
path = Localytics;
Expand Down Expand Up @@ -1087,12 +1085,12 @@
B208BC9A15BF63A80080705D /* textfield@2x.png in Resources */,
B208BC9B15BF63A80080705D /* x.png in Resources */,
B208BC9C15BF63A80080705D /* x@2x.png in Resources */,
B208C11315BF63E20080705D /* Readme.markdown in Resources */,
B28FD2D915BF742D00365CD6 /* Cheddar.entitlements in Resources */,
B28FD2DB15BF742D00365CD6 /* Gotham-Bold.otf in Resources */,
B28FD2DC15BF742D00365CD6 /* Gotham-BoldItalic.otf in Resources */,
B28FD2DD15BF742D00365CD6 /* Gotham-Book.otf in Resources */,
B28FD2DE15BF742D00365CD6 /* Gotham-BookItalic.otf in Resources */,
B28F84DB15C37E1D003E4595 /* SSToolkitResources.bundle in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
10 changes: 1 addition & 9 deletions Classes/CDIListViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ - (void)setEditing:(BOOL)editing animated:(BOOL)animated {
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStyleBordered target:self action:@selector(toggleEditMode:)];
}
self.navigationItem.rightBarButtonItem.title = editing ? @"Done" : @"Edit";
self.navigationItem.rightBarButtonItem.enabled = !self.currentTag && self.list && self.fetchedResultsController.fetchedObjects.count > 0;
self.navigationItem.rightBarButtonItem.enabled = !self.currentTag && self.list;
[self.addTaskView setEditing:editing animated:animated];

// NSMutableArray *rows = [[NSMutableArray alloc] init];
Expand Down Expand Up @@ -549,12 +549,4 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
}
}


#pragma mark - NSFetchedResultsController

- (void)controllerDidChangeContent:(NSFetchedResultsController *)controller {
[super controllerDidChangeContent:controller];
self.navigationItem.rightBarButtonItem.enabled = [self hasContent];
}

@end
4 changes: 0 additions & 4 deletions Classes/CDIListsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ - (void)setEditing:(BOOL)editing animated:(BOOL)animated {
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"plus.png"] style:UIBarButtonItemStyleBordered target:self action:@selector(createList:)];
}

self.navigationItem.leftBarButtonItem.enabled = [self hasContent];

if (!editing && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
[self.tableView selectRowAtIndexPath:[self.fetchedResultsController indexPathForObject:_selectedList] animated:YES scrollPosition:UITableViewScrollPositionNone];
}
Expand Down Expand Up @@ -474,8 +472,6 @@ - (void)textFieldDidEndEditing:(UITextField *)textField {
- (void)controllerDidChangeContent:(NSFetchedResultsController *)controller {
[super controllerDidChangeContent:controller];

self.navigationItem.leftBarButtonItem.enabled = [self hasContent];

if (_checkForOneList) {
if (self.fetchedResultsController.fetchedObjects.count == 1) {
[self _selectListAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] newList:NO];
Expand Down
2 changes: 1 addition & 1 deletion Vendor/CheddarKit

0 comments on commit 06d670f

Please sign in to comment.