我与深化发展MonoTouch的一个应用程序,我必须提供一种方法来改变字体为整个应用程序。
I'm developping an app with monotouch and I must provide a way to change the font for the whole application.
我知道我可以只设置每一个我的控制单独字体,但听起来像一个皮塔...是否有某种application.defaultFont的或类似的东西?
I know I could just set every of my controls font individually but that sounds like a pita ... Is there some kind of application.defaultFont or something similar ?
另外,我想,让用户选择字体和它的颜色,是有一个内置的控制,这是否?这将会是更大的,如果我能做到这一点在对应用程序的iPhone设置。
Also , I'd like to let the user choose that font and it's color , is there a built-in control which does that ? It'd be even greater if I could do that in the iphone settings for the app .
在此先感谢
没有配置的默认字体和样式的iPhone应用程序,这是不幸的,因为这将是非常方便的一个概念。
There isn't a notion of configurable default fonts and styles in an iPhone app, which is unfortunate as it would be really handy.
,以弥补缺乏的一种方法是有它获取通过各种UI项,他们已经被实例化后,并设置一个StyleManager类的字体,颜色等。
One way to make up for the lack of this is to have a StyleManager class which gets passed various UI items after they've been instantiated and sets fonts, colours etc.
在iPhone设置应用程序(也就是你的应用程序正确设置以外的地方),只有用户界面的一个有限的范围内控制可能的,所以你将有有限的运气允许任意颜色的选择那里。对于在应用程序的设置就可以实现你想要的设置方面的内容。
The iPhone settings app (i.e. the place for settings outside your app proper) only has a limited range of UI controls possible, so you're going to have limited luck allowing choosing of arbitrary colours there. For in-app settings you can implement what you like in terms of settings.