Hi, On Wed, May 23, 2012 at 10:48 AM, akaash1087 <akshayarw...@gmail.com> wrote:
> > > I have actually made a pickerview.I want to decrease the text size of the > font that apperas in the rows.I cant figure out how I should it. > > I am actually using Gettitle to populate the rows.I am returning string > from > the function.But since I wanted to decrease the string size I decided to > use > NSMutableAttributed string and then set the font size.There is a function > called Addattributes but I cant figure out how I should implement > it.Documentation is not available..cant figure out what I should pass as > the > arguments.If core text API s are to be used then which one should I use.IF > I > want to create font of a particular size then will > *MonoTouch.CoreText.CTFont aFont = > MonoTouch.CoreText.CTFontDescriptor("Arial", 17f) * > do? > This is how you use NSAttributedString: var str = new NSAttributedString ("MyString"); str.AddAttribute (CTStringAttributeKey.ForegroundColor, UIColor.Red.CGColor, new NSRange (0, 2)); or: var str = new NSAttributedString ("MyString", new CTStringAttributes () { ForegroundColor = UIColor.Blue.CGColor }); Rolf > Can I convert a string to NSMutablestring? > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/how-to-add-attributes-to-a-NSMutableAttributed-string-tp4651293.html > Sent from the MonoTouch mailing list archive at Nabble.com. > _______________________________________________ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch >
_______________________________________________ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch