Skip to content
Snippets Groups Projects
Commit 595e824b authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

reload content after saving so we re-highlight correctly

parent 46f043e0
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,11 @@ ...@@ -35,6 +35,11 @@
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
self.aboutView.delegate = self; self.aboutView.delegate = self;
self.aboutView.dataDetectorTypes = UIDataDetectorTypeNone; self.aboutView.dataDetectorTypes = UIDataDetectorTypeNone;
[self loadContent];
}
-(void)loadContent
{
UIColor *tintColor = self.view.tintColor; UIColor *tintColor = self.view.tintColor;
CGFloat red, green, blue, alpha; CGFloat red, green, blue, alpha;
[tintColor getRed: &red green: &green blue: &blue alpha: &alpha]; [tintColor getRed: &red green: &green blue: &blue alpha: &alpha];
...@@ -73,9 +78,9 @@ ...@@ -73,9 +78,9 @@
UIBarButtonItem *save = [[UIBarButtonItem alloc] initWithTitle:@"Save" style:UIBarButtonItemStylePlain target:self action:@selector(saveFile)]; UIBarButtonItem *save = [[UIBarButtonItem alloc] initWithTitle:@"Save" style:UIBarButtonItemStylePlain target:self action:@selector(saveFile)];
[self.navigationItem setRightBarButtonItems:[NSArray arrayWithObjects: save, nil]]; [self.navigationItem setRightBarButtonItems:[NSArray arrayWithObjects: save, nil]];
} }
} }
-(void)saveFile -(void)saveFile
{ {
NSString *text = [self.aboutView stringByEvaluatingJavaScriptFromString: NSString *text = [self.aboutView stringByEvaluatingJavaScriptFromString:
...@@ -84,6 +89,7 @@ ...@@ -84,6 +89,7 @@
NSError *error; NSError *error;
[text writeToFile:self.fileToEdit atomically:YES [text writeToFile:self.fileToEdit atomically:YES
encoding:NSUTF8StringEncoding error:&error]; encoding:NSUTF8StringEncoding error:&error];
[self loadContent];
} }
- (void)didReceiveMemoryWarning - (void)didReceiveMemoryWarning
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment