Permalink
Browse files

Keyboard Type and AutoCorrection altered

  • Loading branch information...
1 parent a8e4105 commit 169f3446926986399088d3671baa51a11f0aa884 @jk committed Jan 3, 2010
Showing with 10 additions and 5 deletions.
  1. +1 −1 JKAlertPrompt.h
  2. +9 −4 JKAlertPrompt.m
View
@@ -17,6 +17,6 @@
@property (readonly) NSString *enteredText;
-(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
View
@@ -15,14 +15,19 @@ @implementation JKAlertPrompt
-(id)initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)delegate
- cancelButtonTitle:(NSString *)cancelButtonTitle okButtonTitle:(NSString *)okButtonTitle {
- DLog(@"");
+ cancelButtonTitle:(NSString *)cancelButtonTitle okButtonTitle:(NSString *)okButtonTitle placeholderText:(NSString *)placeholderText {
if (self = [super initWithTitle:title message:message delegate:delegate cancelButtonTitle:cancelButtonTitle otherButtonTitles:okButtonTitle, nil]) {
- DLog(@"");
- UITextField *theTextField = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 45.0, 260.0, 25.0)];
+// for (UIView *thisView in self.subviews) {
+// DLog(@"View: %@", thisView);
+// }
+
+ UITextField *theTextField = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 90.0, 260.0, 25.0)];
[theTextField setBackgroundColor:[UIColor whiteColor]];
[self addSubview:theTextField];
self.textField = theTextField;
+ self.textField.autocorrectionType = UITextAutocorrectionTypeNo;
+ self.textField.keyboardType = UIKeyboardTypeEmailAddress;
+ self.textField.placeholder = placeholderText;
[theTextField release];
CGAffineTransform translate = CGAffineTransformMakeTranslation(0.0, 130.0);
[self setTransform:translate];

0 comments on commit 169f344

Please sign in to comment.