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
/* | |
Create a temporary context with the default context as parent. | |
The state of the default context will be available in the temporary context. | |
If you are really sure you want to save the object you don't need to create a temporary context. | |
You can use MR_defaultContext in this case. | |
*/ | |
NSManagedObjectContext *tempContext = [NSManagedObjectContext MR_contextWithParent:[NSManagedObjectContext MR_defaultContext]]; | |
/* | |
Perform operations on the temporary context on the |
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)showHTMLRessourceInWebView:(BOOL)animated | |
{ | |
// Load html data from main bundle | |
NSString * filePath = [[NSBundle mainBundle] | |
pathForResource:@"<RESOURCE_NAME>" | |
ofType:@"html"]; | |
NSData * htmlData = [NSData dataWithContentsOfFile:filePath]; | |
if( !htmlData ) { |
NewerOlder