Permalink
Browse files

Auto-adjusting font size on original story view in iphone app.

  • Loading branch information...
1 parent 945b604 commit ecc2f7c2118512d91894818fb2aceb98d853c817 @samuelclay committed Jul 18, 2011
@@ -62,6 +62,7 @@ - (void)viewDidLoad {
address.autoresizingMask = UIViewAutoresizingFlexibleWidth;
address.borderStyle = UITextBorderStyleRoundedRect;
address.font = [UIFont systemFontOfSize:15];
+ [address setAdjustsFontSizeToFitWidth:YES];
address.keyboardType = UIKeyboardTypeURL;
address.autocapitalizationType = UITextAutocapitalizationTypeNone;
address.clearButtonMode = UITextFieldViewModeWhileEditing;
@@ -80,7 +81,6 @@ - (void)viewDidLoad {
addressFrame.size.height);
UIButton *close = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[close setFrame:closeButtonFrame];
- [close setFont:[UIFont systemFontOfSize:12]];
[close setTitle:@"Close" forState:UIControlStateNormal];
[close addTarget:self action:@selector(doCloseOriginalStoryViewController) forControlEvents:UIControlEventTouchUpInside];
[navBar addSubview:close];
Oops, something went wrong.

0 comments on commit ecc2f7c

Please sign in to comment.