Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的问题是如何通过 NSUserDefaults 保存 textView 的 textAlignment。
textalignment 是一个枚举,因此您可以将其保存为 int:
[[NSUserDefaults standardUserDefaults] setInteger:<#(NSInteger)#> forKey:<#(NSString *)#>]