iphone Programming Glossary: fontwithname
How do I wrap text in a UITableViewCell without a custom cell http://stackoverflow.com/questions/129502/how-do-i-wrap-text-in-a-uitableviewcell-without-a-custom-cell cell.textLabel.lineBreakMode UILineBreakModeWordWrap cell.textLabel.numberOfLines 0 cell.textLabel.font UIFont fontWithName @ Helvetica size 17.0 You'll notice that I set the number of lines for the label to 0. This lets it use as many lines as.. NSIndexPath indexPath NSString cellText @ Go get some text for your cell. UIFont cellFont UIFont fontWithName @ Helvetica size 17.0 CGSize constraintSize CGSizeMake 280.0f MAXFLOAT CGSize labelSize cellText sizeWithFont cellFont constrainedToSize..
Use custom fonts in iPhone App [duplicate] http://stackoverflow.com/questions/13029660/use-custom-fonts-in-iphone-app a good method Iam trying to add MYRIADPRO SEMIBOLD.OTF font in my App. and the code is UIFont customFont UIFont fontWithName @ MYRIADPRO SEMIBOLD size 35 titleLbl.font customFont And the Plist is iphone ios fonts share improve this question .. 1 Make configuration in info.plist as shown in Image Now You SHould Use That Added File UIFont customFont UIFont fontWithName @ fileName size size further you may set That Font to any Label etc. EDIT Make Sure you have added that file in your resources..
How to set a picture programmatically in a NavBar? http://stackoverflow.com/questions/13488710/how-to-set-a-picture-programmatically-in-a-navbar yourImage.png forState UIControlStateNormal Btn setTitle @ OK forState UIControlStateNormal Btn.titleLabel.font UIFont fontWithName @ Georgia size 14 Btn addTarget self action @selector yourBtnPress forControlEvents UIControlEventTouchUpInside UIBarButtonItem..
IOS 7 Navigation Bar text and arrow color http://stackoverflow.com/questions/19029833/ios-7-navigation-bar-text-and-arrow-color NSForegroundColorAttributeName NSValue valueWithUIOffset UIOffsetMake 0 1 NSForegroundColorAttributeName UIFont fontWithName @ Arial Bold size 0.0 NSFontAttributeName nil But back button text color arrow and bar button have still default blue color..
How to change an UILabel/UIFont's letter spacing? http://stackoverflow.com/questions/2544905/how-to-change-an-uilabel-uifonts-letter-spacing CGRectMake 5 7 120 69 autorelease totalColors.text NSString stringWithFormat @ d total totalColors.font UIFont fontWithName @ Arial BoldMT size 60 totalColors.textColor UIColor colorWithRed 221 255.0 green 221 255.0 blue 221 255.0 alpha 1.0 totalColors.backgroundColor..
Inner Shadow in UILabel http://stackoverflow.com/questions/3231690/inner-shadow-in-uilabel shape CGImageGetDataProvider shape NULL false return mask void drawRect CGRect rect UIFont font UIFont fontWithName @ HelveticaNeue Bold size 40.0f CGSize fontSize text_ sizeWithFont font CGImageRef mask self createMaskWithSize rect.size..
Adding a UILabel to a UIToolbar http://stackoverflow.com/questions/333441/adding-a-uilabel-to-a-uitoolbar UILabel alloc initWithFrame CGRectMake 0.0 11.0f self.view.frame.size.width 21.0f self.titleLabel setFont UIFont fontWithName @ Helvetica Bold size 18 self.titleLabel setBackgroundColor UIColor clearColor self.titleLabel setTextColor UIColor colorWithRed..
Can I embed a custom font in an iPhone application? http://stackoverflow.com/questions/360751/can-i-embed-a-custom-font-in-an-iphone-application out that it's not possible but without justification so I'm looking for a definitive answer. EDIT failed UIFont fontWithName size experiment I downloaded Harrowprint.tff downloaded from here and added it to my Resources directory and to the project... from here and added it to my Resources directory and to the project. I then tried this code UIFont font UIFont fontWithName @ Harrowprint size 20 which resulted in an exception being thrown. Looking at the TTF file in Finder confirmed that the..
Curve text on existing circle http://stackoverflow.com/questions/3841642/curve-text-on-existing-circle NSArray alloc initWithObjects @ settings @ test @ stats @ nog iets @ woei @ woei2 nil self.menuItemsFont UIFont fontWithName @ VAGRounded Bold size 18 The rotation of the words seem correct the placement also. Now I need somehow figure out at which..
How to include and use new fonts in iPhone SDK? http://stackoverflow.com/questions/4969329/how-to-include-and-use-new-fonts-in-iphone-sdk to this array On the example below I've added the font DejaVu Sans Mono In your application you can the use UIFont fontWithName @ DejaVuSansMono Bold size 14.f . Or if you want to use it in html css just use font family DejaVu Sans Mono Note this is..
UITextView ruled line background but wrong line height http://stackoverflow.com/questions/5375350/uitextview-ruled-line-background-but-wrong-line-height the lines like the Notes.app This is my code for creating the background for my UITextView textView.font UIFont fontWithName @ MarkerFelt Thin size 19.0 textView.backgroundColor UIColor colorWithPatternImage UIImage imageNamed @ Notes.png I know.. frame if self self.backgroundColor UIColor colorWithRed 1.0f green 1.0f blue 0.6f alpha 1.0f self.font UIFont fontWithName @ MarkerFelt Thin size 19 return self void drawRect CGRect rect Get the current drawing context CGContextRef context UIGraphicsGetCurrentContext..
UIBarButtonItem with color? http://stackoverflow.com/questions/664930/uibarbuttonitem-with-color forState UIControlStateNormal button setTitle @ Delete forState UIControlStateNormal button.titleLabel.font UIFont fontWithName @ Helvetica Bold size 12.0f button.layer setCornerRadius 4.0f button.layer setMasksToBounds YES button.layer setBorderWidth..
iPhone - Convert CTFont to UIFont? http://stackoverflow.com/questions/6714858/iphone-convert-ctfont-to-uifont CTFontCopyName ctFont kCTFontPostScriptNameKey autorelease CGFloat fontSize CTFontGetSize ctFont UIFont font UIFont fontWithName fontName size fontSize Color and underline are not attributes of the font. Bold and italic are part of the font name. share..
Custom font in a storyboard? http://stackoverflow.com/questions/9090745/custom-font-in-a-storyboard NSString fontName return self.titleLabel.font.fontName void setFontName NSString fontName self.titleLabel.font UIFont fontWithName fontName size self.titleLabel.font.pointSize @end UILabel TCCustomFont.h #import UIKit UIKit.h @interface UILabel TCCustomFont.. UILabel TCCustomFont NSString fontName return self.font.fontName void setFontName NSString fontName self.font UIFont fontWithName fontName size self.font.pointSize @end UITextField TCCustomFont.h #import UIKit UIKit.h @interface UITextField TCCustomFont.. TCCustomFont NSString fontName return self.font.fontName void setFontName NSString fontName self.font UIFont fontWithName fontName size self.font.pointSize @end Also downloadable from GIST and also as a single file . Troubleshooting If you run..
|