Reputation: 5462
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?
Upvotes: 3
Views: 481
Reputation: 10296
nameTextView.Font = UIFont.FromName(UIFont.PreferredBody.Name, 10);
Upvotes: 3
Reputation: 10752
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.
Upvotes: 0