Skip to content

Instantly share code, notes, and snippets.

@tomhamming
Created March 22, 2023 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomhamming/a10bf4af17272843a8009bfa32b9aff5 to your computer and use it in GitHub Desktop.
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
//
// 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