Changeset 382 for apps/iphone/superbook/trunk
- Timestamp:
- 06/07/09 11:21:46 (4 years ago)
- Location:
- apps/iphone/superbook/trunk
- Files:
-
- 4 added
- 17 modified
-
Classes/DotTelABDelegate.h (added)
-
Classes/DotTelABDelegate.m (added)
-
Classes/DotTelABMapper.h (added)
-
Classes/DotTelABMapper.m (added)
-
Classes/FriendsData.h (modified) (2 diffs)
-
Classes/FriendsData.m (modified) (15 diffs)
-
Classes/LocateThem_ViewController.h (modified) (2 diffs)
-
Classes/LocateThem_ViewController.m (modified) (5 diffs)
-
Classes/NaptrViewController.h (modified) (5 diffs)
-
Classes/NaptrViewController.m (modified) (14 diffs)
-
Classes/NSString+UITableViewHelper.h (modified) (1 diff)
-
Classes/NSString+UITableViewHelper.m (modified) (4 diffs)
-
DotTel_SDK/Classes/DnsResolver.m (modified) (1 diff)
-
DotTel_SDK/Classes/RecordNaptr.h (modified) (1 diff)
-
DotTel_SDK/Classes/RecordNaptr.m (modified) (2 diffs)
-
DotTel_SDK/Classes/RecordTxt.h (modified) (2 diffs)
-
DotTel_SDK/Classes/RecordTxt.m (modified) (6 diffs)
-
LocateThem_Prefix.pch (modified) (1 diff)
-
LocTableViewCell.xib (modified) (13 diffs)
-
NaptrTableViewCell.xib (modified) (13 diffs)
-
TxtTableViewCell.xib (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
apps/iphone/superbook/trunk/Classes/FriendsData.h
r363 r382 74 74 }; 75 75 76 - (void)loadDataInBackground; 76 - (void)loadFriendsDataFromAB:(ABAddressBookRef)aBook; 77 78 - (void)loadFriendsDataUsingTimer:(NSTimer *)aTimer; 77 79 78 80 - (ABAddressBookRef)getAddressBookRef; … … 81 83 82 84 - (NSNumber *)getABRecordIdForIndexPath:(NSIndexPath *)indexPath; 85 86 - (NSNumber *) getABRecordIdForTel:(NSString *)telname; 83 87 84 88 - (ABRecordRef)getABRecordRefForABRecordId:(NSNumber *)theId withAddressBook:(ABRecordRef)theBook; -
apps/iphone/superbook/trunk/Classes/FriendsData.m
r363 r382 31 31 static FriendsData *sharedFriendsData = nil; 32 32 33 @interface FriendsData (PrivateMethods) 34 35 void abChanged (ABAddressBookRef addressBook, 36 CFDictionaryRef info, 37 void *context); 38 39 @end 40 33 41 @implementation FriendsData 34 42 … … 52 60 self.prefsUnitKm = [defaults integerForKey:@"unitsPreference"]; 53 61 self.prefsSorting = [defaults integerForKey:@"sortingPreference"]; 62 63 book = ABAddressBookCreate(); 64 ABAddressBookRegisterExternalChangeCallback(book, abChanged, self); 54 65 return self; 55 66 } 56 67 57 - (void) loadDataInBackground { 58 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 59 if (self != nil) { 60 // open the default address book. 61 book = ABAddressBookCreate(); 62 if (!book) { 68 - (void)loadFriendsDataUsingTimer:(NSTimer *)aTimer { 69 ABAddressBookRef aBook = (ABAddressBookRef)[aTimer userInfo]; 70 [self loadFriendsDataFromAB:aBook]; 71 } 72 73 - (void)loadFriendsDataFromAB:(ABAddressBookRef)aBook { 74 ABAddressBookRef theBook = ABAddressBookCreate(); // Override the incoming ab because it's not thread safe 75 if (self != nil) { 76 if (!theBook) { 63 77 NSLog(@"Error opening address book"); 64 78 if (self.delegate) 65 79 [self.delegate friendsDataDidLoad]; 66 [pool release];67 80 return; 68 81 } … … 73 86 // choose which group he wants to filter by 74 87 // TODO: allow filter by group, managed in preferences 75 // CFArrayRef allGroups = ABAddressBookCopyArrayOfAllGroups( book);76 // CFIndex nGroups = ABAddressBookGetGroupCount( book);88 // CFArrayRef allGroups = ABAddressBookCopyArrayOfAllGroups(theBook); 89 // CFIndex nGroups = ABAddressBookGetGroupCount(theBook); 77 90 // ABRecordRef *aGroup; 78 91 // for (int i=0;i < nGroups;i++) { … … 87 100 // } 88 101 89 // Find everyone with a .tel and add them to people WithTel102 // Find everyone with a .tel and add them to peopleCurrentList 90 103 CFArrayRef allPeople; 91 104 CFIndex nPeople = 0; … … 95 108 nPeople = CFArrayGetCount(allPeople); 96 109 } else { 97 allPeople = ABAddressBookCopyArrayOfAllPeople( book);110 allPeople = ABAddressBookCopyArrayOfAllPeople(theBook); 98 111 if (allPeople) 99 nPeople = ABAddressBookGetPersonCount( book);112 nPeople = ABAddressBookGetPersonCount(theBook); 100 113 } 101 114 ABRecordRef *aPerson; … … 107 120 NSString *theTel = [self getTelForABRecordId:aPersonId withABRecordRef:aPerson]; 108 121 if (theTel) { 109 // [self.peopleWithTel addObject:aPersonId];110 122 // the people list has for each personid: name, type of status, location, location timestamp, distance from user and telname 111 NSArray *personInfoRow = [NSArray arrayWithObjects:[(NSString *)ABRecordCopyCompositeName(aPerson) autorelease], 123 NSString *compName = [(NSString *)ABRecordCopyCompositeName(aPerson) autorelease]; 124 if (!compName) { 125 compName = theTel; 126 } 127 NSArray *personInfoRow = [NSArray arrayWithObjects:compName, 112 128 [NSNumber numberWithInt:FriendsDataSectionStatusUnknown], 113 129 noLoc, … … 136 152 [self.delegate friendsDataDidLoad]; 137 153 138 [pool release];139 154 return; 140 155 } … … 252 267 } 253 268 269 #pragma mark ---- AddressBook change callback method ---- 270 271 void abChanged (ABAddressBookRef addressBook, 272 CFDictionaryRef info, 273 void *context) { 274 if (ABAddressBookHasUnsavedChanges(addressBook)) { 275 // Not done saving changes, let's wait 276 return; 277 } 278 // Something changed in the address book 279 // Let's get the latest changes and reload 280 FriendsData *fd = context; 281 [fd loadFriendsDataFromAB:addressBook]; 282 // [fd performSelectorOnMainThread:@selector(loadFriendsDataFromAB:) withObject:(id)addressBook waitUntilDone:NO]; 283 } 284 285 254 286 #pragma mark ---- utility methods ---- 255 287 256 288 // Get AddressBook 257 289 - (ABAddressBookRef) getAddressBookRef { 258 259 ABAddressBookRef bookForThread = ABAddressBookCreate(); 260 CFRetain(bookForThread); 261 return bookForThread; 290 return book; 262 291 } 263 292 … … 278 307 } 279 308 309 // Get ABRecordId for a specific .tel 310 - (NSNumber *) getABRecordIdForTel:(NSString *)telname { 311 if (telname == NULL) 312 return [NSNumber numberWithInt:kABRecordInvalidID]; 313 // the people list has for each personid: name, type of status, location, location timestamp, distance from user and telname 314 // the sorted people array just has personids 315 316 NSNumber *theId; 317 NSArray *thePersonInfo; 318 for (theId in sortedPeopleArray) { 319 thePersonInfo = [peopleCurrentList objectForKey:theId]; 320 if ([(NSString *)[thePersonInfo objectAtIndex:5] isEqualToString:telname]) { 321 return theId; 322 } 323 } 324 // Couldn't find a match 325 return [NSNumber numberWithInt:kABRecordInvalidID]; 326 } 280 327 281 328 // Get ABRecordRef for an ID … … 296 343 297 344 BOOL shouldRelease = NO; 298 ABAddressBookRef theBook;299 345 if (!recordRef) { 300 346 shouldRelease = YES; 301 theBook = ABAddressBookCreate(); 302 recordRef = ABAddressBookGetPersonWithRecordID(theBook, (ABRecordID)[theId intValue]); 347 recordRef = ABAddressBookGetPersonWithRecordID(book, (ABRecordID)[theId intValue]); 303 348 } 304 349 CFStringRef telUrl; 305 350 BOOL foundUrl = NO; 306 351 307 ABMultiValueRef allUrls; 308 allUrls = ABRecordCopyValue(recordRef, kABPersonURLProperty); 352 ABMultiValueRef allUrls = ABRecordCopyValue(recordRef, kABPersonURLProperty); 309 353 310 354 for (CFIndex j = 0; j < ABMultiValueGetCount(allUrls); j++) { … … 314 358 break; 315 359 } 360 if ([(NSString *)telUrl hasSuffix:@".tel/"]) { 361 foundUrl = YES; 362 break; 363 } 316 364 CFRelease(telUrl); 317 365 } … … 327 375 } 328 376 if (foundUrl) { 329 if ([(NSString *)telUrl hasPrefix:@"http://"]) { 330 NSString *retStr = [(NSString *)telUrl substringFromIndex:[@"http://" length]]; 331 CFRelease(telUrl); 377 NSMutableString *cleanTelUrl = [NSMutableString stringWithString:(NSString *)telUrl]; 378 CFRelease(telUrl); 379 if ([cleanTelUrl hasSuffix:@".tel/"]) { 380 // Remove the trailing slash 381 [cleanTelUrl deleteCharactersInRange:NSMakeRange([cleanTelUrl length]-1, 1)]; 382 } 383 if ([cleanTelUrl hasPrefix:@"http://"]) { 384 NSString *retStr = [cleanTelUrl substringFromIndex:[@"http://" length]]; 332 385 return retStr; 333 386 } else if ([(NSString *)telUrl hasPrefix:@"https://"]) { 334 NSString *retStr = [(NSString *)telUrl substringFromIndex:[@"https://" length]]; 335 CFRelease(telUrl); 387 NSString *retStr = [cleanTelUrl substringFromIndex:[@"https://" length]]; 336 388 return retStr; 337 389 } else { 338 return [(NSString *)telUrl autorelease];390 return cleanTelUrl; 339 391 } 340 392 } … … 349 401 350 402 BOOL shouldRelease = NO; 351 ABAddressBookRef theBook;352 403 if (!recordRef) { 353 404 shouldRelease = YES; 354 theBook = ABAddressBookCreate(); 355 recordRef = ABAddressBookGetPersonWithRecordID(theBook, (ABRecordID)[theId intValue]); 405 recordRef = ABAddressBookGetPersonWithRecordID(book, (ABRecordID)[theId intValue]); 356 406 } 357 407 CFStringRef telUrlValue; 358 ABMutableMultiValueRef allUrls; 359 allUrls = ABRecordCopyValue(recordRef, kABPersonURLProperty); 408 ABMultiValueRef allUrls = ABRecordCopyValue(recordRef, kABPersonURLProperty); 360 409 NSInteger telIndex = -1; // Return value for nonexistent 361 410 362 411 for (CFIndex j = 0; j < ABMultiValueGetCount(allUrls); j++) { 363 412 telUrlValue = ABMultiValueCopyValueAtIndex(allUrls, j); 364 if ([(NSString *)telUrlValue hasSuffix:@".tel"] ) {413 if ([(NSString *)telUrlValue hasSuffix:@".tel"] || [(NSString *)telUrlValue hasSuffix:@".tel/"]) { 365 414 CFRelease(telUrlValue); 366 415 telIndex = (NSInteger)j; … … 372 421 if (shouldRelease) { 373 422 CFRelease(recordRef); 374 CFRelease(theBook);375 423 } 376 424 return telIndex; … … 421 469 } 422 470 471 - (void)dealloc { 472 CFRelease(book); 473 [super dealloc]; 474 } 475 423 476 @end -
apps/iphone/superbook/trunk/Classes/LocateThem_ViewController.h
r363 r382 34 34 #import "CustomAlertView.h" 35 35 36 // Shorthand for getting localized strings37 #define LocStr(key) [[NSBundle mainBundle] localizedStringForKey:(key) value:@"" table:nil]38 39 36 @interface LocateThem_ViewController : UIViewController <MyCLControllerDelegate, FriendsDataDelegate, 40 37 UINavigationControllerDelegate, UISearchBarDelegate, UIWebViewDelegate> { … … 48 45 UINavigationController *telNavController; 49 46 @private 47 BOOL isFirstRun; 50 48 BOOL keyboardShown; 49 BOOL isUpdatingLocation; 50 BOOL needsFriendsTableRefresh; 51 UILabel *instructionsView; 52 NSTimer *friendsTableLoadingTimer; 51 53 } 52 54 -
apps/iphone/superbook/trunk/Classes/LocateThem_ViewController.m
r363 r382 43 43 [MyCLController sharedInstance].delegate = self; 44 44 } 45 isFirstRun = YES; 45 46 return self; 46 47 } … … 52 53 53 54 // NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 54 [[MyCLController sharedInstance].locationManager startUpdatingLocation]; 55 56 // Now load our friends in the background, so that the application can finish initializing 57 // and it can display the "loading..." information. Once the friend data has been loaded, 58 // friendsDataDidLoad() is called and we complete building the table 59 [self.view addSubview:loadingView]; 60 loadingView.center = self.view.center; 61 FriendsData *sharedFriendsInstance = [[FriendsData alloc] init]; 55 FriendsData *sharedFriendsInstance = [FriendsData sharedInstance]; 62 56 sharedFriendsInstance.delegate = self; 63 57 friendsTableView.dataSource = sharedFriendsInstance; 64 [sharedFriendsInstance performSelectorInBackground:@selector(loadDataInBackground) withObject:nil];65 58 66 59 // Do the other setup tasks … … 72 65 [[NSNotificationCenter defaultCenter] addObserver:self 73 66 selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil ]; 67 isUpdatingLocation = FALSE; 68 needsFriendsTableRefresh = TRUE; 74 69 } 75 70 } … … 80 75 } 81 76 77 - (void)viewDidAppear:(BOOL)animated { 78 if (! isUpdatingLocation) { 79 [[MyCLController sharedInstance].locationManager startUpdatingLocation]; 80 isUpdatingLocation = TRUE; 81 } 82 83 if (needsFriendsTableRefresh) { 84 // Now load our friends using a timer, so that the application can finish initializing 85 // and it can display the "loading..." information. Once the friend data has been loaded, 86 // friendsDataDidLoad() is called and we complete building the table. 87 // Don't use a background thread because the AddressBook framework may not be threadsafe 88 [self.view addSubview:loadingView]; 89 loadingView.center = self.view.center; 90 friendsTableLoadingTimer = [NSTimer scheduledTimerWithTimeInterval:0.1 91 target:[FriendsData sharedInstance] 92 selector:@selector(loadFriendsDataUsingTimer:) 93 userInfo:nil repeats:NO]; 94 needsFriendsTableRefresh = FALSE; 95 } 96 } 97 82 98 // Delegate for FriendsData that gets called when data has been loaded and we can update the tableview 83 99 - (void)friendsDataDidLoad { 84 100 85 101 //[NSThread sleepForTimeInterval:5]; // for testing loadingView only 102 [friendsTableView reloadData]; 86 103 [loadingView removeFromSuperview]; 87 [friendsTableView reloadData];88 104 if ([friendsTableView numberOfRowsInSection:0] == 0) { 89 105 [friendsTableView setHidden:NO]; 90 UILabel *instructionsView = [[[UILabel alloc] initWithFrame:friendsTableView.frame] autorelease];106 instructionsView = [[[UILabel alloc] initWithFrame:friendsTableView.frame] autorelease]; 91 107 instructionsView.numberOfLines = 0; 92 108 instructionsView.text = LocStr(@"NoContactsWithTel"); … … 98 114 } else { 99 115 [friendsTableView setHidden:NO]; 100 } 101 102 // Check to see if the user has disabled location services altogether 103 // In that case, we show an alert and disable the find button and gps switch 104 if ( ! [MyCLController sharedInstance].locationManager.locationServicesEnabled ) { 105 BOOL shouldQuit = NO; 116 if (instructionsView != nil) { 117 [instructionsView removeFromSuperview]; 118 } 119 } 120 121 if (isFirstRun) { 122 isFirstRun = NO; 123 // Check to see if the user has disabled location services altogether 124 // In that case, we show an alert and disable the find button and gps switch 125 // TODO: re-enable when find location button is brought back 126 // if ( ! [MyCLController sharedInstance].locationManager.locationServicesEnabled ) { 127 // BOOL shouldQuit = NO; 128 // 129 // CustomAlertView *alertView = [[CustomAlertView alloc] initWithTitle:NSLocalizedString(@"LocationDenied", nil) 130 // message:nil 131 // delegate:nil 132 // shouldQuit:shouldQuit 133 // cancelButtonTitle:nil 134 // otherButtonTitles:NSLocalizedString(@"OK", nil), nil]; 135 // [alertView show]; 136 // [alertView release]; 137 // } 138 139 140 //register whenever a change to the underlying dataset happens, so we can update the friends list view 141 [[FriendsData sharedInstance] addObserver:self forKeyPath:@"lastFriendsUpdate" 142 options:NSKeyValueObservingOptionNew context:NULL]; 106 143 107 CustomAlertView *alertView = [[CustomAlertView alloc] initWithTitle:NSLocalizedString(@"LocationDenied", nil) 108 message:nil 109 delegate:nil 110 shouldQuit:shouldQuit 111 cancelButtonTitle:nil 112 otherButtonTitles:NSLocalizedString(@"OK", nil), nil]; 113 [alertView show]; 114 [alertView release]; 115 } 116 117 118 //register whenever a change to the underlying dataset happens, so we can update the friends list view 119 [[FriendsData sharedInstance] addObserver:self forKeyPath:@"lastFriendsUpdate" 120 options:NSKeyValueObservingOptionNew context:NULL]; 121 122 NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 123 if ([defaults boolForKey:@"startupLocatePreference"]) { 124 [self performSelectorInBackground:@selector(updateFriendsListInBackground) withObject:nil]; 144 NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 145 if ([defaults boolForKey:@"startupLocatePreference"]) { 146 [self performSelectorInBackground:@selector(updateFriendsListInBackground) withObject:nil]; 147 } 148 } else { 149 // check if the db has been updated, then get rid of alertView 125 150 } 126 151 } -
apps/iphone/superbook/trunk/Classes/NaptrViewController.h
r363 r382 31 31 #import "FriendsData.h" 32 32 #import "FriendsMapViewController.h" 33 #import "DotTelABDelegate.h" 33 34 #import "DnsResolver.h" 34 35 #import "NetworkUtility.h" … … 63 64 NSTimeZone *timeZone; 64 65 UIActivityIndicatorView *loadingAIView; 66 UIBarButtonItem *loadingAIButton; 67 UIBarButtonItem *storeContactButton; 65 68 NSNumber *abId; // addressbook id 66 69 BOOL prefsReverseGeo; // Preferences for reverse geolocation … … 70 73 NSUInteger callButtonIndex; 71 74 NSUInteger smsButtonIndex; 75 DotTelABDelegate *abD; 72 76 } 73 77 … … 82 86 - (void)getCountryAndTimeZoneForLoc:(CLLocation *)aLoc; 83 87 - (void)actOnUri:(NSString *)uri; 88 - (IBAction)saveContact:(id)sender; 84 89 85 90 @property (nonatomic, retain) IBOutlet UITableView *theTable; … … 92 97 @property (nonatomic, retain) NSTimeZone *timeZone; 93 98 @property (nonatomic, retain) UIActivityIndicatorView *loadingAIView; 99 @property (nonatomic, retain) UIBarButtonItem *loadingAIButton; 100 @property (nonatomic, retain) UIBarButtonItem *storeContactButton; 94 101 @property (nonatomic, retain) NSNumber *abId; 95 102 @property BOOL prefsReverseGeo; 96 @property NSUInteger loadingCount;103 @property (readonly) NSUInteger loadingCount; 97 104 98 105 @end -
apps/iphone/superbook/trunk/Classes/NaptrViewController.m
r363 r382 29 29 #import "NaptrViewController.h" 30 30 31 static UIFont *headerFont; 32 static UIFont *txtFont; 33 34 @interface NaptrViewController (PrivateMethods) 35 36 - (void)decrementLoadingCount; 37 38 @end 39 31 40 @implementation NaptrViewController 32 41 … … 41 50 @synthesize prefsReverseGeo; 42 51 @synthesize loadingAIView; 52 @synthesize loadingAIButton; 53 @synthesize storeContactButton; 43 54 @synthesize abId; 44 55 45 56 #define kHeaderTextFontSize 14.0 57 #define kTextFontSize 14.0 46 58 47 59 #pragma mark ------- canonical init methods … … 55 67 56 68 - (void) setupWithTel:(NSString *)telName { 69 70 headerFont = [UIFont boldSystemFontOfSize:kHeaderTextFontSize]; 71 txtFont = [UIFont boldSystemFontOfSize:kTextFontSize]; 72 57 73 self.title = telName; 58 self.abId = [NSNumber numberWithInt: UINT_MAX];74 self.abId = [NSNumber numberWithInt:NSUIntegerMax]; 59 75 self.cleanTelName = [NSMutableString stringWithString:self.title]; 60 76 [self.cleanTelName replaceOccurrencesOfString:@"-" … … 78 94 self.loadingAIView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; 79 95 self.loadingAIView.hidesWhenStopped = YES; 96 self.loadingAIButton = [[UIBarButtonItem alloc] initWithCustomView:self.loadingAIView]; 97 98 self.storeContactButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave 99 target:self 100 action:@selector(saveContact:)]; 80 101 81 102 // set the uinavbar of the root viewcontroller of the navcontroller 82 self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithCustomView:self.loadingAIView] autorelease];103 self.navigationItem.rightBarButtonItem = self.loadingAIButton; 83 104 84 105 [self.theTable reloadData]; 85 self.loadingCount = 3;106 loadingCount = 3; 86 107 [self performSelectorInBackground:@selector(getNaptrInBackgroundForTel:) withObject:self.title]; 87 108 [self performSelectorInBackground:@selector(getTxtInBackgroundForTel:) withObject:self.title]; … … 100 121 self.navigationItem.title = self.title; 101 122 if (!self.navigationItem.rightBarButtonItem) 102 self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithCustomView:self.loadingAIView] autorelease];123 self.navigationItem.rightBarButtonItem = self.loadingAIButton; 103 124 } 104 125 … … 117 138 } 118 139 119 - (void)setLoadingCount:(NSUInteger)newCount { 120 loadingCount = newCount; 140 - (void)decrementLoadingCount { 141 // Must call this on main thread, because it has UI needs and is called from background threads 142 if (![NSThread isMainThread]) { 143 [self performSelectorOnMainThread:@selector(decrementLoadingCount) 144 withObject:nil 145 waitUntilDone:YES]; 146 return; 147 } 148 loadingCount--; 149 NSLog(@"Count set to %d", loadingCount); 121 150 if (loadingCount == 0) { 122 151 [self.loadingAIView stopAnimating]; 152 self.navigationItem.rightBarButtonItem = self.storeContactButton; 123 153 } else { 124 154 [self.loadingAIView startAnimating]; 125 }126 155 self.navigationItem.rightBarButtonItem = self.loadingAIButton; 156 } 127 157 } 128 158 … … 194 224 } 195 225 UILabel *cellLabel; 196 cellLabel = [headerText sizeCellLabelWith BoldSystemFontOfSize:kHeaderTextFontSize paddingWidth:10.0f Height:10.0f];226 cellLabel = [headerText sizeCellLabelWithFont:headerFont paddingWidth:10.0f Height:10.0f]; 197 227 [cell.contentView addSubview:cellLabel]; 198 228 return cell; … … 247 277 cell = (UITableViewCell *)[txtCellNib objectAtIndex:0]; 248 278 } 249 [(UILabel *)[cell viewWithTag:1] setText:theRec.typeDescription]; 250 [(UILabel *)[cell viewWithTag:2] setText:theRec.textValue]; 279 [(UILabel *)[cell viewWithTag:1] setText:theRec.primaryDescription]; 280 if (theRec.primaryValue != NULL) { 281 [(UILabel *)[cell viewWithTag:3] setText:theRec.primaryValue]; 282 } else { 283 [(UILabel *)[cell viewWithTag:3] setText:@""]; 284 } 285 286 // Set the text description and resize the label accordingly 287 // We're not doing it like the header because we're using a nib for the cell 288 // (but we override the font size here) 289 UILabel *textDescriptionLabel = (UILabel *)[cell viewWithTag:2]; 290 textDescriptionLabel.text = theRec.textValue; 291 CGFloat width = textDescriptionLabel.frame.size.width; 292 CGFloat height = [textDescriptionLabel.text cellHeightForFont:txtFont paddingWidth:10.0f Height:6.0f]; 293 CGRect newframe = CGRectMake(textDescriptionLabel.frame.origin.x, textDescriptionLabel.frame.origin.y, width, height); 294 textDescriptionLabel.frame = newframe; 295 251 296 return cell; 252 297 } … … 358 403 FriendsMapViewController *fMVC = [FriendsMapViewController sharedInstance]; 359 404 fMVC.initialLoc = loc; 360 if ([ self.abId integerValue] == UINT_MAX) { // not one of our address book .tel domains405 if ([abId integerValue] == NSUIntegerMax) { // not one of our address book .tel domains 361 406 [fMVC setMarkerWithABRecordId:self.abId title:nil telname:self.title location:loc]; 362 407 } else { … … 381 426 switch (indexPath.section) { 382 427 case SECTION_HEADER: 383 return [headerText cellHeightForBoldSystemFontOfSize:kHeaderTextFontSize paddingWidth:10.0f Height:10.0f]; 428 { 429 return [headerText cellHeightForFont:headerFont paddingWidth:10.0f Height:10.0f]; 430 } 431 case SECTION_TXT: 432 { 433 RecordTxt *theRec = [self.txtArray objectAtIndex:indexPath.row]; 434 return [theRec.textValue cellHeightForFont:txtFont paddingWidth:10.0f Height:18.0f]; 435 } 384 436 default: 385 return (CGFloat) 59.0;437 return (CGFloat)44.0; 386 438 } 387 439 } … … 425 477 } 426 478 [[NetworkUtility sharedInstance] networkwillActivate:NO]; 479 [self decrementLoadingCount]; 427 480 [self.theTable performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:YES]; 428 self.loadingCount = self.loadingCount - 1;429 481 if (error) { 430 482 UIAlertView *errAlert = [[UIAlertView alloc] initWithTitle:@"Error" … … 444 496 [res release]; 445 497 [[NetworkUtility sharedInstance] networkwillActivate:NO]; 498 [self decrementLoadingCount]; 446 499 [self.theTable performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:YES]; 447 self.loadingCount = self.loadingCount - 1;448 500 } 449 501 … … 455 507 [res release]; 456 508 [[NetworkUtility sharedInstance] networkwillActivate:NO]; 509 [self decrementLoadingCount]; // Don't wait for reverse geo to say we're done, that's a bonus 457 510 if (locCount > 1) { 458 NSLog(@"Warning: %d LOC records in domain %@", locCount, telName);511 //NSLog(@"Warning: %d LOC records in domain %@", locCount, telName); 459 512 } 460 513 [self.theTable performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:YES]; 461 self.loadingCount = self.loadingCount - 1; // Don't wait for reverse geo to say we're done, that's a bonus462 514 if (locCount > 0) { 463 515 if (prefsReverseGeo) { … … 576 628 } 577 629 630 #pragma mark ------ Methods to save a contact 631 632 - (IBAction)saveContact:(id)sender { 633 if (abD) 634 [abD release]; 635 abD = [[DotTelABDelegate alloc] initWithViewController:self telName:self.title]; 636 abD.naptrArray = self.naptrArray; 637 abD.txtArray = self.txtArray; 638 NSError *err; 639 if ([abId integerValue] == NSUIntegerMax) { // not one of our address book .tel domains 640 err = [abD saveRecord]; 641 } else { 642 err = [abD saveRecordWithRecordId:[abId integerValue]]; 643 } 644 if (err) { 645 NSLog([err localizedDescription]); 646 } 647 } 648 578 649 @end 579 650 -
apps/iphone/superbook/trunk/Classes/NSString+UITableViewHelper.h
r363 r382 33 33 @interface NSString (UITableViewHelper) 34 34 35 - (CGFloat)textHeightFor BoldSystemFontOfSize:(CGFloat)sizepaddingWidth:(CGFloat)pW Height:(CGFloat)pH;36 - (CGFloat)cellHeightFor BoldSystemFontOfSize:(CGFloat)sizepaddingWidth:(CGFloat)pW Height:(CGFloat)pH;37 - (UILabel *)sizeCellLabelWith BoldSystemFontOfSize:(CGFloat)sizepaddingWidth:(CGFloat)pW Height:(CGFloat)pH;35 - (CGFloat)textHeightForFont:(UIFont *)font paddingWidth:(CGFloat)pW Height:(CGFloat)pH; 36 - (CGFloat)cellHeightForFont:(UIFont *)font paddingWidth:(CGFloat)pW Height:(CGFloat)pH; 37 - (UILabel *)sizeCellLabelWithFont:(UIFont *)font paddingWidth:(CGFloat)pW Height:(CGFloat)pH; 38 38 39 39 @end -
apps/iphone/superbook/trunk/Classes/NSString+UITableViewHelper.m
r363 r382 31 31 @implementation NSString (UITableViewHelper) 32 32 33 - (CGFloat)textHeightFor BoldSystemFontOfSize:(CGFloat)sizepaddingWidth:(CGFloat)pW Height:(CGFloat)pH {33 - (CGFloat)textHeightForFont:(UIFont *)font paddingWidth:(CGFloat)pW Height:(CGFloat)pH { 34 34 //Calculate the expected size based on the font and linebreak mode of the label 35 35 CGFloat maxWidth = [UIScreen mainScreen].bounds.size.width - pW*2; … … 37 37 CGSize maximumLabelSize = CGSizeMake(maxWidth,maxHeight); 38 38 39 CGSize expectedLabelSize = [self sizeWithFont: [UIFont boldSystemFontOfSize:size]39 CGSize expectedLabelSize = [self sizeWithFont:font 40 40 constrainedToSize:maximumLabelSize 41 41 lineBreakMode:UILineBreakModeWordWrap]; … … 44 44 } 45 45 46 - (CGFloat)cellHeightFor BoldSystemFontOfSize:(CGFloat)sizepaddingWidth:(CGFloat)pW Height:(CGFloat)pH {47 return [self textHeightFor BoldSystemFontOfSize:sizepaddingWidth:pW Height:pH] + pH*2;46 - (CGFloat)cellHeightForFont:(UIFont *)font paddingWidth:(CGFloat)pW Height:(CGFloat)pH { 47 return [self textHeightForFont:font paddingWidth:pW Height:pH] + pH*2; 48 48 } 49 49 50 - (UILabel *)sizeCellLabelWith BoldSystemFontOfSize:(CGFloat)sizepaddingWidth:(CGFloat)pW Height:(CGFloat)pH {50 - (UILabel *)sizeCellLabelWithFont:(UIFont *)font paddingWidth:(CGFloat)pW Height:(CGFloat)pH { 51 51 CGFloat width = [UIScreen mainScreen].bounds.size.width - pW*2; 52 CGFloat height = [self cellHeightFor BoldSystemFontOfSize:sizepaddingWidth:pW Height:pH];52 CGFloat height = [self cellHeightForFont:font paddingWidth:pW Height:pH]; 53 53 CGRect frame = CGRectMake(pW, pH, width, height); 54 54 UILabel *cellLabel = [[[UILabel alloc] initWithFrame:frame] autorelease]; … … 56 56 cellLabel.backgroundColor = [UIColor clearColor]; 57 57 cellLabel.textAlignment = UITextAlignmentLeft; 58 cellLabel.font = [UIFont boldSystemFontOfSize:size];58 cellLabel.font = font; 59 59 cellLabel.text = self; 60 60 cellLabel.numberOfLines = 0; -
apps/iphone/superbook/trunk/DotTel_SDK/Classes/DnsResolver.m
r363 r382 245 245 } 246 246 @catch (NSException * e) { 247 dict = [NSDictionary dictionaryWithObject:@"Network Error: Bad data returned" forKey:NSLocalizedDescriptionKey]; 248 err2 = [NSError errorWithDomain:@"org.telnic.tel.sdk" code:RESOLVER_STATUS_BAD_DATA userInfo:dict]; 249 if (error) 250 *error = err2; 247 // Exception is caught if there's no data in the rrlist, 248 // i.e. if there are no records. That's BAD. 249 // TODO: See in ldns rr.c source why ldns_rr_list_rr_count() fails and doesn't return 0 250 // In the meantime, disable the error 251 252 // dict = [NSDictionary dictionaryWithObject:@"Network Error: Bad data returned" forKey:NSLocalizedDescriptionKey]; 253 // err2 = [NSError errorWithDomain:@"org.telnic.tel.sdk" code:RESOLVER_STATUS_BAD_DATA userInfo:dict]; 254 // if (error) 255 // *error = err2; 251 256 rrlist = NULL; 252 257 } -
apps/iphone/superbook/trunk/DotTel_SDK/Classes/RecordNaptr.h
r363 r382 104 104 @property (readonly) BOOL isValid; 105 105 106 @property (readonly, nonatomic, retain) NSMutableArray *serviceTypeArray; 107 @property (readonly, nonatomic, retain) NSMutableArray *labelArray; 108 @property (readonly, nonatomic, retain) NSMutableArray *lihArray; 109 106 110 @property (readonly, nonatomic, retain) NSNumber *order; 107 111 @property (readonly, nonatomic, retain) NSNumber *preference; -
apps/iphone/superbook/trunk/DotTel_SDK/Classes/RecordNaptr.m
r366 r382 45 45 @implementation RecordNaptr 46 46 47 @synthesize serviceTypeArray; 48 @synthesize labelArray; 49 @synthesize lihArray; 50 47 51 @synthesize order; 48 52 @synthesize preference; … … 95 99 expiryDate = [lookupDate addTimeInterval:ttl]; 96 100 97 serviceTypeArray = [ NSMutableArray arrayWithCapacity:2];98 labelArray = [ NSMutableArray arrayWithCapacity:2];99 lihArray = [ NSMutableArray arrayWithCapacity:2];101 serviceTypeArray = [[NSMutableArray arrayWithCapacity:2] retain]; 102 labelArray = [[NSMutableArray arrayWithCapacity:2] retain]; 103 lihArray = [[NSMutableArray arrayWithCapacity:2] retain]; 100 104 101 105 order = [[self numberFromIntRdf:ldns_rr_rdf(rr,0)] retain]; -
apps/iphone/superbook/trunk/DotTel_SDK/Classes/RecordTxt.h
r363 r382 42 42 43 43 // Derived attributes 44 NSString *typeDescription; // keyword type(s) string 44 NSString *primaryDescription; // primary keyword type description (nl, pa, ...) 45 NSString *primaryValue; // primary keyword value 45 46 NSString *textValue; // string value of the TXT record 47 NSMutableArray *keysAndValues; // all keys and values of the TXT record (including primary key/value) 46 48 NSDate *expiryDate; // Expiry date of the record, based on time-to-live 47 49 … … 80 82 @property (readonly) BOOL isSystemMessage; 81 83 82 @property (readonly, nonatomic, retain) NSString *typeDescription; 84 @property (readonly, nonatomic, retain) NSString *primaryDescription; 85 @property (readonly, nonatomic, retain) NSString *primaryValue; 83 86 @property (readonly, nonatomic, retain) NSString *textValue; 87 @property (readonly, nonatomic, retain) NSMutableArray *keysAndValues; 84 88 @property (readonly, nonatomic, retain) NSDate *expiryDate; 85 89 -
apps/iphone/superbook/trunk/DotTel_SDK/Classes/RecordTxt.m
r363 r382 29 29 #import "RecordTxt.h" 30 30 31 static NSCharacterSet *trimCharacterSet; 32 31 33 @interface RecordTxt (PrivateMethods) 32 34 … … 45 47 @synthesize expiryDate; 46 48 47 @synthesize typeDescription; 49 @synthesize primaryDescription; 50 @synthesize primaryValue; 48 51 @synthesize textValue; 52 @synthesize keysAndValues; 49 53 50 54 + (id)recordWithRr:(ldns_rr *)rr { … … 69 73 - (id)initWithRr:(ldns_rr *)rr date:(NSDate *)lookupDate { 70 74 self = [super init]; 75 trimCharacterSet = [[NSCharacterSet whitespaceCharacterSet] retain]; 71 76 isValid = NO; 72 77 isKeyword = NO; 78 73 79 if (ldns_rr_get_type(rr) != LDNS_RR_TYPE_TXT) 74 80 return self; … … 80 86 if ([firstString isEqualToString:@".tkw"]) { 81 87 // parse keywords 88 isKeyword = YES; 82 89 isValid = [self parseKeywordsFromRecord:rr]; 83 90 } else if ([firstString isEqualToString:@".tsm"]) { 84 91 // system message, do nothing 85 92 return self; 93 } else if ([firstString isEqualToString:@".tad"]) { 94 // advert, do nothing for now 95 return self; 86 96 } else { 87 97 // header 88 98 isHeader = YES; 89 typeDescription= [@"" retain]; 99 primaryDescription = [@"" retain]; 100 primaryValue = NULL; 90 101 // Could have multiple strings in one record, they need to be joined together 91 102 NSMutableArray *stringComponents = [NSMutableArray arrayWithCapacity:2]; 92 // TODO: concatenate all the strings in that rr93 103 for (NSUInteger i=0; i < ldns_rr_rd_count(rr); i++) { 94 104 [stringComponents addObject:[self stringFromStringRdf:ldns_rr_rdf(rr,i)]]; 95 105 } 96 106 97 textValue = [stringComponents componentsJoinedByString:@" ,"];107 textValue = [stringComponents componentsJoinedByString:@" "]; 98 108 isValid = YES; 99 109 } … … 108 118 // will have more. Here we opt to concatenate all the values for these compound keywords 109 119 // and only keep the first type string, discarding all other type strings if they exist 120 // However, we also keep a full array of type+value in case the user wants to store that 121 // info into the address book. 110 122 111 123 // Check version 112 124 if ([[self stringFromStringRdf:ldns_rr_rdf(rr,1)] isEqualToString:@"1"]) { 113 125 // Version 1 114 typeDescription = [LocTelStr([self stringFromStringRdf:ldns_rr_rdf(rr,2)])retain];115 NSMutableArray *keyValueComponents = [NSMutableArray arrayWithCapacity:2];116 for (NSUInteger i=3; i < ldns_rr_rd_count(rr); i=i+2) {117 [key ValueComponents addObject:[self stringFromStringRdf:ldns_rr_rdf(rr,i)]];126 keysAndValues = [[NSMutableArray arrayWithCapacity:ldns_rr_rd_count(rr)] retain]; 127 for (NSUInteger i=2; i < ldns_rr_rd_count(rr); i=i+2) { 128 [keysAndValues addObject:[self stringFromStringRdf:ldns_rr_rdf(rr,i)]]; 129 [keysAndValues addObject:[self stringFromStringRdf:ldns_rr_rdf(rr,i+1)]]; 118 130 } 119 textValue = [[keyValueComponents componentsJoinedByString:@" "] retain]; 131 primaryDescription = [LocTelStr([keysAndValues objectAtIndex:0]) retain]; 132 if ([keysAndValues count] < 3) { // Only a single primary keyword/value 133 primaryValue = NULL; 134 textValue = [keysAndValues objectAtIndex:1]; 135 } else { 136 primaryValue = [keysAndValues objectAtIndex:1]; 137 NSMutableArray *keyValueComponents = [NSMutableArray arrayWithCapacity:2]; 138 for (NSUInteger i=1; i < [keysAndValues count]; i=i+2) { 139 [keyValueComponents addObject:[keysAndValues objectAtIndex:i]]; 140 } 141 textValue = [[[keyValueComponents componentsJoinedByString:@" "] 142 stringByTrimmingCharactersInSet:trimCharacterSet] retain]; 143 } 120 144 return TRUE; 121 145 } else { … … 137 161 } 138 162 163 #pragma mark ---- cleanup ---- 164 165 - (void)dealloc { 166 [trimCharacterSet release]; 167 [super dealloc]; 168 } 139 169 140 170 @end -
apps/iphone/superbook/trunk/LocateThem_Prefix.pch
r357 r382 8 8 #endif 9 9 10 // Shorthand for getting localized strings 10 11 #define LocStr(key) [[NSBundle mainBundle] localizedStringForKey:(key) value:@"" table:nil] 11 12 -
apps/iphone/superbook/trunk/LocTableViewCell.xib
r357 r382 3 3 <data> 4 4 <int key="IBDocument.SystemTarget">528</int> 5 <string key="IBDocument.SystemVersion">9 G55</string>5 <string key="IBDocument.SystemVersion">9J61</string> 6 6 <string key="IBDocument.InterfaceBuilderVersion">677</string> 7 <string key="IBDocument.AppKitVersion">949.4 3</string>7 <string key="IBDocument.AppKitVersion">949.46</string> 8 8 <string key="IBDocument.HIToolboxVersion">353.00</string> 9 9 <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> … … 45 45 <reference key="NSNextResponder" ref="28551456"/> 46 46 <int key="NSvFlags">292</int> 47 <string key="NSFrame">{{ 98, 39}, {126, 19}}</string>47 <string key="NSFrame">{{86, 23}, {177, 19}}</string> 48 48 <reference key="NSSuperview" ref="28551456"/> 49 49 <bool key="IBUIOpaque">NO</bool> … … 70 70 <reference key="NSNextResponder" ref="28551456"/> 71 71 <int key="NSvFlags">292</int> 72 <string key="NSFrame">{{12, 37}, {69, 21}}</string>72 <string key="NSFrame">{{12, 23}, {69, 19}}</string> 73 73 <reference key="NSSuperview" ref="28551456"/> 74 74 <bool key="IBUIOpaque">NO</bool> … … 85 85 <reference key="NSNextResponder" ref="28551456"/> 86 86 <int key="NSvFlags">292</int> 87 <string key="NSFrame">{{205, 7}, {92, 21}}</string>87 <string key="NSFrame">{{205, 2}, {92, 21}}</string> 88 88 <reference key="NSSuperview" ref="28551456"/> 89 89 <bool key="IBUIOpaque">NO</bool> … … 94 94 <object class="NSFont" key="IBUIFont"> 95 95 <string key="NSName">Helvetica</string> 96 <double key="NSSize">1. 800000e+01</double>96 <double key="NSSize">1.400000e+01</double> 97 97 <int key="NSfFlags">16</int> 98 98 </object> … … 105 105 <reference key="NSNextResponder" ref="28551456"/> 106 106 <int key="NSvFlags">292</int> 107 <string key="NSFrame">{{12, 6}, {157, 22}}</string>107 <string key="NSFrame">{{12, 2}, {157, 21}}</string> 108 108 <reference key="NSSuperview" ref="28551456"/> 109 109 <bool key="IBUIOpaque">NO</bool> … … 114 114 <object class="NSFont" key="IBUIFont"> 115 115 <string key="NSName">Helvetica-Bold</string> 116 <double key="NSSize">1. 800000e+01</double>116 <double key="NSSize">1.400000e+01</double> 117 117 <int key="NSfFlags">16</int> 118 118 </object> … … 125 125 <reference key="NSNextResponder" ref="28551456"/> 126 126 <int key="NSvFlags">-2147483356</int> 127 <string key="NSFrame">{{177, 7}, {20, 20}}</string>127 <string key="NSFrame">{{177, 3}, {20, 20}}</string> 128 128 <reference key="NSSuperview" ref="28551456"/> 129 129 <bool key="IBUIOpaque">NO</bool> … … 134 134 </object> 135 135 </object> 136 <string key="NSFrameSize">{ 297, 63}</string>136 <string key="NSFrameSize">{300, 44}</string> 137 137 <reference key="NSSuperview" ref="895293714"/> 138 138 <object class="NSColor" key="IBUIBackgroundColor"> … … 146 146 </object> 147 147 </object> 148 <string key="NSFrameSize">{320, 63}</string>148 <string key="NSFrameSize">{320, 44}</string> 149 149 <reference key="NSSuperview"/> 150 150 <object class="NSColor" key="IBUIBackgroundColor"> … … 190 190 <object class="NSMutableArray" key="children"> 191 191 <bool key="EncodedWithXMLCoder">YES</bool> 192 <reference ref="483724623"/>193 192 <reference ref="820518850"/> 194 193 <reference ref="283132979"/> 195 194 <reference ref="175760398"/> 196 195 <reference ref="1015408229"/> 196 <reference ref="483724623"/> 197 197 </object> 198 198 <reference key="parent" ref="360949347"/> … … 242 242 <string>UIResponder</string> 243 243 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> 244 <string>{{30, 3 30}, {320, 63}}</string>244 <string>{{30, 349}, {320, 44}}</string> 245 245 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> 246 246 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> … … 276 276 <string key="IBDocument.LastKnownRelativeProjectPath">LocateThem.xcodeproj</string> 277 277 <int key="IBDocument.defaultPropertyAccessControl">3</int> 278 <string key="IBCocoaTouchPluginVersion">3.0</string> 278 279 </data> 279 280 </archive> -
apps/iphone/superbook/trunk/NaptrTableViewCell.xib
r357 r382 3 3 <data> 4 4 <int key="IBDocument.SystemTarget">512</int> 5 <string key="IBDocument.SystemVersion">9 G55</string>5 <string key="IBDocument.SystemVersion">9J61</string> 6 6 <string key="IBDocument.InterfaceBuilderVersion">677</string> 7 <string key="IBDocument.AppKitVersion">949.4 3</string>7 <string key="IBDocument.AppKitVersion">949.46</string> 8 8 <string key="IBDocument.HIToolboxVersion">353.00</string> 9 9 <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> … … 45 45 <reference key="NSNextResponder" ref="286161198"/> 46 46 <int key="NSvFlags">292</int> 47 <string key="NSFrame">{{8, 6}, {162, 21}}</string>47 <string key="NSFrame">{{8, 5}, {169, 15}}</string> 48 48 <reference key="NSSuperview" ref="286161198"/> 49 49 <bool key="IBUIOpaque">NO</bool> … … 52 52 <bool key="IBUIUserInteractionEnabled">NO</bool> 53 53 <string key="IBUIText">Service Type</string> 54 <object class="NSFont" key="IBUIFont" id=" 282619197">54 <object class="NSFont" key="IBUIFont" id="946507737"> 55 55 <string key="NSName">Helvetica-Bold</string> 56 <double key="NSSize">1. 600000e+01</double>56 <double key="NSSize">1.400000e+01</double> 57 57 <int key="NSfFlags">16</int> 58 58 </object> … … 68 68 <reference key="NSNextResponder" ref="286161198"/> 69 69 <int key="NSvFlags">292</int> 70 <string key="NSFrame">{{1 87, 6}, {115, 21}}</string>70 <string key="NSFrame">{{192, 5}, {120, 15}}</string> 71 71 <reference key="NSSuperview" ref="286161198"/> 72 72 <bool key="IBUIOpaque">NO</bool> … … 75 75 <bool key="IBUIUserInteractionEnabled">NO</bool> 76 76 <string key="IBUIText">Label</string> 77 <reference key="IBUIFont" ref=" 282619197"/>77 <reference key="IBUIFont" ref="946507737"/> 78 78 <object class="NSColor" key="IBUITextColor"> 79 79 <int key="NSColorSpace">1</int> … … 88 88 <reference key="NSNextResponder" ref="286161198"/> 89 89 <int key="NSvFlags">292</int> 90 <string key="NSFrame">{{8, 2 6}, {285, 31}}</string>90 <string key="NSFrame">{{8, 21}, {285, 22}}</string> 91 91 <reference key="NSSuperview" ref="286161198"/> 92 92 <bool key="IBUIOpaque">NO</bool> … … 97 97 <object class="NSFont" key="IBUIFont"> 98 98 <string key="NSName">Helvetica</string> 99 <double key="NSSize">1. 600000e+01</double>99 <double key="NSSize">1.400000e+01</double> 100 100 <int key="NSfFlags">16</int> 101 101 </object> … … 109 109 <reference key="NSNextResponder" ref="286161198"/> 110 110 <int key="NSvFlags">-2147483356</int> 111 <string key="NSFrame">{{2 63, 31}, {20, 20}}</string>111 <string key="NSFrame">{{284, 21}, {20, 20}}</string> 112 112 <reference key="NSSuperview" ref="286161198"/> 113 113 <bool key="IBUIOpaque">NO</bool> … … 118 118 </object> 119 119 </object> 120 <string key="NSFrameSize">{3 13, 58}</string>120 <string key="NSFrameSize">{320, 43}</string> 121 121 <reference key="NSSuperview" ref="764223561"/> 122 122 <object class="NSColor" key="IBUIBackgroundColor"> … … 130 130 </object> 131 131 </object> 132 <string key="NSFrameSize">{3 13, 59}</string>132 <string key="NSFrameSize">{320, 44}</string> 133 133 <reference key="NSSuperview"/> 134 134 <object class="NSColor" key="IBUIBackgroundColor"> … … 176 176 <bool key="EncodedWithXMLCoder">YES</bool> 177 177 <reference ref="627271656"/> 178 <reference ref="12770826"/>179 178 <reference ref="1000921730"/> 180 179 <reference ref="187587257"/> 180 <reference ref="12770826"/> 181 181 </object> 182 182 <reference key="parent" ref="957960031"/> … … 227 227 <string>UIResponder</string> 228 228 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> 229 <string>{{ 44, 530}, {313, 59}}</string>229 <string>{{360, 757}, {320, 44}}</string> 230 230 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> 231 231 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> … … 272 272 <string key="IBDocument.LastKnownRelativeProjectPath">LocateThem.xcodeproj</string> 273 273 <int key="IBDocument.defaultPropertyAccessControl">3</int> 274 <string key="IBCocoaTouchPluginVersion">3.0</string> 274 275 </data> 275 276 </archive> -
apps/iphone/superbook/trunk/TxtTableViewCell.xib
r357 r382 3 3 <data> 4 4 <int key="IBDocument.SystemTarget">528</int> 5 <string key="IBDocument.SystemVersion">9 G55</string>5 <string key="IBDocument.SystemVersion">9J61</string> 6 6 <string key="IBDocument.InterfaceBuilderVersion">677</string> 7 <string key="IBDocument.AppKitVersion">949.4 3</string>7 <string key="IBDocument.AppKitVersion">949.46</string> 8 8 <string key="IBDocument.HIToolboxVersion">353.00</string> 9 9 <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> … … 45 45 <reference key="NSNextResponder" ref="351667048"/> 46 46 <int key="NSvFlags">292</int> 47 <string key="NSFrame">{{9, 5}, {282, 21}}</string>47 <string key="NSFrame">{{9, 4}, {185, 16}}</string> 48 48 <reference key="NSSuperview" ref="351667048"/> 49 49 <bool key="IBUIOpaque">NO</bool> … … 52 52 <bool key="IBUIUserInteractionEnabled">NO</bool> 53 53 <string key="IBUIText">Keyword Type</string> 54 <object class="NSFont" key="IBUIFont" >54 <object class="NSFont" key="IBUIFont" id="759531827"> 55 55 <string key="NSName">Helvetica-Bold</string> 56 <double key="NSSize">1. 500000e+01</double>56 <double key="NSSize">1.400000e+01</double> 57 57 <int key="NSfFlags">16</int> 58 58 </object> … … 68 68 <reference key="NSNextResponder" ref="351667048"/> 69 69 <int key="NSvFlags">292</int> 70 <string key="NSFrame">{{9, 2 7}, {282, 25}}</string>70 <string key="NSFrame">{{9, 20}, {303, 16}}</string> 71 71 <reference key="NSSuperview" ref="351667048"/> 72 72 <bool key="IBUIOpaque">NO</bool> … … 74 74 <int key="IBUITag">2</int> 75 75 <bool key="IBUIUserInteractionEnabled">NO</bool> 76 <string key="IBUIText">Keyword text string </string>76 <string key="IBUIText">Keyword text string (expands dynamically)</string> 77 77 <object class="NSFont" key="IBUIFont"> 78 78 <string key="NSName">Helvetica</string> 79 <double key="NSSize">1. 500000e+01</double>79 <double key="NSSize">1.400000e+01</double> 80 80 <int key="NSfFlags">16</int> 81 81 </object> … … 84 84 <int key="IBUIBaselineAdjustment">1</int> 85 85 <bool key="IBUIAdjustsFontSizeToFit">NO</bool> 86 <float key="IBUIMinimumFontSize">1. 000000e+01</float>87 <int key="IBUINumberOfLines"> 4</int>86 <float key="IBUIMinimumFontSize">1.400000e+01</float> 87 <int key="IBUINumberOfLines">0</int> 88 88 <int key="IBUILineBreakMode">0</int> 89 89 </object> 90 </object> 91 <string key="NSFrameSize">{322, 54}</string> 90 <object class="IBUILabel" id="506645348"> 91 <reference key="NSNextResponder" ref="351667048"/> 92 <int key="NSvFlags">292</int> 93 <string key="NSFrame">{{202, 5}, {110, 15}}</string> 94 <reference key="NSSuperview" ref="351667048"/> 95 <bool key="IBUIOpaque">NO</bool> 96 <bool key="IBUIClipsSubviews">YES</bool> 97 <int key="IBUITag">3</int> 98 <bool key="IBUIUserInteractionEnabled">NO</bool> 99 <string key="IBUIText">Label</string> 100 <reference key="IBUIFont" ref="759531827"/> 101 <object class="NSColor" key="IBUITextColor"> 102 <int key="NSColorSpace">1</int> 103 <bytes key="NSRGB">MCAwIDEAA</bytes> 104 </object> 105 <nil key="IBUIHighlightedColor"/> 106 <int key="IBUIBaselineAdjustment">1</int> 107 <float key="IBUIMinimumFontSize">1.000000e+01</float> 108 <int key="IBUITextAlignment">2</int> 109 </object> 110 </object> 111 <string key="NSFrameSize">{320, 44}</string> 92 112 <reference key="NSSuperview" ref="877144942"/> 93 113 <object class="NSColor" key="IBUIBackgroundColor"> … … 101 121 </object> 102 122 </object> 103 <string key="NSFrameSize">{32 2, 54}</string>123 <string key="NSFrameSize">{320, 44}</string> 104 124 <reference key="NSSuperview"/> 105 125 <object class="NSColor" key="IBUIBackgroundColor"> … … 148 168 <bool key="EncodedWithXMLCoder">YES</bool> 149 169 <reference ref="512545261"/> 170 <reference ref="506645348"/> 150 171 <reference ref="1047834826"/> 151 172 </object> … … 160 181 <int key="objectID">5</int> 161 182 <reference key="object" ref="1047834826"/> 183 <reference key="parent" ref="877144942"/> 184 </object> 185 <object class="IBObjectRecord"> 186 <int key="objectID">6</int> 187 <reference key="object" ref="506645348"/> 162 188 <reference key="parent" ref="877144942"/> 163 189 </object> … … 173 199 <string>4.IBPluginDependency</string> 174 200 <string>5.IBPluginDependency</string> 201 <string>6.IBPluginDependency</string> 175 202 </object> 176 203 <object class="NSMutableArray" key="dict.values"> 177 204 <bool key="EncodedWithXMLCoder">YES</bool> 178 205 <string>UIResponder</string> 179 <string>{{392, 472}, {322, 54}}</string> 206 <string>{{360, 682}, {320, 44}}</string> 207 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> 180 208 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> 181 209 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> … … 203 231 </object> 204 232 <nil key="sourceID"/> 205 <int key="maxID"> 5</int>233 <int key="maxID">6</int> 206 234 </object> 207 235 <object class="IBClassDescriber" key="IBDocument.Classes"/> … … 209 237 <string key="IBDocument.LastKnownRelativeProjectPath">LocateThem.xcodeproj</string> 210 238 <int key="IBDocument.defaultPropertyAccessControl">3</int> 239 <string key="IBCocoaTouchPluginVersion">3.0</string> 211 240 </data> 212 241 </archive>








