- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 6;
}
-(UITableViewCell *) tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *kCellIdentifier = @"";
switch (indexPath.row)
{
case 0:
kCellIdentifier = @"SpaceCell";
break;
case 1:
kCellIdentifier = @"LoginCell";
break;
case 2:
kCellIdentifier = @"PasswordCell";
break;
case 3:
kCellIdentifier = @"EmailCell";
break;
case 4:
kCellIdentifier = @"BirhtdayCell";
break;
default:
kCellIdentifier = @"ForgotCell";
break;
}
UITableViewCell *cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:kCellIdentifier] autorelease];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.backgroundColor = [UIColor clearColor];
cell.backgroundView.backgroundColor = [UIColor clearColor];
if (indexPath.row == 1)
{
[self backgroundCells:cell fileImage:@"top_downlayer.png"];
self.loginTextField.text = userName;
self.loginTextField.placeholder = @"User Name";
self.loginTextField.frame = CGRectMake(10.0f, 10.0f, 300.0f, 30.0f);
[cell.contentView addSubview:self.loginTextField];
}
else if (indexPath.row == 2)
{
[self backgroundCells:cell fileImage:@"middle_downlayer.png"];
self.passwordTextField.text = password;
self.passwordTextField.placeholder = @"Password";
self.passwordTextField.frame = CGRectMake(10.0f, 8.0f, 300.0f, 30.0f);
[cell.contentView addSubview:self.passwordTextField];
}
else if (indexPath.row == 3)
{
[self backgroundCells:cell fileImage:@"middle_downlayer.png"];
self.email.text = emailString;
self.email.placeholder = @"Email";
self.email.frame = CGRectMake(10.0f, 7.0f, 300.0f, 30.0f);
[cell.contentView addSubview:self.email];
}
else if (indexPath.row == 4)
{
[self backgroundCells:cell fileImage:@"middle_downlayer.png"];
UIImageView *inputIV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"input_login.png"]];
inputIV.frame = CGRectMake(20, 8, 280, 28);
[inputIV setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
[cell addSubview:inputIV];
[inputIV release];
if (![resultsDate.text length])
{
UILabel *birhtdayLabel = [[UILabel alloc] initWithFrame:CGRectMake(29, 12, 150, 20)];
birhtdayLabel.text = @"Birthday";
[birhtdayLabel setTextAlignment:UITextAlignmentLeft];
[birhtdayLabel setFont: [UIFont fontWithName:@"Arial" size:17.0f]];
[birhtdayLabel setTextColor:[UIColor colorWithRed:0 green:0 blue:0 alpha:0.25]];
[birhtdayLabel setHighlightedTextColor:[UIColor whiteColor]];
[birhtdayLabel setBackgroundColor:[UIColor clearColor]];
[birhtdayLabel setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
[cell addSubview:birhtdayLabel];
[birhtdayLabel release];
}
else
[cell addSubview:resultsDate];
}
else if (indexPath.row == 5)
{
[self backgroundCells:cell fileImage:@"down_downlayer.png"];
UIImage *buttonBackgroundPressed = [UIImage imageNamed:@"search_btn_act.png"];
UIImage *buttonBackground = [UIImage imageNamed:@"search_btn.png"];
UIButton *singUpButton = [CustomButton buttonWithTitle:@"SIGN UP" target:self selector:@selector(singUpTouchAction:) frame:CGRectMake(20, 6, 280, 28) image:buttonBackground imagePressed:buttonBackgroundPressed];
singUpButton.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
singUpButton.autoresizingMask = UIViewAutoresizingFlexibleWidth;
[cell addSubview:singUpButton];
}
return cell;
}