Changeset 899 for apps/iphone/superbook
- Timestamp:
- 09/14/11 18:00:46 (20 months ago)
- Location:
- apps/iphone/superbook/trunk
- Files:
-
- 2 added
- 4 modified
-
Classes/LocateThem_ViewController.m (modified) (7 diffs)
-
Silhouette@2x.png (added)
-
Silhouette.png (added)
-
Superbook.xcodeproj/project.pbxproj (modified) (4 diffs)
-
tellogo@2x.png (modified) (previous)
-
tellogo.png (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
apps/iphone/superbook/trunk/Classes/LocateThem_ViewController.m
r895 r899 37 37 #import <AddressBookUI/AddressBookUI.h> 38 38 39 #define kKLTHeaderHeight 40.0f 40 39 41 @interface LocateThem_ViewController (PrivateMethods) 40 42 … … 64 66 - (void)viewDidLoad { 65 67 [super viewDidLoad]; 66 self.title = NSLocalizedString(@"Contacts", @"Main Contacts list Title");68 self.title = @"Superbook"; 67 69 68 70 // NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; … … 331 333 332 334 - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { 333 return 40.0f; 335 if (section == LTSectionVisited) { 336 if ([domainsLastVisited numberOfCachedLookups] == 0) { 337 return 0.0f; 338 } 339 } 340 return kKLTHeaderHeight; 334 341 } 335 342 336 343 - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { 337 CGFloat h = [self tableView:friendsTableView heightForHeaderInSection:0]; // height 344 CGFloat h = [self tableView:friendsTableView heightForHeaderInSection:section]; // height 345 if (h == 0) 346 return nil; 347 CGFloat imgSize = kKLTHeaderHeight - 10; // image width & height 338 348 CGRect viewFrame = CGRectMake(0, 0, friendsTableView.frame.size.width, h); 339 349 UIView *headerV = [[[UIView alloc] initWithFrame:viewFrame] autorelease]; 340 UIImageView *imageV = [[[UIImageView alloc] initWithFrame:CGRectMake( 0, 0, h, h)] autorelease];341 UILabel *textLabel = [[[UILabel alloc] initWithFrame:CGRectMake( h+3, 0, friendsTableView.frame.size.width-(h+6), h)] autorelease];342 textLabel.shadowColor = [UIColor colorWithRed: 235 green:0 blue:235alpha:1];350 UIImageView *imageV = [[[UIImageView alloc] initWithFrame:CGRectMake(6, (kKLTHeaderHeight-imgSize)/2, imgSize, imgSize)] autorelease]; 351 UILabel *textLabel = [[[UILabel alloc] initWithFrame:CGRectMake(imageV.frame.origin.x+imageV.frame.size.width+3, 0, friendsTableView.frame.size.width-(h+6), h)] autorelease]; 352 textLabel.shadowColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:1]; 343 353 textLabel.shadowOffset = CGSizeMake(1, 1); 344 354 textLabel.textColor = [UIColor whiteColor]; 345 355 textLabel.backgroundColor = [UIColor colorWithWhite:1 alpha:0]; 346 347 [headerV addSubview:imageV];348 [headerV addSubview:textLabel];349 356 350 357 switch (section) { … … 355 362 case LTSectionContacts: 356 363 textLabel.text = NSLocalizedString(@"Contacts", @"Contacts"); 357 imageV.image = [UIImage imageNamed:@" ABook"];364 imageV.image = [UIImage imageNamed:@"Silhouette"]; 358 365 break; 359 366 default: … … 361 368 break; 362 369 } 370 371 [headerV addSubview:imageV]; 372 [headerV addSubview:textLabel]; 363 373 return headerV; 364 374 } … … 383 393 384 394 - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { 385 switch (section) { 386 case LTSectionVisited: 387 return NSLocalizedString(@"Recently Visited", @"Recently looked up .tel domains"); 388 break; 389 case LTSectionContacts: 390 return NSLocalizedString(@"Contacts", @"Contacts"); 391 break; 392 default: 393 return nil; 394 break; 395 } 395 return nil; 396 396 } 397 397 … … 497 497 lastVisitedRowCount--; 498 498 [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; 499 if ([tableView numberOfRowsInSection:indexPath.section] == 0) { 500 [tableView reloadSections:[NSIndexSet indexSetWithIndex:indexPath.section] withRowAnimation:UITableViewRowAnimationNone]; 501 } 499 502 } 500 503 } -
apps/iphone/superbook/trunk/Superbook.xcodeproj/project.pbxproj
r897 r899 189 189 38BE5AAF141F8E5600AA40A3 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 38BE5AB1141F8E5600AA40A3 /* Localizable.strings */; }; 190 190 38BE5AC3141F904400AA40A3 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 38BE5AC5141F904400AA40A3 /* Localizable.strings */; }; 191 38BE5AC91420A3C500AA40A3 /* Silhouette.png in Resources */ = {isa = PBXBuildFile; fileRef = 38BE5AC71420A3C500AA40A3 /* Silhouette.png */; }; 192 38BE5ACA1420A3C500AA40A3 /* Silhouette@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 38BE5AC81420A3C500AA40A3 /* Silhouette@2x.png */; }; 191 193 38BFACD7138A71F40073A2AE /* CellBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = 38BFACD6138A71F40073A2AE /* CellBackground.png */; }; 192 194 38BFACE0138CF7F10073A2AE /* RecordNaptr+HAAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 38BFACDF138CF7F10073A2AE /* RecordNaptr+HAAdditions.m */; }; … … 510 512 38BE5AAC141F8E4B00AA40A3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = en; path = en.lproj/About.html; sourceTree = "<group>"; }; 511 513 38BE5AAE141F8E5200AA40A3 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = fr; path = fr.lproj/About.html; sourceTree = "<group>"; }; 512 38BE5AB0141F8E5600AA40A3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };513 38BE5AB2141F8E5B00AA40A3 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };514 38BE5AB3141F8E6100AA40A3 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };514 38BE5AB0141F8E5600AA40A3 /* en */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; }; 515 38BE5AB2141F8E5B00AA40A3 /* fr */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; }; 516 38BE5AB3141F8E6100AA40A3 /* de */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; }; 515 517 38BE5AC4141F904400AA40A3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; }; 516 518 38BE5AC6141F906E00AA40A3 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; }; 519 38BE5AC71420A3C500AA40A3 /* Silhouette.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Silhouette.png; sourceTree = "<group>"; }; 520 38BE5AC81420A3C500AA40A3 /* Silhouette@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Silhouette@2x.png"; sourceTree = "<group>"; }; 517 521 38BFACD6138A71F40073A2AE /* CellBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = CellBackground.png; sourceTree = "<group>"; }; 518 522 38BFACDE138CF7F10073A2AE /* RecordNaptr+HAAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RecordNaptr+HAAdditions.h"; sourceTree = "<group>"; }; … … 1297 1301 38B7FE9D13CEECCB003ADCA9 /* ABook.png */, 1298 1302 38B7FE9E13CEECCC003ADCA9 /* ABook@2x.png */, 1303 38BE5AC71420A3C500AA40A3 /* Silhouette.png */, 1304 38BE5AC81420A3C500AA40A3 /* Silhouette@2x.png */, 1299 1305 38BFAD5513955FD50073A2AE /* arrow.png */, 1300 1306 38B7FEA113CF5CCA003ADCA9 /* arrow@2x.png */, … … 1489 1495 38BE5AAB141F8E4B00AA40A3 /* About.html in Resources */, 1490 1496 38BE5AC3141F904400AA40A3 /* Localizable.strings in Resources */, 1497 38BE5AC91420A3C500AA40A3 /* Silhouette.png in Resources */, 1498 38BE5ACA1420A3C500AA40A3 /* Silhouette@2x.png in Resources */, 1491 1499 ); 1492 1500 runOnlyForDeploymentPostprocessing = 0;








