This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################### | |
# .gitignore file for Xcode4 / OS X Source projects | |
# | |
# Version 2.0 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# | |
# 2013 updates: | |
# - fixed the broken "save personal Schemes" | |
# | |
# NB: if you are storing "built" products, this WILL NOT WORK, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface DataController : NSObject | |
- (void) getSubscriptionFromServer onComplete:(void (^)(void)) completionBlock | |
onCancelled:(void (^)(void)) cancelBlock; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void) getSubscriptionFromServer { | |
// call out to server | |
if(success == ture){ | |
[[NSNotificationCenter defaultCenter] postNotificationName:@"getSubscriptionFromServerPassed" object:nil]; | |
} else{ | |
[[NSNotificationCenter defaultCenter] postNotificationName:@"getSubscriptionFromServerFailed" object:nil]; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe "ad_spots/index" do | |
before(:each) do | |
assign(:ad_spots, [ | |
stub_model(AdSpot), | |
stub_model(User) | |
]) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2012 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
* use this file except in compliance with the License. You may obtain a copy of | |
* the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2012 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
* use this file except in compliance with the License. You may obtain a copy of | |
* the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)sortShortListUsingSelectedSortIndex{ | |
NSManagedObjectContext *context = [[AppDelegateiPad ad] managedObjectContext]; | |
NSFetchRequest *shortListRequest = [[NSFetchRequest alloc] init]; | |
[shortListRequest setEntity:[NSEntityDescription entityForName:@"Hip" inManagedObjectContext:context]]; | |
[shortListRequest setPredicate:[NSPredicate predicateWithFormat:@"%@ IN shortLists", self.shortList]]; | |
[NSFetchedResultsController deleteCacheWithName:nil]; | |
if(selectedSortIndex == 0){ | |
[shortListRequest setSortDescriptors:[NSArray arrayWithObjects:[NSSortDescriptor sortDescriptorWithKey:@"number" ascending:YES], nil]]; | |
}else{ |
NewerOlder