Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (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] autorelease];
- }
- cell.selectionStyle=UITableViewCellSelectionStyleNone;
- tableView.scrollEnabled=NO;
- if (indexPath.row==0) {
- enterUserName=[[UITextField alloc]initWithFrame:CGRectMake(10, 10, 290, 24)];
- enterUserName.placeholder=@"Username";
- [enterUserName setBorderStyle:UITextBorderStyleNone];
- enterUserName.clearButtonMode = UITextFieldViewModeWhileEditing;
- enterUserName.keyboardType=UIKeyboardTypeDefault;
- enterUserName.returnKeyType=UIReturnKeyDone;
- enterUserName.delegate=self;
- [cell.contentView addSubview:enterUserName];
- }
- if (indexPath.row==1) {
- enterPassWord=[[UITextField alloc]initWithFrame:CGRectMake(10, 10, 290, 24)];
- enterPassWord.placeholder=@"Password";
- [enterPassWord setBorderStyle:UITextBorderStyleNone];
- enterPassWord.clearButtonMode = UITextFieldViewModeWhileEditing;
- enterPassWord.keyboardType=UIKeyboardTypeDefault;
- enterPassWord.returnKeyType=UIReturnKeyDone;
- [enterPassWord setSecureTextEntry:YES];
- enterPassWord.delegate=self;
- [cell.contentView addSubview:enterPassWord];
- }
- return cell;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement