質問

I just update my montouch to xamarin.iOS 7.0.2. before that I have this code in my project:

nameTextView .Font = new UIFont ().WithSize (10);

but it is not working now.

I face with this error:

Error CS0619: `MonoTouch.UIKit.UIFont.UIFont()' is obsolete: `This constructor does not return a valid, default, instance'

Now, how should I use this?

役に立ちましたか?

解決

nameTextView.Font = UIFont.FromName(UIFont.PreferredBody.Name, 10);

他のヒント

http://www.raywenderlich.com/50151/text-kit-tutorial

This tutorial link for customized Text kit property.Check this may be it help full.

self.textView.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody]; self.textView.font = [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline];

In iOS 7 into syntax are changed.It's something like that HTML property.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top