ここで独自のペーストボードに保存します:
UIPasteboard *pasteboard = [UIPasteboard pasteboardWithName:@"myPasteboard" create:YES];
[pasteboard setPersistent:YES];
//save to unique pasteboard
[pasteboard setString: [NSString stringWithFormat:@"%@",self.myTextFieldHere]];
ここでそれを読み込もうとしています:
UIPasteboard *pasteSaved = [UIPasteboard pasteboardWithName:@"myPasteboard"];
_myTextFieldHere.text = [pasteSaved string];
私のエラーは、ローカル変数の「セレクターのクラスメソッドがありません」ですpastesaved
これまでに試したこと
UIPasteboard *pasteSaved =[[UIPasteboard pasteboardTypes] containsObject:@"myPasteBoard"];
UIPasteboard *pasteSaved = [UIPasteboard pasteboardWithName:@"myPasteboard"];
UIPasteboard *pasteSaved = [UIPasteboard pasteboardWithUniqueName:@"myPasteboard"];
UIPasteboard *pasteSaved = [UIPasteboard: @"myPasteboard"];
UIPasteboard *pasteSaved = [UIPasteboard pasteboardWithUniqueName];