Changeset 647
- Timestamp:
- 01/14/10 16:29:11 (2 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
apps/iphone/my.tel/trunk/Classes/AccountViewController.m
r643 r647 185 185 186 186 static NSString *DomainCellIdentifier = @"AccountDomainCell"; 187 static NSString *DSDomainCellIdentifier = @"AccountDomainCellWithDS"; 187 188 static NSString *ButtonCellIdentifier = @"ButtonCell"; 188 189 … … 192 193 switch (indexPath.section) { 193 194 case kKAccountTableViewSectionDomains: 194 cell = [tableView dequeueReusableCellWithIdentifier:DomainCellIdentifier]; 195 if (cell == nil) { 196 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:DomainCellIdentifier] autorelease]; 197 cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; 195 theDomain = [self.domainsArray objectAtIndex:indexPath.row]; 196 if ([theDomain objectForKey:@"displayString"] != nil) { 197 cell = [tableView dequeueReusableCellWithIdentifier:DSDomainCellIdentifier]; 198 if (cell == nil) { 199 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:DSDomainCellIdentifier] autorelease]; 200 cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; 201 } 202 cell.detailTextLabel.text = [theDomain objectForKey:@"displayString"]; 203 } else { 204 cell = [tableView dequeueReusableCellWithIdentifier:DomainCellIdentifier]; 205 if (cell == nil) { 206 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:DomainCellIdentifier] autorelease]; 207 cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; 208 } 198 209 } 199 theDomain = [self.domainsArray objectAtIndex:indexPath.row];200 210 cell.textLabel.text = [theDomain objectForKey:@"name"]; 201 cell.detailTextLabel.text = [theDomain objectForKey:@"displayString"];202 211 break; 203 212 case kKAccountTableViewSectionEditSettings: … … 207 216 reuseIdentifier:ButtonCellIdentifier] autorelease]; 208 217 cell.accessoryType = cell.editingAccessoryType = UITableViewCellAccessoryNone; 218 cell.textLabel.textAlignment = UITextAlignmentCenter; 209 219 } 210 220 cell.textLabel.textColor = [UIColor blueColor]; 211 cell.textLabel.textAlignment = UITextAlignmentCenter;212 221 cell.textLabel.text = @"Edit Account Settings"; 213 222 break; … … 218 227 reuseIdentifier:ButtonCellIdentifier] autorelease]; 219 228 cell.accessoryType = cell.editingAccessoryType = UITableViewCellAccessoryNone; 229 cell.textLabel.textAlignment = UITextAlignmentCenter; 220 230 } 221 231 cell.textLabel.textColor = [UIColor redColor]; 222 cell.textLabel.textAlignment = UITextAlignmentCenter;223 232 cell.textLabel.text = @"Remove Account"; 224 233 break;








