Created
March 22, 2023 15:38
-
-
Save tomhamming/a10bf4af17272843a8009bfa32b9aff5 to your computer and use it in GitHub Desktop.
Implementation file of a view controller demonstrating the issue here: https://stackoverflow.com/q/75807047/412107
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
// | |
// ViewController.m | |
// HebrewNoteTester | |
// | |
// Created by Tom Hamming on 3/21/23. | |
// | |
#import "ViewController.h" | |
@interface ViewController () | |
@end | |
@implementation ViewController | |
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
NSString *text = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:@"textContent"]; | |
if (text) | |
self.textView.text = text; | |
} | |
-(void)textViewDidChange:(UITextView *)textView | |
{ | |
[[NSUserDefaults standardUserDefaults] setObject:self.textView.text forKey:@"textContent"]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment