Created
June 13, 2011 22:24
-
-
Save drudge/1023879 to your computer and use it in GitHub Desktop.
Better style for IBAForms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import "IBAFormFieldStyle.h" | |
// Form field label style | |
#define TWFormFieldLabelX 13 | |
#define TWFormFieldLabelY 6 | |
#define TWFormFieldLabelWidth 80 | |
#define TWFormFieldLabelHeight 30 | |
// Form field value style | |
#define TWFormFieldValueX 80 | |
#define TWFormFieldValueY 12 | |
#define TWFormFieldValueWidth 235 | |
#define TWFormFieldValueHeight 26 | |
@interface TWFormFieldStyle : IBAFormFieldStyle | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "TWFormFieldStyle.h" | |
@implementation TWFormFieldStyle | |
- (id)init | |
{ | |
if (self = [super init]) { | |
self.labelTextColor = [UIColor colorWithRed:0.318 green:0.400 blue:0.569 alpha:1.0]; | |
self.labelFont = [UIFont boldSystemFontOfSize:12]; | |
self.valueFont = [UIFont boldSystemFontOfSize:14]; | |
self.labelFrame = CGRectMake(TWFormFieldLabelX, TWFormFieldLabelY, TWFormFieldLabelWidth, TWFormFieldLabelHeight); | |
self.valueFrame = CGRectMake(TWFormFieldValueX, TWFormFieldValueY, TWFormFieldValueWidth, TWFormFieldValueHeight); | |
self.labelAutoresizingMask = UIViewAutoresizingFlexibleWidth; | |
self.valueAutoresizingMask = UIViewAutoresizingFlexibleWidth; | |
} | |
return self; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment