iphone Programming Glossary: systemfontofsize
Drawing rotated text with NSString drawInRect http://stackoverflow.com/questions/10289898/drawing-rotated-text-with-nsstring-drawinrect M_PI 4 CGContextConcatCTM context transform1 CGContextTranslateCTM context 0 0 UIFont font UIFont systemFontOfSize 16.0 str drawInRect CGRectMake 0 0 200 100 withFont font lineBreakMode UILineBreakModeWordWrap alignment UIBaselineAdjustmentNone.. context UIColor blackColor .CGColor NSString string @ some test string UIFont font UIFont systemFontOfSize 16.0 Rotate the context 90 degrees convert to radians CGAffineTransform transform1 CGAffineTransformMakeRotation 90.0 M_PI..
iPhone UITextField - Change placeholder text color http://stackoverflow.com/questions/1340224/iphone-uitextfield-change-placeholder-text-color
Why does instantiating a UIFont in an iphone unit test cause a crash? http://stackoverflow.com/questions/1689586/why-does-instantiating-a-uifont-in-an-iphone-unit-test-cause-a-crash to the following crashing unit test #import test.h #import UIKit UIKit.h @implementation test void testFonts UIFont systemFontOfSize 12 @end This crashes with the error Test Case ' test testFonts ' started. Developer Tools RunPlatformUnitTests.include line..
self.delegate = self; what's wrong in doing that? http://stackoverflow.com/questions/1747777/self-delegate-self-whats-wrong-in-doing-that NSMutableString alloc initWithString @ senderObject sender self.textColor UIColor blackColor self.font UIFont systemFontOfSize 17.0 self.backgroundColor UIColor whiteColor self.autocorrectionType UITextAutocorrectionTypeNo self.keyboardType UIKeyboardTypeDefault..
dynamic calculation of UILabel width in UITableViewCell http://stackoverflow.com/questions/1947970/dynamic-calculation-of-uilabel-width-in-uitableviewcell question Explicitly setting the font solves your problem. CGSize textLabelSize textLabel.text sizeWithFont UIFont systemFontOfSize 17 Gory Detals When the tableview first loads this snippet returns zero width due to the font size being 0. textLabel.text..
iPhone UITableView - Delete Button http://stackoverflow.com/questions/2104403/iphone-uitableview-delete-button fontColor topLabel.highlightedTextColor UIColor colorWithRed 1.0 green 1.0 blue 0.9 alpha 1.0 topLabel.font UIFont systemFontOfSize UIFont labelFontSize Create the label for the top row of text bottomLabel UILabel alloc initWithFrame CGRectMake image.size.width.. bottomLabel.highlightedTextColor UIColor colorWithRed 1.0 green 1.0 blue 0.9 alpha 1.0 bottomLabel.font UIFont systemFontOfSize UIFont labelFontSize 2 Create a background image view. cell.backgroundView UIImageView alloc init autorelease cell.selectedBackgroundView..
Add text to CALayer http://stackoverflow.com/questions/2209734/add-text-to-calayer ctx UIColor darkTextColor CGColor UIGraphicsPushContext ctx word drawInRect layer.bounds withFont UIFont systemFontOfSize 32 lineBreakMode UILineBreakModeWordWrap alignment UITextAlignmentCenter word drawAtPoint CGPointMake 30.0f 30.0f forWidth..
Annotate PDF within iPhone SDK http://stackoverflow.com/questions/2313008/annotate-pdf-within-iphone-sdk
sizeWithFont doesn't give correct height for UITextView if there is a long string in the text being wrapped http://stackoverflow.com/questions/2330939/sizewithfont-doesnt-give-correct-height-for-uitextview-if-there-is-a-long-strin 150 text stringWithLongWords if text CGSize textSize width 20000.0f CGSize size text sizeWithFont UIFont systemFontOfSize 10.0f constrainedToSize textSize lineBreakMode UILineBreakModeWordWrap size.height 50.0f result MAX size.height 44.0f 30.0f..
How do I use the NSString draw functionality to create a UIImage from text http://stackoverflow.com/questions/2765537/how-do-i-use-the-nsstring-draw-functionality-to-create-a-uiimage-from-text You can try this updated for iOS 4 UIImage imageFromText NSString text set the font type and size UIFont font UIFont systemFontOfSize 20.0 CGSize size text sizeWithFont font check if UIGraphicsBeginImageContextWithOptions is available iOS is 4.0 if UIGraphicsBeginImageContextWithOptions..
Bold & Non-Bold Text In A Single UILabel? http://stackoverflow.com/questions/3586871/bold-non-bold-text-in-a-single-uilabel const CGFloat fontSize 13 UIFont boldFont UIFont boldSystemFontOfSize fontSize UIFont regularFont UIFont systemFontOfSize fontSize UIColor foregroundColor UIColor whiteColor Create the attributes NSDictionary attrs NSDictionary dictionaryWithObjectsAndKeys.. CTFontRef ctBoldFont CTFontCreateWithName CFStringRef boldFont.fontName boldFont.pointSize NULL UIFont font UIFont systemFontOfSize 13 CTFontRef ctFont CTFontCreateWithName CFStringRef font.fontName font.pointSize NULL CGColorRef cgColor UIColor whiteColor..
iphone/ipad: How exactly use NSAttributedString? http://stackoverflow.com/questions/3786528/iphone-ipad-how-exactly-use-nsattributedstring @ Hello World for those calls we don't specify a range so it affects the whole string attrStr setFont UIFont systemFontOfSize 12 attrStr setTextColor UIColor grayColor now we only change the color of Hello attrStr setTextColor UIColor redColor range..
How to make a UITableViewCell with a UITextView inside, that dynamically adjust its height, on the basis of the UITextView? http://stackoverflow.com/questions/4238760/how-to-make-a-uitableviewcell-with-a-uitextview-inside-that-dynamically-adjust UITextView textV UITextView alloc initWithFrame CGRectMake 5 5 290 stringSize.height 10 textV.font UIFont systemFontOfSize 15.0 textV.text string textV.textColor UIColor blackColor textV.editable NO cell.contentView addSubview textV textV release..
Resizing UITextView http://stackoverflow.com/questions/728704/resizing-uitextview the text height #define MAX_HEIGHT 2000 NSString foo @ Lorem ipsum dolor sit amet. CGSize size foo sizeWithFont UIFont systemFontOfSize 14 constrainedToSize CGSizeMake 100 MAX_HEIGHT lineBreakMode UILineBreakModeWordWrap and then you can use this with your.. lineBreakMode UILineBreakModeWordWrap and then you can use this with your UITextView textView setFont UIFont systemFontOfSize 14 textView setFrame CGRectMake 5 30 100 size.height 10 or you can do the height calculation first and avoid the setFrame..
How do I change the color of the side Alphabet in an indexed UITableView? http://stackoverflow.com/questions/750119/how-do-i-change-the-color-of-the-side-alphabet-in-an-indexed-uitableview class description isEqualToString @ UITableViewIndex view setBackgroundColor UIColor whiteColor view setFont UIFont systemFontOfSize 14 rest of cellForRow handling... This illustrates how you can access and the UITableViewIndex view and modify it in some..
|