Created
March 7, 2013 17:35
-
-
Save anthonycvella/5109998 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
static NSString *CellIdentifier = @"Cell"; | |
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; | |
if (cell == nil) { | |
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; | |
} | |
// Configure the cell... | |
tableView.separatorStyle= UITableViewCellSeparatorStyleSingleLine; | |
cell.selectionStyle = UITableViewCellSelectionStyleNone; | |
switch (indexPath.row) { | |
case 0: | |
usernameField = [[UITextField alloc] initWithFrame:CGRectMake(20, 12, 250, 32)]; | |
usernameField.placeholder = @"Email"; | |
usernameField.textColor = [UIColor blackColor]; | |
usernameField.clearButtonMode = UITextFieldViewModeWhileEditing; | |
usernameField.font = [UIFont fontWithName:@"Helvetica" size:14.0]; | |
[cell.contentView addSubview:usernameField]; | |
break; | |
case 1: | |
passwordField = [[UITextField alloc] initWithFrame:CGRectMake(20, 12, 250, 32)]; | |
passwordField.placeholder = @"Password"; | |
passwordField.textColor = [UIColor blackColor]; | |
passwordField.clearButtonMode = UITextFieldViewModeWhileEditing; | |
passwordField.secureTextEntry = YES; | |
passwordField.font = [UIFont fontWithName:@"Helvetica" size:14.0]; | |
[cell.contentView addSubview:passwordField]; | |
break; | |
default: | |
break; | |
} | |
return cell; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment