Skip to content

Commit

Permalink
Keyboard Type and AutoCorrection altered
Browse files Browse the repository at this point in the history
  • Loading branch information
jk committed Jan 3, 2010
1 parent a8e4105 commit 169f344
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion JKAlertPrompt.h
Expand Up @@ -17,6 +17,6 @@
@property (readonly) NSString *enteredText; @property (readonly) NSString *enteredText;


-(id)initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)delegate -(id)initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)delegate
cancelButtonTitle:(NSString *)cancelButtonTitle okButtonTitle:(NSString *)okButtonTitle; cancelButtonTitle:(NSString *)cancelButtonTitle okButtonTitle:(NSString *)okButtonTitle placeholderText:(NSString *)placeholderText;


@end @end
13 changes: 9 additions & 4 deletions JKAlertPrompt.m
Expand Up @@ -15,14 +15,19 @@ @implementation JKAlertPrompt




-(id)initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)delegate -(id)initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)delegate
cancelButtonTitle:(NSString *)cancelButtonTitle okButtonTitle:(NSString *)okButtonTitle { cancelButtonTitle:(NSString *)cancelButtonTitle okButtonTitle:(NSString *)okButtonTitle placeholderText:(NSString *)placeholderText {
DLog(@"");
if (self = [super initWithTitle:title message:message delegate:delegate cancelButtonTitle:cancelButtonTitle otherButtonTitles:okButtonTitle, nil]) { if (self = [super initWithTitle:title message:message delegate:delegate cancelButtonTitle:cancelButtonTitle otherButtonTitles:okButtonTitle, nil]) {
DLog(@""); // for (UIView *thisView in self.subviews) {
UITextField *theTextField = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 45.0, 260.0, 25.0)]; // DLog(@"View: %@", thisView);
// }

UITextField *theTextField = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 90.0, 260.0, 25.0)];
[theTextField setBackgroundColor:[UIColor whiteColor]]; [theTextField setBackgroundColor:[UIColor whiteColor]];
[self addSubview:theTextField]; [self addSubview:theTextField];
self.textField = theTextField; self.textField = theTextField;
self.textField.autocorrectionType = UITextAutocorrectionTypeNo;
self.textField.keyboardType = UIKeyboardTypeEmailAddress;
self.textField.placeholder = placeholderText;
[theTextField release]; [theTextField release];
CGAffineTransform translate = CGAffineTransformMakeTranslation(0.0, 130.0); CGAffineTransform translate = CGAffineTransformMakeTranslation(0.0, 130.0);
[self setTransform:translate]; [self setTransform:translate];
Expand Down

0 comments on commit 169f344

Please sign in to comment.