Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding support to customize the textfield with object
- Loading branch information
Showing
6 changed files
with
86 additions
and
15 deletions.
There are no files selected for viewing
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
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
23 changes: 23 additions & 0 deletions
23
BlockAlertsDemo/ToAddToYourProjects/BlockTextAlertViewConfig.h
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// BlockTextAlertViewConfig.h | ||
// BlockAlertsDemo | ||
// | ||
// Created by Diego Chohfi on 8/22/12. | ||
// Copyright (c) 2012 CodeCrop Software. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface BlockTextAlertViewConfig : NSObject | ||
|
||
@property(nonatomic) UIControlContentVerticalAlignment contentVerticalAlignment; | ||
@property(nonatomic) UITextAutocapitalizationType autocapitalizationType; | ||
@property(nonatomic) UITextBorderStyle borderStyle; | ||
@property(nonatomic) UITextAlignment textAlignment; | ||
@property(nonatomic) UITextFieldViewMode clearButtonMode; | ||
@property(nonatomic,copy) NSString *placeholder; | ||
@property(nonatomic,retain) UIFont *font; | ||
|
||
+ (BlockTextAlertViewConfig *) defaultConfig; | ||
|
||
@end |
24 changes: 24 additions & 0 deletions
24
BlockAlertsDemo/ToAddToYourProjects/BlockTextAlertViewConfig.m
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// BlockTextAlertViewConfig.m | ||
// BlockAlertsDemo | ||
// | ||
// Created by Diego Chohfi on 8/22/12. | ||
// Copyright (c) 2012 CodeCrop Software. All rights reserved. | ||
// | ||
|
||
#import "BlockTextAlertViewConfig.h" | ||
|
||
@implementation BlockTextAlertViewConfig | ||
|
||
+ (BlockTextAlertViewConfig *) defaultConfig { | ||
BlockTextAlertViewConfig *config = [[[self alloc] init] autorelease]; | ||
[config setContentVerticalAlignment:UIControlContentVerticalAlignmentCenter]; | ||
[config setAutocapitalizationType:UITextAutocapitalizationTypeWords]; | ||
[config setBorderStyle:UITextBorderStyleRoundedRect]; | ||
[config setTextAlignment:UITextAlignmentCenter]; | ||
[config setClearButtonMode:UITextFieldViewModeAlways]; | ||
[config setPlaceholder:nil]; | ||
[config setFont:nil]; | ||
return config; | ||
} | ||
@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
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