You would store a font preference in the user tree, as that is a user-specific issue.
您要将字体首选项存储在用户树中,因为这是用户特定的内容。
When you change a font, you can create a new UITextField at the same time. Or, you can store the new font context and a flag indicating that fonts have changed.
在更改字体时,您可以同时创建一个新的UITextField,或者存储一个新的字体上下文和一个表明字体已经更改的标记。
In fact, the name itself indicates this: a common use for it is to store user-specific Settings, or preferences, such as font size or window layout. (Of course, you can store anything you want in it.)
事实上,它的名字本身就表明它通常用于存储用户特定的设置或者首选项,如字体大小或者窗口布局(当然,您可以在其中存储任何您想要存储的内容)。
It's not hard to imagine that two different programmers might want to store different font sizes, and if they each decided to store theirs under the name "font size," we'd have a problem.
不难想像两个不同的程序员可能希望存储不同的字体大小,如果他们决定以同一个名字“fontsize”存储他们的值,那么我们就有问题了。
It's not hard to imagine that two different programmers might want to store different font sizes, and if they each decided to store theirs under the name "font size," we'd have a problem.
不难想像两个不同的程序员可能希望存储不同的字体大小,如果他们决定以同一个名字“fontsize”存储他们的值,那么我们就有问题了。
应用推荐