├── Demo ├── Classes │ ├── TSAVDemoAppDelegate.h │ ├── TSAVDemoAppDelegate.m │ ├── TSAVDemoViewController.h │ ├── TSAVDemoViewController.m │ └── TSAVDemoViewController.xib ├── MainWindow-iPad.xib ├── MainWindow.xib ├── TSAVDemo-Info.plist ├── TSAVDemo.xcodeproj │ ├── Nick.pbxuser │ ├── Nick.perspectivev3 │ └── project.pbxproj ├── TSAVDemo_Prefix.pch └── main.m ├── README.mdown ├── Source Code License.rtf └── TSAlertView ├── TSAlertView.h ├── TSAlertView.m ├── TSAlertViewBackground.png ├── TSAlertViewBackground2.png ├── TSAlertViewButtonBackground.png ├── TSAlertViewButtonBackground_Highlighted.png ├── TSAlertViewCancelButtonBackground.png └── TSAlertViewMessageListViewShadow.png /Demo/Classes/TSAVDemoAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // TSAVDemoAppDelegate.h 3 | // TSAVDemo 4 | // 5 | // Created by Nick Hodapp aka Tom Swift on 1/19/11. 6 | // 7 | 8 | #import 9 | 10 | 11 | @interface TSAVDemoAppDelegate : NSObject { 12 | UIWindow *window; 13 | UINavigationController *viewController; 14 | } 15 | 16 | @property (nonatomic, retain) IBOutlet UIWindow *window; 17 | @property (nonatomic, retain) IBOutlet UINavigationController *viewController; 18 | 19 | @end 20 | 21 | -------------------------------------------------------------------------------- /Demo/Classes/TSAVDemoAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // TSAVDemoAppDelegate.m 3 | // TSAVDemo 4 | // 5 | // Created by Nick Hodapp aka Tom Swift on 1/19/11. 6 | // 7 | 8 | #import "TSAVDemoAppDelegate.h" 9 | #import "TSAVDemoViewController.h" 10 | 11 | @implementation TSAVDemoAppDelegate 12 | 13 | @synthesize window; 14 | @synthesize viewController; 15 | 16 | 17 | #pragma mark - 18 | #pragma mark Application lifecycle 19 | 20 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 21 | 22 | // Override point for customization after application launch. 23 | 24 | // Add the view controller's view to the window and display. 25 | [self.window addSubview:viewController.view]; 26 | [self.window makeKeyAndVisible]; 27 | 28 | return YES; 29 | } 30 | 31 | 32 | - (void)applicationWillResignActive:(UIApplication *)application { 33 | /* 34 | Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 35 | Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 36 | */ 37 | } 38 | 39 | 40 | - (void)applicationDidEnterBackground:(UIApplication *)application { 41 | /* 42 | Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 43 | If your application supports background execution, called instead of applicationWillTerminate: when the user quits. 44 | */ 45 | } 46 | 47 | 48 | - (void)applicationWillEnterForeground:(UIApplication *)application { 49 | /* 50 | Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. 51 | */ 52 | } 53 | 54 | 55 | - (void)applicationDidBecomeActive:(UIApplication *)application { 56 | /* 57 | Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 58 | */ 59 | } 60 | 61 | 62 | - (void)applicationWillTerminate:(UIApplication *)application { 63 | /* 64 | Called when the application is about to terminate. 65 | See also applicationDidEnterBackground:. 66 | */ 67 | } 68 | 69 | 70 | #pragma mark - 71 | #pragma mark Memory management 72 | 73 | - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { 74 | /* 75 | Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. 76 | */ 77 | } 78 | 79 | 80 | - (void)dealloc { 81 | [viewController release]; 82 | [window release]; 83 | [super dealloc]; 84 | } 85 | 86 | 87 | @end 88 | -------------------------------------------------------------------------------- /Demo/Classes/TSAVDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TSAVDemoViewController.h 3 | // TSAVDemo 4 | // 5 | // Created by Nick Hodapp aka Tom Swift on 1/19/11. 6 | // 7 | 8 | #import 9 | 10 | 11 | @interface TSAVDemoViewController : UIViewController 12 | { 13 | IBOutlet UITextField* _titleTextField; 14 | 15 | IBOutlet UITextView* _messageTextView; 16 | 17 | IBOutlet UITextField* _widthTextField; 18 | 19 | IBOutlet UITextField* _maxHeightTextField; 20 | 21 | IBOutlet UITextField* _buttonCountTextField; 22 | 23 | 24 | IBOutlet UISwitch* _stackedSwitch; 25 | 26 | IBOutlet UISwitch* _usesTextViewSwitch; 27 | 28 | IBOutlet UISwitch* _hasInputFieldSwitch; 29 | } 30 | 31 | - (void) onAddMore: (id) sender; 32 | 33 | - (void) onShow: (id) sender; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Demo/Classes/TSAVDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TSAVDemoViewController.m 3 | // TSAVDemo 4 | // 5 | // Created by Nick Hodapp aka Tom Swift on 1/19/11. 6 | // 7 | 8 | #import "TSAVDemoViewController.h" 9 | #import "TSAlertView.h" 10 | 11 | @implementation TSAVDemoViewController 12 | 13 | // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. 14 | /* 15 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { 16 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 17 | if (self) { 18 | // Custom initialization. 19 | } 20 | return self; 21 | } 22 | */ 23 | 24 | /* 25 | // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. 26 | - (void)viewDidLoad { 27 | [super viewDidLoad]; 28 | } 29 | */ 30 | 31 | /* 32 | // Override to allow orientations other than the default portrait orientation. 33 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 34 | // Return YES for supported orientations. 35 | return (interfaceOrientation == UIInterfaceOrientationPortrait); 36 | } 37 | */ 38 | 39 | - (void) onAddMore:(id)sender 40 | { 41 | } 42 | 43 | - (void) onShow:(id)sender 44 | { 45 | [_messageTextView resignFirstResponder]; 46 | [_titleTextField resignFirstResponder]; 47 | [_widthTextField resignFirstResponder]; 48 | [_maxHeightTextField resignFirstResponder]; 49 | 50 | TSAlertView* av = [[[TSAlertView alloc] init] autorelease]; 51 | av.title = _titleTextField.text; 52 | av.message = _messageTextView.text; 53 | 54 | for ( int i = 0 ; i < [_buttonCountTextField.text intValue] ; i++ ) 55 | { 56 | [av addButtonWithTitle: [NSString stringWithFormat: @"Button %d", i]]; 57 | } 58 | 59 | av.style = _hasInputFieldSwitch.on ? TSAlertViewStyleInput : TSAlertViewStyleNormal; 60 | av.buttonLayout = _stackedSwitch.on ? TSAlertViewButtonLayoutStacked : TSAlertViewButtonLayoutNormal; 61 | av.usesMessageTextView = _usesTextViewSwitch.on; 62 | 63 | av.width = [_widthTextField.text floatValue]; 64 | av.maxHeight = [_maxHeightTextField.text floatValue]; 65 | 66 | [av show]; 67 | } 68 | 69 | - (BOOL)textFieldShouldReturn:(UITextField *)textField 70 | { 71 | [textField resignFirstResponder]; 72 | return YES; 73 | } 74 | 75 | - (void)didReceiveMemoryWarning { 76 | // Releases the view if it doesn't have a superview. 77 | [super didReceiveMemoryWarning]; 78 | 79 | // Release any cached data, images, etc. that aren't in use. 80 | } 81 | 82 | - (void)viewDidUnload { 83 | [super viewDidUnload]; 84 | // Release any retained subviews of the main view. 85 | // e.g. self.myOutlet = nil; 86 | } 87 | 88 | 89 | - (void)dealloc { 90 | [super dealloc]; 91 | } 92 | 93 | 94 | @end 95 | -------------------------------------------------------------------------------- /Demo/MainWindow-iPad.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1056 5 | 10H574 6 | 823 7 | 1038.35 8 | 461.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 132 12 | 13 | 14 | YES 15 | 16 | 17 | YES 18 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 19 | 20 | 21 | YES 22 | 23 | YES 24 | 25 | 26 | YES 27 | 28 | 29 | 30 | YES 31 | 32 | IBFilesOwner 33 | IBIPadFramework 34 | 35 | 36 | IBFirstResponder 37 | IBIPadFramework 38 | 39 | 40 | IBIPadFramework 41 | 42 | 43 | 44 | 2 45 | 46 | 47 | 1 48 | 49 | IBIPadFramework 50 | NO 51 | 52 | 53 | 256 54 | {0, 0} 55 | NO 56 | YES 57 | YES 58 | IBIPadFramework 59 | 60 | 61 | YES 62 | 63 | 64 | 65 | TSAlertView 66 | 67 | Show 68 | IBIPadFramework 69 | 2 70 | 71 | 72 | IBIPadFramework 73 | 74 | 75 | TSAVDemoViewController 76 | 77 | 78 | 79 | 1 80 | 81 | IBIPadFramework 82 | NO 83 | 84 | 85 | 86 | 87 | 88 | 292 89 | {768, 1004} 90 | 91 | 1 92 | MSAxIDEAA 93 | 94 | NO 95 | NO 96 | 97 | IBIPadFramework 98 | YES 99 | 100 | 101 | 102 | 103 | YES 104 | 105 | 106 | delegate 107 | 108 | 109 | 110 | 4 111 | 112 | 113 | 114 | window 115 | 116 | 117 | 118 | 14 119 | 120 | 121 | 122 | onShow: 123 | 124 | 125 | 126 | 31 127 | 128 | 129 | 130 | viewController 131 | 132 | 133 | 134 | 32 135 | 136 | 137 | 138 | 139 | YES 140 | 141 | 0 142 | 143 | 144 | 145 | 146 | 147 | -1 148 | 149 | 150 | File's Owner 151 | 152 | 153 | 3 154 | 155 | 156 | TSAVDemo App Delegate 157 | 158 | 159 | -2 160 | 161 | 162 | 163 | 164 | 12 165 | 166 | 167 | 168 | 169 | 24 170 | 171 | 172 | YES 173 | 174 | 175 | 176 | 177 | 178 | 179 | 26 180 | 181 | 182 | 183 | 184 | 22 185 | 186 | 187 | YES 188 | 189 | 190 | 191 | 192 | 193 | 28 194 | 195 | 196 | YES 197 | 198 | 199 | 200 | 201 | 202 | 29 203 | 204 | 205 | 206 | 207 | 208 | 209 | YES 210 | 211 | YES 212 | -1.CustomClassName 213 | -2.CustomClassName 214 | 12.IBEditorWindowLastContentRect 215 | 12.IBLastUsedUIStatusBarStylesToTargetRuntimesMap 216 | 12.IBPluginDependency 217 | 22.CustomClassName 218 | 22.IBEditorWindowLastContentRect 219 | 22.IBLastUsedUIStatusBarStylesToTargetRuntimesMap 220 | 22.IBPluginDependency 221 | 24.IBEditorWindowLastContentRect 222 | 24.IBLastUsedUIStatusBarStylesToTargetRuntimesMap 223 | 24.IBPluginDependency 224 | 26.IBPluginDependency 225 | 29.IBPluginDependency 226 | 3.CustomClassName 227 | 3.IBPluginDependency 228 | 229 | 230 | YES 231 | UIApplication 232 | UIResponder 233 | {{525, 346}, {320, 480}} 234 | 235 | IBCocoaTouchFramework 236 | 237 | 238 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 239 | TSAVDemoViewController 240 | {{0, 665}, {320, 480}} 241 | 242 | IBCocoaTouchFramework 243 | 244 | 245 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 246 | {{0, 665}, {320, 480}} 247 | 248 | IBCocoaTouchFramework 249 | 250 | 251 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 252 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 253 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 254 | TSAVDemoAppDelegate 255 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 256 | 257 | 258 | 259 | YES 260 | 261 | 262 | YES 263 | 264 | 265 | 266 | 267 | YES 268 | 269 | 270 | YES 271 | 272 | 273 | 274 | 32 275 | 276 | 277 | 278 | YES 279 | 280 | TSAVDemoAppDelegate 281 | NSObject 282 | 283 | YES 284 | 285 | YES 286 | viewController 287 | window 288 | 289 | 290 | YES 291 | UINavigationController 292 | UIWindow 293 | 294 | 295 | 296 | YES 297 | 298 | YES 299 | viewController 300 | window 301 | 302 | 303 | YES 304 | 305 | viewController 306 | UINavigationController 307 | 308 | 309 | window 310 | UIWindow 311 | 312 | 313 | 314 | 315 | IBProjectSource 316 | Classes/TSAVDemoAppDelegate.h 317 | 318 | 319 | 320 | TSAVDemoAppDelegate 321 | NSObject 322 | 323 | IBUserSource 324 | 325 | 326 | 327 | 328 | TSAVDemoViewController 329 | UIViewController 330 | 331 | YES 332 | 333 | YES 334 | onAddMore: 335 | onShow: 336 | 337 | 338 | YES 339 | id 340 | id 341 | 342 | 343 | 344 | YES 345 | 346 | YES 347 | onAddMore: 348 | onShow: 349 | 350 | 351 | YES 352 | 353 | onAddMore: 354 | id 355 | 356 | 357 | onShow: 358 | id 359 | 360 | 361 | 362 | 363 | YES 364 | 365 | YES 366 | _buttonCountTextField 367 | _hasInputFieldSwitch 368 | _maxHeightTextField 369 | _messageTextView 370 | _stackedSwitch 371 | _titleTextField 372 | _usesTextViewSwitch 373 | _widthTextField 374 | 375 | 376 | YES 377 | UITextField 378 | UISwitch 379 | UITextField 380 | UITextView 381 | UISwitch 382 | UITextField 383 | UISwitch 384 | UITextField 385 | 386 | 387 | 388 | YES 389 | 390 | YES 391 | _buttonCountTextField 392 | _hasInputFieldSwitch 393 | _maxHeightTextField 394 | _messageTextView 395 | _stackedSwitch 396 | _titleTextField 397 | _usesTextViewSwitch 398 | _widthTextField 399 | 400 | 401 | YES 402 | 403 | _buttonCountTextField 404 | UITextField 405 | 406 | 407 | _hasInputFieldSwitch 408 | UISwitch 409 | 410 | 411 | _maxHeightTextField 412 | UITextField 413 | 414 | 415 | _messageTextView 416 | UITextView 417 | 418 | 419 | _stackedSwitch 420 | UISwitch 421 | 422 | 423 | _titleTextField 424 | UITextField 425 | 426 | 427 | _usesTextViewSwitch 428 | UISwitch 429 | 430 | 431 | _widthTextField 432 | UITextField 433 | 434 | 435 | 436 | 437 | IBProjectSource 438 | TSAVDemoViewController.h 439 | 440 | 441 | 442 | UIWindow 443 | UIView 444 | 445 | IBUserSource 446 | 447 | 448 | 449 | 450 | 451 | YES 452 | 453 | NSObject 454 | 455 | IBFrameworkSource 456 | Foundation.framework/Headers/NSError.h 457 | 458 | 459 | 460 | NSObject 461 | 462 | IBFrameworkSource 463 | Foundation.framework/Headers/NSFileManager.h 464 | 465 | 466 | 467 | NSObject 468 | 469 | IBFrameworkSource 470 | Foundation.framework/Headers/NSKeyValueCoding.h 471 | 472 | 473 | 474 | NSObject 475 | 476 | IBFrameworkSource 477 | Foundation.framework/Headers/NSKeyValueObserving.h 478 | 479 | 480 | 481 | NSObject 482 | 483 | IBFrameworkSource 484 | Foundation.framework/Headers/NSKeyedArchiver.h 485 | 486 | 487 | 488 | NSObject 489 | 490 | IBFrameworkSource 491 | Foundation.framework/Headers/NSObject.h 492 | 493 | 494 | 495 | NSObject 496 | 497 | IBFrameworkSource 498 | Foundation.framework/Headers/NSRunLoop.h 499 | 500 | 501 | 502 | NSObject 503 | 504 | IBFrameworkSource 505 | Foundation.framework/Headers/NSThread.h 506 | 507 | 508 | 509 | NSObject 510 | 511 | IBFrameworkSource 512 | Foundation.framework/Headers/NSURL.h 513 | 514 | 515 | 516 | NSObject 517 | 518 | IBFrameworkSource 519 | Foundation.framework/Headers/NSURLConnection.h 520 | 521 | 522 | 523 | NSObject 524 | 525 | IBFrameworkSource 526 | UIKit.framework/Headers/UIAccessibility.h 527 | 528 | 529 | 530 | NSObject 531 | 532 | IBFrameworkSource 533 | UIKit.framework/Headers/UINibLoading.h 534 | 535 | 536 | 537 | NSObject 538 | 539 | IBFrameworkSource 540 | UIKit.framework/Headers/UIResponder.h 541 | 542 | 543 | 544 | UIApplication 545 | UIResponder 546 | 547 | IBFrameworkSource 548 | UIKit.framework/Headers/UIApplication.h 549 | 550 | 551 | 552 | UIBarButtonItem 553 | UIBarItem 554 | 555 | IBFrameworkSource 556 | UIKit.framework/Headers/UIBarButtonItem.h 557 | 558 | 559 | 560 | UIBarItem 561 | NSObject 562 | 563 | IBFrameworkSource 564 | UIKit.framework/Headers/UIBarItem.h 565 | 566 | 567 | 568 | UIControl 569 | UIView 570 | 571 | IBFrameworkSource 572 | UIKit.framework/Headers/UIControl.h 573 | 574 | 575 | 576 | UINavigationBar 577 | UIView 578 | 579 | IBFrameworkSource 580 | UIKit.framework/Headers/UINavigationBar.h 581 | 582 | 583 | 584 | UINavigationController 585 | UIViewController 586 | 587 | IBFrameworkSource 588 | UIKit.framework/Headers/UINavigationController.h 589 | 590 | 591 | 592 | UINavigationItem 593 | NSObject 594 | 595 | 596 | 597 | UIResponder 598 | NSObject 599 | 600 | 601 | 602 | UIScrollView 603 | UIView 604 | 605 | IBFrameworkSource 606 | UIKit.framework/Headers/UIScrollView.h 607 | 608 | 609 | 610 | UISearchBar 611 | UIView 612 | 613 | IBFrameworkSource 614 | UIKit.framework/Headers/UISearchBar.h 615 | 616 | 617 | 618 | UISearchDisplayController 619 | NSObject 620 | 621 | IBFrameworkSource 622 | UIKit.framework/Headers/UISearchDisplayController.h 623 | 624 | 625 | 626 | UISwitch 627 | UIControl 628 | 629 | IBFrameworkSource 630 | UIKit.framework/Headers/UISwitch.h 631 | 632 | 633 | 634 | UITextField 635 | UIControl 636 | 637 | IBFrameworkSource 638 | UIKit.framework/Headers/UITextField.h 639 | 640 | 641 | 642 | UITextView 643 | UIScrollView 644 | 645 | IBFrameworkSource 646 | UIKit.framework/Headers/UITextView.h 647 | 648 | 649 | 650 | UIView 651 | 652 | IBFrameworkSource 653 | UIKit.framework/Headers/UIPrintFormatter.h 654 | 655 | 656 | 657 | UIView 658 | 659 | 660 | 661 | UIView 662 | UIResponder 663 | 664 | IBFrameworkSource 665 | UIKit.framework/Headers/UIView.h 666 | 667 | 668 | 669 | UIViewController 670 | 671 | 672 | 673 | UIViewController 674 | 675 | IBFrameworkSource 676 | UIKit.framework/Headers/UIPopoverController.h 677 | 678 | 679 | 680 | UIViewController 681 | 682 | IBFrameworkSource 683 | UIKit.framework/Headers/UISplitViewController.h 684 | 685 | 686 | 687 | UIViewController 688 | 689 | IBFrameworkSource 690 | UIKit.framework/Headers/UITabBarController.h 691 | 692 | 693 | 694 | UIViewController 695 | UIResponder 696 | 697 | IBFrameworkSource 698 | UIKit.framework/Headers/UIViewController.h 699 | 700 | 701 | 702 | UIWindow 703 | UIView 704 | 705 | IBFrameworkSource 706 | UIKit.framework/Headers/UIWindow.h 707 | 708 | 709 | 710 | 711 | 0 712 | IBIPadFramework 713 | 714 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 715 | 716 | 717 | 718 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 719 | 720 | 721 | YES 722 | TSAVDemo.xcodeproj 723 | 3 724 | 132 725 | 726 | 727 | -------------------------------------------------------------------------------- /Demo/MainWindow.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1056 5 | 10H574 6 | 823 7 | 1038.35 8 | 461.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 132 12 | 13 | 14 | YES 15 | 16 | 17 | 18 | YES 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | YES 23 | 24 | YES 25 | 26 | 27 | YES 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | IBCocoaTouchFramework 35 | 36 | 37 | IBFirstResponder 38 | IBCocoaTouchFramework 39 | 40 | 41 | IBCocoaTouchFramework 42 | 43 | 44 | 45 | 46 | 1 47 | 48 | IBCocoaTouchFramework 49 | NO 50 | 51 | 52 | 256 53 | {0, 0} 54 | NO 55 | YES 56 | YES 57 | IBCocoaTouchFramework 58 | 59 | 60 | YES 61 | 62 | 63 | YES 64 | 65 | 66 | 67 | TSAlertView 68 | 69 | Show 70 | IBCocoaTouchFramework 71 | 2 72 | 73 | 74 | IBCocoaTouchFramework 75 | 76 | 77 | TSAVDemoViewController 78 | 79 | 80 | 81 | 1 82 | 83 | IBCocoaTouchFramework 84 | NO 85 | 86 | 87 | 88 | 89 | 90 | 292 91 | {320, 480} 92 | 93 | 1 94 | MSAxIDEAA 95 | 96 | NO 97 | NO 98 | 99 | IBCocoaTouchFramework 100 | YES 101 | 102 | 103 | 104 | 105 | YES 106 | 107 | 108 | delegate 109 | 110 | 111 | 112 | 4 113 | 114 | 115 | 116 | window 117 | 118 | 119 | 120 | 14 121 | 122 | 123 | 124 | onShow: 125 | 126 | 127 | 128 | 31 129 | 130 | 131 | 132 | viewController 133 | 134 | 135 | 136 | 32 137 | 138 | 139 | 140 | 141 | YES 142 | 143 | 0 144 | 145 | 146 | 147 | 148 | 149 | -1 150 | 151 | 152 | File's Owner 153 | 154 | 155 | 3 156 | 157 | 158 | TSAVDemo App Delegate 159 | 160 | 161 | -2 162 | 163 | 164 | 165 | 166 | 12 167 | 168 | 169 | 170 | 171 | 24 172 | 173 | 174 | YES 175 | 176 | 177 | 178 | 179 | 180 | 181 | 26 182 | 183 | 184 | 185 | 186 | 22 187 | 188 | 189 | YES 190 | 191 | 192 | 193 | 194 | 195 | 28 196 | 197 | 198 | YES 199 | 200 | 201 | 202 | 203 | 204 | 29 205 | 206 | 207 | 208 | 209 | 210 | 211 | YES 212 | 213 | YES 214 | -1.CustomClassName 215 | -2.CustomClassName 216 | 12.IBEditorWindowLastContentRect 217 | 12.IBPluginDependency 218 | 22.CustomClassName 219 | 22.IBEditorWindowLastContentRect 220 | 22.IBPluginDependency 221 | 24.IBEditorWindowLastContentRect 222 | 24.IBPluginDependency 223 | 26.IBPluginDependency 224 | 29.IBPluginDependency 225 | 3.CustomClassName 226 | 3.IBPluginDependency 227 | 228 | 229 | YES 230 | UIApplication 231 | UIResponder 232 | {{525, 346}, {320, 480}} 233 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 234 | TSAVDemoViewController 235 | {{0, 665}, {320, 480}} 236 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 237 | {{0, 665}, {320, 480}} 238 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 239 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 240 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 241 | TSAVDemoAppDelegate 242 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 243 | 244 | 245 | 246 | YES 247 | 248 | 249 | YES 250 | 251 | 252 | 253 | 254 | YES 255 | 256 | 257 | YES 258 | 259 | 260 | 261 | 32 262 | 263 | 264 | 265 | YES 266 | 267 | TSAVDemoAppDelegate 268 | NSObject 269 | 270 | YES 271 | 272 | YES 273 | viewController 274 | window 275 | 276 | 277 | YES 278 | UINavigationController 279 | UIWindow 280 | 281 | 282 | 283 | YES 284 | 285 | YES 286 | viewController 287 | window 288 | 289 | 290 | YES 291 | 292 | viewController 293 | UINavigationController 294 | 295 | 296 | window 297 | UIWindow 298 | 299 | 300 | 301 | 302 | IBProjectSource 303 | Classes/TSAVDemoAppDelegate.h 304 | 305 | 306 | 307 | TSAVDemoAppDelegate 308 | NSObject 309 | 310 | IBUserSource 311 | 312 | 313 | 314 | 315 | TSAVDemoViewController 316 | UIViewController 317 | 318 | YES 319 | 320 | YES 321 | onAddMore: 322 | onShow: 323 | 324 | 325 | YES 326 | id 327 | id 328 | 329 | 330 | 331 | YES 332 | 333 | YES 334 | onAddMore: 335 | onShow: 336 | 337 | 338 | YES 339 | 340 | onAddMore: 341 | id 342 | 343 | 344 | onShow: 345 | id 346 | 347 | 348 | 349 | 350 | YES 351 | 352 | YES 353 | _buttonCountTextField 354 | _hasInputFieldSwitch 355 | _maxHeightTextField 356 | _messageTextView 357 | _stackedSwitch 358 | _titleTextField 359 | _usesTextViewSwitch 360 | _widthTextField 361 | 362 | 363 | YES 364 | UITextField 365 | UISwitch 366 | UITextField 367 | UITextView 368 | UISwitch 369 | UITextField 370 | UISwitch 371 | UITextField 372 | 373 | 374 | 375 | YES 376 | 377 | YES 378 | _buttonCountTextField 379 | _hasInputFieldSwitch 380 | _maxHeightTextField 381 | _messageTextView 382 | _stackedSwitch 383 | _titleTextField 384 | _usesTextViewSwitch 385 | _widthTextField 386 | 387 | 388 | YES 389 | 390 | _buttonCountTextField 391 | UITextField 392 | 393 | 394 | _hasInputFieldSwitch 395 | UISwitch 396 | 397 | 398 | _maxHeightTextField 399 | UITextField 400 | 401 | 402 | _messageTextView 403 | UITextView 404 | 405 | 406 | _stackedSwitch 407 | UISwitch 408 | 409 | 410 | _titleTextField 411 | UITextField 412 | 413 | 414 | _usesTextViewSwitch 415 | UISwitch 416 | 417 | 418 | _widthTextField 419 | UITextField 420 | 421 | 422 | 423 | 424 | IBProjectSource 425 | TSAVDemoViewController.h 426 | 427 | 428 | 429 | UIWindow 430 | UIView 431 | 432 | IBUserSource 433 | 434 | 435 | 436 | 437 | 438 | YES 439 | 440 | NSObject 441 | 442 | IBFrameworkSource 443 | Foundation.framework/Headers/NSError.h 444 | 445 | 446 | 447 | NSObject 448 | 449 | IBFrameworkSource 450 | Foundation.framework/Headers/NSFileManager.h 451 | 452 | 453 | 454 | NSObject 455 | 456 | IBFrameworkSource 457 | Foundation.framework/Headers/NSKeyValueCoding.h 458 | 459 | 460 | 461 | NSObject 462 | 463 | IBFrameworkSource 464 | Foundation.framework/Headers/NSKeyValueObserving.h 465 | 466 | 467 | 468 | NSObject 469 | 470 | IBFrameworkSource 471 | Foundation.framework/Headers/NSKeyedArchiver.h 472 | 473 | 474 | 475 | NSObject 476 | 477 | IBFrameworkSource 478 | Foundation.framework/Headers/NSObject.h 479 | 480 | 481 | 482 | NSObject 483 | 484 | IBFrameworkSource 485 | Foundation.framework/Headers/NSRunLoop.h 486 | 487 | 488 | 489 | NSObject 490 | 491 | IBFrameworkSource 492 | Foundation.framework/Headers/NSThread.h 493 | 494 | 495 | 496 | NSObject 497 | 498 | IBFrameworkSource 499 | Foundation.framework/Headers/NSURL.h 500 | 501 | 502 | 503 | NSObject 504 | 505 | IBFrameworkSource 506 | Foundation.framework/Headers/NSURLConnection.h 507 | 508 | 509 | 510 | NSObject 511 | 512 | IBFrameworkSource 513 | UIKit.framework/Headers/UIAccessibility.h 514 | 515 | 516 | 517 | NSObject 518 | 519 | IBFrameworkSource 520 | UIKit.framework/Headers/UINibLoading.h 521 | 522 | 523 | 524 | NSObject 525 | 526 | IBFrameworkSource 527 | UIKit.framework/Headers/UIResponder.h 528 | 529 | 530 | 531 | UIApplication 532 | UIResponder 533 | 534 | IBFrameworkSource 535 | UIKit.framework/Headers/UIApplication.h 536 | 537 | 538 | 539 | UIBarButtonItem 540 | UIBarItem 541 | 542 | IBFrameworkSource 543 | UIKit.framework/Headers/UIBarButtonItem.h 544 | 545 | 546 | 547 | UIBarItem 548 | NSObject 549 | 550 | IBFrameworkSource 551 | UIKit.framework/Headers/UIBarItem.h 552 | 553 | 554 | 555 | UIControl 556 | UIView 557 | 558 | IBFrameworkSource 559 | UIKit.framework/Headers/UIControl.h 560 | 561 | 562 | 563 | UINavigationBar 564 | UIView 565 | 566 | IBFrameworkSource 567 | UIKit.framework/Headers/UINavigationBar.h 568 | 569 | 570 | 571 | UINavigationController 572 | UIViewController 573 | 574 | IBFrameworkSource 575 | UIKit.framework/Headers/UINavigationController.h 576 | 577 | 578 | 579 | UINavigationItem 580 | NSObject 581 | 582 | 583 | 584 | UIResponder 585 | NSObject 586 | 587 | 588 | 589 | UIScrollView 590 | UIView 591 | 592 | IBFrameworkSource 593 | UIKit.framework/Headers/UIScrollView.h 594 | 595 | 596 | 597 | UISearchBar 598 | UIView 599 | 600 | IBFrameworkSource 601 | UIKit.framework/Headers/UISearchBar.h 602 | 603 | 604 | 605 | UISearchDisplayController 606 | NSObject 607 | 608 | IBFrameworkSource 609 | UIKit.framework/Headers/UISearchDisplayController.h 610 | 611 | 612 | 613 | UISwitch 614 | UIControl 615 | 616 | IBFrameworkSource 617 | UIKit.framework/Headers/UISwitch.h 618 | 619 | 620 | 621 | UITextField 622 | UIControl 623 | 624 | IBFrameworkSource 625 | UIKit.framework/Headers/UITextField.h 626 | 627 | 628 | 629 | UITextView 630 | UIScrollView 631 | 632 | IBFrameworkSource 633 | UIKit.framework/Headers/UITextView.h 634 | 635 | 636 | 637 | UIView 638 | 639 | IBFrameworkSource 640 | UIKit.framework/Headers/UIPrintFormatter.h 641 | 642 | 643 | 644 | UIView 645 | 646 | 647 | 648 | UIView 649 | UIResponder 650 | 651 | IBFrameworkSource 652 | UIKit.framework/Headers/UIView.h 653 | 654 | 655 | 656 | UIViewController 657 | 658 | 659 | 660 | UIViewController 661 | 662 | IBFrameworkSource 663 | UIKit.framework/Headers/UIPopoverController.h 664 | 665 | 666 | 667 | UIViewController 668 | 669 | IBFrameworkSource 670 | UIKit.framework/Headers/UISplitViewController.h 671 | 672 | 673 | 674 | UIViewController 675 | 676 | IBFrameworkSource 677 | UIKit.framework/Headers/UITabBarController.h 678 | 679 | 680 | 681 | UIViewController 682 | UIResponder 683 | 684 | IBFrameworkSource 685 | UIKit.framework/Headers/UIViewController.h 686 | 687 | 688 | 689 | UIWindow 690 | UIView 691 | 692 | IBFrameworkSource 693 | UIKit.framework/Headers/UIWindow.h 694 | 695 | 696 | 697 | 698 | 0 699 | IBCocoaTouchFramework 700 | 701 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 702 | 703 | 704 | 705 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 706 | 707 | 708 | YES 709 | TSAVDemo.xcodeproj 710 | 3 711 | 132 712 | 713 | 714 | -------------------------------------------------------------------------------- /Demo/TSAVDemo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | NSMainNibFile~ipad 30 | MainWindow-iPad 31 | UIStatusBarHidden 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Demo/TSAVDemo.xcodeproj/Nick.pbxuser: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | 0110735812EBA60D00BAC93C /* README.mdown */ = { 4 | uiCtxt = { 5 | sepNavIntBoundsRect = "{{0, 0}, {2091, 910}}"; 6 | sepNavSelRange = "{3740, 0}"; 7 | sepNavVisRange = "{1267, 2761}"; 8 | }; 9 | }; 10 | 013DD51A12ECF0D300B34A41 /* Source Code License.rtf */ = { 11 | uiCtxt = { 12 | sepNavIntBoundsRect = "{{0, 0}, {957, 1108}}"; 13 | sepNavSelRange = "{0, 0}"; 14 | sepNavVisRect = "{{0, 0}, {957, 728}}"; 15 | }; 16 | }; 17 | 013DD51C12ECF2C000B34A41 /* PBXTextBookmark */ = { 18 | isa = PBXTextBookmark; 19 | fRef = 01A5389912E954E400B0F4A4 /* TSAlertView.m */; 20 | name = "TSAlertView.m: 4"; 21 | rLen = 56; 22 | rLoc = 24; 23 | rType = 0; 24 | vrLen = 1545; 25 | vrLoc = 0; 26 | }; 27 | 013DD51D12ECF2C000B34A41 /* PBXTextBookmark */ = { 28 | isa = PBXTextBookmark; 29 | fRef = 01A5389812E954E400B0F4A4 /* TSAlertView.h */; 30 | name = "TSAlertView.h: 6"; 31 | rLen = 0; 32 | rLoc = 80; 33 | rType = 0; 34 | vrLen = 1689; 35 | vrLoc = 0; 36 | }; 37 | 013DD51E12ECF2C000B34A41 /* PBXBookmark */ = { 38 | isa = PBXBookmark; 39 | fRef = 01A5389A12E954E400B0F4A4 /* TSAlertViewMessageListViewShadow.png */; 40 | }; 41 | 013DD51F12ECF2C000B34A41 /* PBXBookmark */ = { 42 | isa = PBXBookmark; 43 | fRef = 01A5389B12E954E400B0F4A4 /* TSAlertViewBackground.png */; 44 | }; 45 | 013DD52012ECF2C000B34A41 /* PBXBookmark */ = { 46 | isa = PBXBookmark; 47 | fRef = 01A5389C12E954E400B0F4A4 /* TSAlertViewBackground2.png */; 48 | }; 49 | 013DD52112ECF2C000B34A41 /* PBXBookmark */ = { 50 | isa = PBXBookmark; 51 | fRef = 01A5389D12E954E400B0F4A4 /* TSAlertViewButtonBackground.png */; 52 | }; 53 | 013DD52212ECF2C000B34A41 /* PBXBookmark */ = { 54 | isa = PBXBookmark; 55 | fRef = 01A5389E12E954E400B0F4A4 /* TSAlertViewButtonBackground_Highlighted.png */; 56 | }; 57 | 013DD52312ECF2C000B34A41 /* PBXBookmark */ = { 58 | isa = PBXBookmark; 59 | fRef = 01A5389F12E954E400B0F4A4 /* TSAlertViewCancelButtonBackground.png */; 60 | }; 61 | 013DD52412ECF2C000B34A41 /* PBXTextBookmark */ = { 62 | isa = PBXTextBookmark; 63 | fRef = 1D3623250D0F684500981E51 /* TSAVDemoAppDelegate.m */; 64 | name = "TSAVDemoAppDelegate.m: 7"; 65 | rLen = 0; 66 | rLoc = 101; 67 | rType = 0; 68 | vrLen = 2107; 69 | vrLoc = 0; 70 | }; 71 | 013DD52512ECF2C000B34A41 /* PBXTextBookmark */ = { 72 | isa = PBXTextBookmark; 73 | fRef = 1D3623240D0F684500981E51 /* TSAVDemoAppDelegate.h */; 74 | name = "TSAVDemoAppDelegate.h: 7"; 75 | rLen = 0; 76 | rLoc = 101; 77 | rType = 0; 78 | vrLen = 408; 79 | vrLoc = 0; 80 | }; 81 | 013DD52612ECF2C000B34A41 /* PBXTextBookmark */ = { 82 | isa = PBXTextBookmark; 83 | fRef = 01A5399912E9F4A600B0F4A4 /* TSAVDemoViewController.h */; 84 | name = "TSAVDemoViewController.h: 7"; 85 | rLen = 0; 86 | rLoc = 104; 87 | rType = 0; 88 | vrLen = 653; 89 | vrLoc = 0; 90 | }; 91 | 013DD52712ECF2C000B34A41 /* PBXTextBookmark */ = { 92 | isa = PBXTextBookmark; 93 | fRef = 32CA4F630368D1EE00C91783 /* TSAVDemo_Prefix.pch */; 94 | name = "TSAVDemo_Prefix.pch: 1"; 95 | rLen = 0; 96 | rLoc = 0; 97 | rType = 0; 98 | vrLen = 185; 99 | vrLoc = 0; 100 | }; 101 | 013DD52812ECF2C000B34A41 /* PBXTextBookmark */ = { 102 | isa = PBXTextBookmark; 103 | fRef = 29B97316FDCFA39411CA2CEA /* main.m */; 104 | name = "main.m: 7"; 105 | rLen = 0; 106 | rLoc = 86; 107 | rType = 0; 108 | vrLen = 316; 109 | vrLoc = 0; 110 | }; 111 | 013DD52912ECF2C000B34A41 /* PlistBookmark */ = { 112 | isa = PlistBookmark; 113 | fRef = 8D1107310486CEB800E47090 /* TSAVDemo-Info.plist */; 114 | fallbackIsa = PBXBookmark; 115 | isK = 0; 116 | kPath = ( 117 | UIStatusBarHidden, 118 | ); 119 | name = "/Users/Nick/Documents/Projects/tools/TSAlertView/Demo/TSAVDemo-Info.plist"; 120 | rLen = 0; 121 | rLoc = 9223372036854775808; 122 | }; 123 | 013DD52A12ECF2C000B34A41 /* PBXTextBookmark */ = { 124 | isa = PBXTextBookmark; 125 | fRef = 01A5399A12E9F4A600B0F4A4 /* TSAVDemoViewController.m */; 126 | name = "TSAVDemoViewController.m: 7"; 127 | rLen = 0; 128 | rLoc = 104; 129 | rType = 0; 130 | vrLen = 1492; 131 | vrLoc = 0; 132 | }; 133 | 013DD54812EDD0DF00B34A41 /* PBXTextBookmark */ = { 134 | isa = PBXTextBookmark; 135 | fRef = 013DD51A12ECF0D300B34A41 /* Source Code License.rtf */; 136 | name = "Source Code License.rtf: 5"; 137 | rLen = 0; 138 | rLoc = 120; 139 | rType = 0; 140 | vrLen = 2482; 141 | vrLoc = 0; 142 | }; 143 | 013DD54912EDD0DF00B34A41 /* PBXTextBookmark */ = { 144 | isa = PBXTextBookmark; 145 | fRef = 0110735812EBA60D00BAC93C /* README.mdown */; 146 | name = "README.mdown: 29"; 147 | rLen = 0; 148 | rLoc = 2391; 149 | rType = 0; 150 | vrLen = 3158; 151 | vrLoc = 0; 152 | }; 153 | 013DD54F12EDE07400B34A41 /* PBXTextBookmark */ = { 154 | isa = PBXTextBookmark; 155 | fRef = 0110735812EBA60D00BAC93C /* README.mdown */; 156 | name = "README.mdown: 62"; 157 | rLen = 0; 158 | rLoc = 3740; 159 | rType = 0; 160 | vrLen = 2668; 161 | vrLoc = 1360; 162 | }; 163 | 01A5388212E954A500B0F4A4 /* TSAVDemo */ = { 164 | isa = PBXExecutable; 165 | activeArgIndices = ( 166 | ); 167 | argumentStrings = ( 168 | ); 169 | autoAttachOnCrash = 1; 170 | breakpointsEnabled = 1; 171 | configStateDict = { 172 | }; 173 | customDataFormattersEnabled = 1; 174 | dataTipCustomDataFormattersEnabled = 1; 175 | dataTipShowTypeColumn = 1; 176 | dataTipSortType = 0; 177 | debuggerPlugin = GDBDebugging; 178 | disassemblyDisplayState = 0; 179 | dylibVariantSuffix = ""; 180 | enableDebugStr = 1; 181 | environmentEntries = ( 182 | ); 183 | executableSystemSymbolLevel = 0; 184 | executableUserSymbolLevel = 0; 185 | libgmallocEnabled = 0; 186 | name = TSAVDemo; 187 | savedGlobals = { 188 | }; 189 | showTypeColumn = 0; 190 | sourceDirectories = ( 191 | ); 192 | variableFormatDictionary = { 193 | }; 194 | }; 195 | 01A5388D12E954AD00B0F4A4 /* Source Control */ = { 196 | isa = PBXSourceControlManager; 197 | fallbackIsa = XCSourceControlManager; 198 | isSCMEnabled = 0; 199 | scmConfiguration = { 200 | repositoryNamesForRoots = { 201 | "" = ""; 202 | }; 203 | }; 204 | }; 205 | 01A5388E12E954AD00B0F4A4 /* Code sense */ = { 206 | isa = PBXCodeSenseManager; 207 | indexTemplatePath = ""; 208 | }; 209 | 01A5389812E954E400B0F4A4 /* TSAlertView.h */ = { 210 | uiCtxt = { 211 | sepNavIntBoundsRect = "{{0, 0}, {937, 1144}}"; 212 | sepNavSelRange = "{80, 0}"; 213 | sepNavVisRange = "{0, 1689}"; 214 | }; 215 | }; 216 | 01A5389912E954E400B0F4A4 /* TSAlertView.m */ = { 217 | uiCtxt = { 218 | sepNavIntBoundsRect = "{{0, 0}, {1307, 10205}}"; 219 | sepNavSelRange = "{24, 56}"; 220 | sepNavVisRange = "{0, 1545}"; 221 | }; 222 | }; 223 | 01A5399912E9F4A600B0F4A4 /* TSAVDemoViewController.h */ = { 224 | uiCtxt = { 225 | sepNavIntBoundsRect = "{{0, 0}, {937, 738}}"; 226 | sepNavSelRange = "{104, 0}"; 227 | sepNavVisRange = "{0, 653}"; 228 | }; 229 | }; 230 | 01A5399A12E9F4A600B0F4A4 /* TSAVDemoViewController.m */ = { 231 | uiCtxt = { 232 | sepNavIntBoundsRect = "{{0, 0}, {1139, 1209}}"; 233 | sepNavSelRange = "{104, 0}"; 234 | sepNavVisRange = "{0, 1492}"; 235 | }; 236 | }; 237 | 1D3623240D0F684500981E51 /* TSAVDemoAppDelegate.h */ = { 238 | uiCtxt = { 239 | sepNavIntBoundsRect = "{{0, 0}, {937, 738}}"; 240 | sepNavSelRange = "{101, 0}"; 241 | sepNavVisRange = "{0, 408}"; 242 | }; 243 | }; 244 | 1D3623250D0F684500981E51 /* TSAVDemoAppDelegate.m */ = { 245 | uiCtxt = { 246 | sepNavIntBoundsRect = "{{0, 0}, {1965, 1027}}"; 247 | sepNavSelRange = "{101, 0}"; 248 | sepNavVisRange = "{0, 2107}"; 249 | }; 250 | }; 251 | 1D6058900D05DD3D006BFB54 /* TSAVDemo */ = { 252 | activeExec = 0; 253 | executables = ( 254 | 01A5388212E954A500B0F4A4 /* TSAVDemo */, 255 | ); 256 | }; 257 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 258 | activeBuildConfigurationName = Debug; 259 | activeExecutable = 01A5388212E954A500B0F4A4 /* TSAVDemo */; 260 | activeSDKPreference = iphonesimulator4.2; 261 | activeTarget = 1D6058900D05DD3D006BFB54 /* TSAVDemo */; 262 | addToTargets = ( 263 | 1D6058900D05DD3D006BFB54 /* TSAVDemo */, 264 | ); 265 | breakpoints = ( 266 | ); 267 | codeSenseManager = 01A5388E12E954AD00B0F4A4 /* Code sense */; 268 | executables = ( 269 | 01A5388212E954A500B0F4A4 /* TSAVDemo */, 270 | ); 271 | perUserDictionary = { 272 | PBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = { 273 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 274 | PBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID; 275 | PBXFileTableDataSourceColumnWidthsKey = ( 276 | 22, 277 | 300, 278 | 654, 279 | ); 280 | PBXFileTableDataSourceColumnsKey = ( 281 | PBXExecutablesDataSource_ActiveFlagID, 282 | PBXExecutablesDataSource_NameID, 283 | PBXExecutablesDataSource_CommentsID, 284 | ); 285 | }; 286 | PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { 287 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 288 | PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; 289 | PBXFileTableDataSourceColumnWidthsKey = ( 290 | 20, 291 | 759, 292 | 20, 293 | 48, 294 | 43, 295 | 43, 296 | 20, 297 | ); 298 | PBXFileTableDataSourceColumnsKey = ( 299 | PBXFileDataSource_FiletypeID, 300 | PBXFileDataSource_Filename_ColumnID, 301 | PBXFileDataSource_Built_ColumnID, 302 | PBXFileDataSource_ObjectSize_ColumnID, 303 | PBXFileDataSource_Errors_ColumnID, 304 | PBXFileDataSource_Warnings_ColumnID, 305 | PBXFileDataSource_Target_ColumnID, 306 | ); 307 | }; 308 | PBXConfiguration.PBXFileTableDataSource3.PBXFindDataSource = { 309 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 310 | PBXFileTableDataSourceColumnSortingKey = PBXFindDataSource_LocationID; 311 | PBXFileTableDataSourceColumnWidthsKey = ( 312 | 200, 313 | 773, 314 | ); 315 | PBXFileTableDataSourceColumnsKey = ( 316 | PBXFindDataSource_MessageID, 317 | PBXFindDataSource_LocationID, 318 | ); 319 | }; 320 | PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { 321 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 322 | PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; 323 | PBXFileTableDataSourceColumnWidthsKey = ( 324 | 20, 325 | 726, 326 | 60, 327 | 20, 328 | 48.16259765625, 329 | 43, 330 | 43, 331 | ); 332 | PBXFileTableDataSourceColumnsKey = ( 333 | PBXFileDataSource_FiletypeID, 334 | PBXFileDataSource_Filename_ColumnID, 335 | PBXTargetDataSource_PrimaryAttribute, 336 | PBXFileDataSource_Built_ColumnID, 337 | PBXFileDataSource_ObjectSize_ColumnID, 338 | PBXFileDataSource_Errors_ColumnID, 339 | PBXFileDataSource_Warnings_ColumnID, 340 | ); 341 | }; 342 | PBXPerProjectTemplateStateSaveDate = 317665556; 343 | PBXWorkspaceStateSaveDate = 317665556; 344 | }; 345 | perUserProjectItems = { 346 | 013DD51C12ECF2C000B34A41 = 013DD51C12ECF2C000B34A41 /* PBXTextBookmark */; 347 | 013DD51D12ECF2C000B34A41 = 013DD51D12ECF2C000B34A41 /* PBXTextBookmark */; 348 | 013DD51E12ECF2C000B34A41 = 013DD51E12ECF2C000B34A41 /* PBXBookmark */; 349 | 013DD51F12ECF2C000B34A41 = 013DD51F12ECF2C000B34A41 /* PBXBookmark */; 350 | 013DD52012ECF2C000B34A41 = 013DD52012ECF2C000B34A41 /* PBXBookmark */; 351 | 013DD52112ECF2C000B34A41 = 013DD52112ECF2C000B34A41 /* PBXBookmark */; 352 | 013DD52212ECF2C000B34A41 = 013DD52212ECF2C000B34A41 /* PBXBookmark */; 353 | 013DD52312ECF2C000B34A41 = 013DD52312ECF2C000B34A41 /* PBXBookmark */; 354 | 013DD52412ECF2C000B34A41 = 013DD52412ECF2C000B34A41 /* PBXTextBookmark */; 355 | 013DD52512ECF2C000B34A41 = 013DD52512ECF2C000B34A41 /* PBXTextBookmark */; 356 | 013DD52612ECF2C000B34A41 = 013DD52612ECF2C000B34A41 /* PBXTextBookmark */; 357 | 013DD52712ECF2C000B34A41 = 013DD52712ECF2C000B34A41 /* PBXTextBookmark */; 358 | 013DD52812ECF2C000B34A41 = 013DD52812ECF2C000B34A41 /* PBXTextBookmark */; 359 | 013DD52912ECF2C000B34A41 = 013DD52912ECF2C000B34A41 /* PlistBookmark */; 360 | 013DD52A12ECF2C000B34A41 = 013DD52A12ECF2C000B34A41 /* PBXTextBookmark */; 361 | 013DD54812EDD0DF00B34A41 = 013DD54812EDD0DF00B34A41 /* PBXTextBookmark */; 362 | 013DD54912EDD0DF00B34A41 = 013DD54912EDD0DF00B34A41 /* PBXTextBookmark */; 363 | 013DD54F12EDE07400B34A41 = 013DD54F12EDE07400B34A41 /* PBXTextBookmark */; 364 | }; 365 | sourceControlManager = 01A5388D12E954AD00B0F4A4 /* Source Control */; 366 | userBuildSettings = { 367 | }; 368 | }; 369 | 29B97316FDCFA39411CA2CEA /* main.m */ = { 370 | uiCtxt = { 371 | sepNavIntBoundsRect = "{{0, 0}, {937, 738}}"; 372 | sepNavSelRange = "{86, 0}"; 373 | sepNavVisRange = "{0, 316}"; 374 | }; 375 | }; 376 | 32CA4F630368D1EE00C91783 /* TSAVDemo_Prefix.pch */ = { 377 | uiCtxt = { 378 | sepNavIntBoundsRect = "{{0, 0}, {937, 738}}"; 379 | sepNavSelRange = "{0, 0}"; 380 | sepNavVisRange = "{0, 185}"; 381 | }; 382 | }; 383 | } 384 | -------------------------------------------------------------------------------- /Demo/TSAVDemo.xcodeproj/Nick.perspectivev3: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ActivePerspectiveName 6 | Project 7 | AllowedModules 8 | 9 | 10 | BundleLoadPath 11 | 12 | MaxInstances 13 | n 14 | Module 15 | PBXSmartGroupTreeModule 16 | Name 17 | Groups and Files Outline View 18 | 19 | 20 | BundleLoadPath 21 | 22 | MaxInstances 23 | n 24 | Module 25 | PBXNavigatorGroup 26 | Name 27 | Editor 28 | 29 | 30 | BundleLoadPath 31 | 32 | MaxInstances 33 | n 34 | Module 35 | XCTaskListModule 36 | Name 37 | Task List 38 | 39 | 40 | BundleLoadPath 41 | 42 | MaxInstances 43 | n 44 | Module 45 | XCDetailModule 46 | Name 47 | File and Smart Group Detail Viewer 48 | 49 | 50 | BundleLoadPath 51 | 52 | MaxInstances 53 | 1 54 | Module 55 | PBXBuildResultsModule 56 | Name 57 | Detailed Build Results Viewer 58 | 59 | 60 | BundleLoadPath 61 | 62 | MaxInstances 63 | 1 64 | Module 65 | PBXProjectFindModule 66 | Name 67 | Project Batch Find Tool 68 | 69 | 70 | BundleLoadPath 71 | 72 | MaxInstances 73 | n 74 | Module 75 | XCProjectFormatConflictsModule 76 | Name 77 | Project Format Conflicts List 78 | 79 | 80 | BundleLoadPath 81 | 82 | MaxInstances 83 | n 84 | Module 85 | PBXBookmarksModule 86 | Name 87 | Bookmarks Tool 88 | 89 | 90 | BundleLoadPath 91 | 92 | MaxInstances 93 | n 94 | Module 95 | PBXClassBrowserModule 96 | Name 97 | Class Browser 98 | 99 | 100 | BundleLoadPath 101 | 102 | MaxInstances 103 | n 104 | Module 105 | PBXCVSModule 106 | Name 107 | Source Code Control Tool 108 | 109 | 110 | BundleLoadPath 111 | 112 | MaxInstances 113 | n 114 | Module 115 | PBXDebugBreakpointsModule 116 | Name 117 | Debug Breakpoints Tool 118 | 119 | 120 | BundleLoadPath 121 | 122 | MaxInstances 123 | n 124 | Module 125 | XCDockableInspector 126 | Name 127 | Inspector 128 | 129 | 130 | BundleLoadPath 131 | 132 | MaxInstances 133 | n 134 | Module 135 | PBXOpenQuicklyModule 136 | Name 137 | Open Quickly Tool 138 | 139 | 140 | BundleLoadPath 141 | 142 | MaxInstances 143 | 1 144 | Module 145 | PBXDebugSessionModule 146 | Name 147 | Debugger 148 | 149 | 150 | BundleLoadPath 151 | 152 | MaxInstances 153 | 1 154 | Module 155 | PBXDebugCLIModule 156 | Name 157 | Debug Console 158 | 159 | 160 | BundleLoadPath 161 | 162 | MaxInstances 163 | n 164 | Module 165 | XCSnapshotModule 166 | Name 167 | Snapshots Tool 168 | 169 | 170 | BundlePath 171 | /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources 172 | Description 173 | AIODescriptionKey 174 | DockingSystemVisible 175 | 176 | Extension 177 | perspectivev3 178 | FavBarConfig 179 | 180 | PBXProjectModuleGUID 181 | 01A5388C12E954AD00B0F4A4 182 | XCBarModuleItemNames 183 | 184 | XCBarModuleItems 185 | 186 | 187 | FirstTimeWindowDisplayed 188 | 189 | Identifier 190 | com.apple.perspectives.project.defaultV3 191 | MajorVersion 192 | 34 193 | MinorVersion 194 | 0 195 | Name 196 | All-In-One 197 | Notifications 198 | 199 | OpenEditors 200 | 201 | PerspectiveWidths 202 | 203 | 1673 204 | 1673 205 | 206 | Perspectives 207 | 208 | 209 | ChosenToolbarItems 210 | 211 | XCToolbarPerspectiveControl 212 | NSToolbarSeparatorItem 213 | active-combo-popup 214 | action 215 | NSToolbarFlexibleSpaceItem 216 | debugger-enable-breakpoints 217 | build-and-go 218 | com.apple.ide.PBXToolbarStopButton 219 | get-info 220 | NSToolbarFlexibleSpaceItem 221 | com.apple.pbx.toolbar.searchfield 222 | 223 | ControllerClassBaseName 224 | 225 | IconName 226 | WindowOfProject 227 | Identifier 228 | perspective.project 229 | IsVertical 230 | 231 | Layout 232 | 233 | 234 | ContentConfiguration 235 | 236 | PBXBottomSmartGroupGIDs 237 | 238 | 1C37FBAC04509CD000000102 239 | 1C37FAAC04509CD000000102 240 | 1C37FABC05509CD000000102 241 | 1C37FABC05539CD112110102 242 | E2644B35053B69B200211256 243 | 1C37FABC04509CD000100104 244 | 1CC0EA4004350EF90044410B 245 | 1CC0EA4004350EF90041110B 246 | 1C77FABC04509CD000000102 247 | 248 | PBXProjectModuleGUID 249 | 1CA23ED40692098700951B8B 250 | PBXProjectModuleLabel 251 | Files 252 | PBXProjectStructureProvided 253 | yes 254 | PBXSmartGroupTreeModuleColumnData 255 | 256 | PBXSmartGroupTreeModuleColumnWidthsKey 257 | 258 | 331 259 | 260 | PBXSmartGroupTreeModuleColumnsKey_v4 261 | 262 | MainColumn 263 | 264 | 265 | PBXSmartGroupTreeModuleOutlineStateKey_v7 266 | 267 | PBXSmartGroupTreeModuleOutlineStateExpansionKey 268 | 269 | 29B97314FDCFA39411CA2CEA 270 | 01A5389712E954E400B0F4A4 271 | 29B97315FDCFA39411CA2CEA 272 | 29B97317FDCFA39411CA2CEA 273 | 1C37FBAC04509CD000000102 274 | 1C37FABC05509CD000000102 275 | 276 | PBXSmartGroupTreeModuleOutlineStateSelectionKey 277 | 278 | 279 | 2 280 | 0 281 | 282 | 283 | PBXSmartGroupTreeModuleOutlineStateVisibleRectKey 284 | {{0, 0}, {331, 948}} 285 | 286 | PBXTopSmartGroupGIDs 287 | 288 | XCIncludePerspectivesSwitch 289 | 290 | 291 | GeometryConfiguration 292 | 293 | Frame 294 | {{0, 0}, {348, 966}} 295 | GroupTreeTableConfiguration 296 | 297 | MainColumn 298 | 331 299 | 300 | RubberWindowFrame 301 | 154 171 1351 1007 0 0 1920 1178 302 | 303 | Module 304 | PBXSmartGroupTreeModule 305 | Proportion 306 | 348pt 307 | 308 | 309 | Dock 310 | 311 | 312 | BecomeActive 313 | 314 | ContentConfiguration 315 | 316 | PBXProjectModuleGUID 317 | 01A5388712E954AD00B0F4A4 318 | PBXProjectModuleLabel 319 | README.mdown 320 | PBXSplitModuleInNavigatorKey 321 | 322 | Split0 323 | 324 | PBXProjectModuleGUID 325 | 01A5388812E954AD00B0F4A4 326 | PBXProjectModuleLabel 327 | README.mdown 328 | _historyCapacity 329 | 0 330 | bookmark 331 | 013DD54F12EDE07400B34A41 332 | history 333 | 334 | 013DD51C12ECF2C000B34A41 335 | 013DD51D12ECF2C000B34A41 336 | 013DD51E12ECF2C000B34A41 337 | 013DD51F12ECF2C000B34A41 338 | 013DD52012ECF2C000B34A41 339 | 013DD52112ECF2C000B34A41 340 | 013DD52212ECF2C000B34A41 341 | 013DD52312ECF2C000B34A41 342 | 013DD52412ECF2C000B34A41 343 | 013DD52512ECF2C000B34A41 344 | 013DD52612ECF2C000B34A41 345 | 013DD52712ECF2C000B34A41 346 | 013DD52812ECF2C000B34A41 347 | 013DD52912ECF2C000B34A41 348 | 013DD52A12ECF2C000B34A41 349 | 013DD54812EDD0DF00B34A41 350 | 013DD54912EDD0DF00B34A41 351 | 352 | 353 | SplitCount 354 | 1 355 | 356 | StatusBarVisibility 357 | 358 | XCSharingToken 359 | com.apple.Xcode.CommonNavigatorGroupSharingToken 360 | 361 | GeometryConfiguration 362 | 363 | Frame 364 | {{0, 0}, {998, 770}} 365 | RubberWindowFrame 366 | 154 171 1351 1007 0 0 1920 1178 367 | 368 | Module 369 | PBXNavigatorGroup 370 | Proportion 371 | 770pt 372 | 373 | 374 | Proportion 375 | 191pt 376 | Tabs 377 | 378 | 379 | ContentConfiguration 380 | 381 | PBXProjectModuleGUID 382 | 1CA23EDF0692099D00951B8B 383 | PBXProjectModuleLabel 384 | Detail 385 | 386 | GeometryConfiguration 387 | 388 | Frame 389 | {{10, 27}, {998, 164}} 390 | 391 | Module 392 | XCDetailModule 393 | 394 | 395 | ContentConfiguration 396 | 397 | PBXProjectModuleGUID 398 | 1CA23EE00692099D00951B8B 399 | PBXProjectModuleLabel 400 | Project Find 401 | 402 | GeometryConfiguration 403 | 404 | Frame 405 | {{10, 27}, {998, 164}} 406 | RubberWindowFrame 407 | 154 171 1351 1007 0 0 1920 1178 408 | 409 | Module 410 | PBXProjectFindModule 411 | 412 | 413 | ContentConfiguration 414 | 415 | PBXCVSModuleFilterTypeKey 416 | 1032 417 | PBXProjectModuleGUID 418 | 1CA23EE10692099D00951B8B 419 | PBXProjectModuleLabel 420 | SCM Results 421 | 422 | GeometryConfiguration 423 | 424 | Frame 425 | {{10, 31}, {603, 297}} 426 | 427 | Module 428 | PBXCVSModule 429 | 430 | 431 | ContentConfiguration 432 | 433 | PBXProjectModuleGUID 434 | XCMainBuildResultsModuleGUID 435 | PBXProjectModuleLabel 436 | Build Results 437 | XCBuildResultsTrigger_Collapse 438 | 1021 439 | XCBuildResultsTrigger_Open 440 | 1011 441 | 442 | GeometryConfiguration 443 | 444 | Frame 445 | {{10, 27}, {1005, 144}} 446 | 447 | Module 448 | PBXBuildResultsModule 449 | 450 | 451 | 452 | 453 | Proportion 454 | 998pt 455 | 456 | 457 | Name 458 | Project 459 | ServiceClasses 460 | 461 | XCModuleDock 462 | PBXSmartGroupTreeModule 463 | XCModuleDock 464 | PBXNavigatorGroup 465 | XCDockableTabModule 466 | XCDetailModule 467 | PBXProjectFindModule 468 | PBXCVSModule 469 | PBXBuildResultsModule 470 | 471 | TableOfContents 472 | 473 | 013DD52E12ECF2C000B34A41 474 | 1CA23ED40692098700951B8B 475 | 013DD52F12ECF2C000B34A41 476 | 01A5388712E954AD00B0F4A4 477 | 013DD53012ECF2C000B34A41 478 | 1CA23EDF0692099D00951B8B 479 | 1CA23EE00692099D00951B8B 480 | 1CA23EE10692099D00951B8B 481 | XCMainBuildResultsModuleGUID 482 | 483 | ToolbarConfigUserDefaultsMinorVersion 484 | 2 485 | ToolbarConfiguration 486 | xcode.toolbar.config.defaultV3 487 | 488 | 489 | ChosenToolbarItems 490 | 491 | XCToolbarPerspectiveControl 492 | NSToolbarSeparatorItem 493 | active-combo-popup 494 | NSToolbarFlexibleSpaceItem 495 | debugger-enable-breakpoints 496 | build-and-go 497 | com.apple.ide.PBXToolbarStopButton 498 | debugger-restart-executable 499 | debugger-pause 500 | debugger-step-over 501 | debugger-step-into 502 | debugger-step-out 503 | NSToolbarFlexibleSpaceItem 504 | servicesModulebreakpoints 505 | debugger-show-console-window 506 | 507 | ControllerClassBaseName 508 | PBXDebugSessionModule 509 | IconName 510 | DebugTabIcon 511 | Identifier 512 | perspective.debug 513 | IsVertical 514 | 515 | Layout 516 | 517 | 518 | ContentConfiguration 519 | 520 | PBXProjectModuleGUID 521 | 1CCC7628064C1048000F2A68 522 | PBXProjectModuleLabel 523 | Debugger Console 524 | 525 | GeometryConfiguration 526 | 527 | Frame 528 | {{0, 0}, {1673, 530}} 529 | 530 | Module 531 | PBXDebugCLIModule 532 | Proportion 533 | 530pt 534 | 535 | 536 | ContentConfiguration 537 | 538 | Debugger 539 | 540 | HorizontalSplitView 541 | 542 | _collapsingFrameDimension 543 | 0.0 544 | _indexOfCollapsedView 545 | 0 546 | _percentageOfCollapsedView 547 | 0.0 548 | isCollapsed 549 | yes 550 | sizes 551 | 552 | {{0, 0}, {816, 215}} 553 | {{816, 0}, {857, 215}} 554 | 555 | 556 | VerticalSplitView 557 | 558 | _collapsingFrameDimension 559 | 0.0 560 | _indexOfCollapsedView 561 | 0 562 | _percentageOfCollapsedView 563 | 0.0 564 | isCollapsed 565 | yes 566 | sizes 567 | 568 | {{0, 0}, {1673, 215}} 569 | {{0, 215}, {1673, 228}} 570 | 571 | 572 | 573 | LauncherConfigVersion 574 | 8 575 | PBXProjectModuleGUID 576 | 1CCC7629064C1048000F2A68 577 | PBXProjectModuleLabel 578 | Debug 579 | 580 | GeometryConfiguration 581 | 582 | DebugConsoleVisible 583 | None 584 | DebugConsoleWindowFrame 585 | {{200, 200}, {500, 300}} 586 | DebugSTDIOWindowFrame 587 | {{200, 200}, {500, 300}} 588 | Frame 589 | {{0, 535}, {1673, 443}} 590 | PBXDebugSessionStackFrameViewKey 591 | 592 | DebugVariablesTableConfiguration 593 | 594 | Name 595 | 120 596 | Value 597 | 85 598 | Summary 599 | 627 600 | 601 | Frame 602 | {{816, 0}, {857, 215}} 603 | 604 | 605 | Module 606 | PBXDebugSessionModule 607 | Proportion 608 | 443pt 609 | 610 | 611 | Name 612 | Debug 613 | ServiceClasses 614 | 615 | XCModuleDock 616 | PBXDebugCLIModule 617 | PBXDebugSessionModule 618 | PBXDebugProcessAndThreadModule 619 | PBXDebugProcessViewModule 620 | PBXDebugThreadViewModule 621 | PBXDebugStackFrameViewModule 622 | PBXNavigatorGroup 623 | 624 | TableOfContents 625 | 626 | 013DD53112ECF2C000B34A41 627 | 1CCC7628064C1048000F2A68 628 | 1CCC7629064C1048000F2A68 629 | 013DD53212ECF2C000B34A41 630 | 013DD53312ECF2C000B34A41 631 | 013DD53412ECF2C000B34A41 632 | 013DD53512ECF2C000B34A41 633 | 013DD53612ECF2C000B34A41 634 | 635 | ToolbarConfigUserDefaultsMinorVersion 636 | 2 637 | ToolbarConfiguration 638 | xcode.toolbar.config.debugV3 639 | 640 | 641 | PerspectivesBarVisible 642 | 643 | ShelfIsVisible 644 | 645 | SourceDescription 646 | file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecification.xcperspec' 647 | StatusbarIsVisible 648 | 649 | TimeStamp 650 | 0.0 651 | ToolbarConfigUserDefaultsMinorVersion 652 | 2 653 | ToolbarDisplayMode 654 | 1 655 | ToolbarIsVisible 656 | 657 | ToolbarSizeMode 658 | 1 659 | Type 660 | Perspectives 661 | UpdateMessage 662 | 663 | WindowJustification 664 | 5 665 | WindowOrderList 666 | 667 | /Users/Nick/Documents/Projects/tools/TSAlertView/Demo/TSAVDemo.xcodeproj 668 | 669 | WindowString 670 | 154 171 1351 1007 0 0 1920 1178 671 | WindowToolsV3 672 | 673 | 674 | Identifier 675 | windowTool.debugger 676 | Layout 677 | 678 | 679 | Dock 680 | 681 | 682 | ContentConfiguration 683 | 684 | Debugger 685 | 686 | HorizontalSplitView 687 | 688 | _collapsingFrameDimension 689 | 0.0 690 | _indexOfCollapsedView 691 | 0 692 | _percentageOfCollapsedView 693 | 0.0 694 | isCollapsed 695 | yes 696 | sizes 697 | 698 | {{0, 0}, {317, 164}} 699 | {{317, 0}, {377, 164}} 700 | 701 | 702 | VerticalSplitView 703 | 704 | _collapsingFrameDimension 705 | 0.0 706 | _indexOfCollapsedView 707 | 0 708 | _percentageOfCollapsedView 709 | 0.0 710 | isCollapsed 711 | yes 712 | sizes 713 | 714 | {{0, 0}, {694, 164}} 715 | {{0, 164}, {694, 216}} 716 | 717 | 718 | 719 | LauncherConfigVersion 720 | 8 721 | PBXProjectModuleGUID 722 | 1C162984064C10D400B95A72 723 | PBXProjectModuleLabel 724 | Debug - GLUTExamples (Underwater) 725 | 726 | GeometryConfiguration 727 | 728 | DebugConsoleDrawerSize 729 | {100, 120} 730 | DebugConsoleVisible 731 | None 732 | DebugConsoleWindowFrame 733 | {{200, 200}, {500, 300}} 734 | DebugSTDIOWindowFrame 735 | {{200, 200}, {500, 300}} 736 | Frame 737 | {{0, 0}, {694, 380}} 738 | RubberWindowFrame 739 | 321 238 694 422 0 0 1440 878 740 | 741 | Module 742 | PBXDebugSessionModule 743 | Proportion 744 | 100% 745 | 746 | 747 | Proportion 748 | 100% 749 | 750 | 751 | Name 752 | Debugger 753 | ServiceClasses 754 | 755 | PBXDebugSessionModule 756 | 757 | StatusbarIsVisible 758 | 1 759 | TableOfContents 760 | 761 | 1CD10A99069EF8BA00B06720 762 | 1C0AD2AB069F1E9B00FABCE6 763 | 1C162984064C10D400B95A72 764 | 1C0AD2AC069F1E9B00FABCE6 765 | 766 | ToolbarConfiguration 767 | xcode.toolbar.config.debugV3 768 | WindowString 769 | 321 238 694 422 0 0 1440 878 770 | WindowToolGUID 771 | 1CD10A99069EF8BA00B06720 772 | WindowToolIsVisible 773 | 0 774 | 775 | 776 | Identifier 777 | windowTool.build 778 | Layout 779 | 780 | 781 | Dock 782 | 783 | 784 | ContentConfiguration 785 | 786 | PBXProjectModuleGUID 787 | 1CD0528F0623707200166675 788 | PBXProjectModuleLabel 789 | <No Editor> 790 | PBXSplitModuleInNavigatorKey 791 | 792 | Split0 793 | 794 | PBXProjectModuleGUID 795 | 1CD052900623707200166675 796 | 797 | SplitCount 798 | 1 799 | 800 | StatusBarVisibility 801 | 1 802 | 803 | GeometryConfiguration 804 | 805 | Frame 806 | {{0, 0}, {500, 215}} 807 | RubberWindowFrame 808 | 192 257 500 500 0 0 1280 1002 809 | 810 | Module 811 | PBXNavigatorGroup 812 | Proportion 813 | 218pt 814 | 815 | 816 | BecomeActive 817 | 1 818 | ContentConfiguration 819 | 820 | PBXProjectModuleGUID 821 | XCMainBuildResultsModuleGUID 822 | PBXProjectModuleLabel 823 | Build Results 824 | 825 | GeometryConfiguration 826 | 827 | Frame 828 | {{0, 222}, {500, 236}} 829 | RubberWindowFrame 830 | 192 257 500 500 0 0 1280 1002 831 | 832 | Module 833 | PBXBuildResultsModule 834 | Proportion 835 | 236pt 836 | 837 | 838 | Proportion 839 | 458pt 840 | 841 | 842 | Name 843 | Build Results 844 | ServiceClasses 845 | 846 | PBXBuildResultsModule 847 | 848 | StatusbarIsVisible 849 | 1 850 | TableOfContents 851 | 852 | 1C78EAA5065D492600B07095 853 | 1C78EAA6065D492600B07095 854 | 1CD0528F0623707200166675 855 | XCMainBuildResultsModuleGUID 856 | 857 | ToolbarConfiguration 858 | xcode.toolbar.config.buildV3 859 | WindowString 860 | 192 257 500 500 0 0 1280 1002 861 | 862 | 863 | Identifier 864 | windowTool.find 865 | Layout 866 | 867 | 868 | Dock 869 | 870 | 871 | Dock 872 | 873 | 874 | ContentConfiguration 875 | 876 | PBXProjectModuleGUID 877 | 1CDD528C0622207200134675 878 | PBXProjectModuleLabel 879 | <No Editor> 880 | PBXSplitModuleInNavigatorKey 881 | 882 | Split0 883 | 884 | PBXProjectModuleGUID 885 | 1CD0528D0623707200166675 886 | 887 | SplitCount 888 | 1 889 | 890 | StatusBarVisibility 891 | 1 892 | 893 | GeometryConfiguration 894 | 895 | Frame 896 | {{0, 0}, {781, 167}} 897 | RubberWindowFrame 898 | 62 385 781 470 0 0 1440 878 899 | 900 | Module 901 | PBXNavigatorGroup 902 | Proportion 903 | 781pt 904 | 905 | 906 | Proportion 907 | 50% 908 | 909 | 910 | BecomeActive 911 | 1 912 | ContentConfiguration 913 | 914 | PBXProjectModuleGUID 915 | 1CD0528E0623707200166675 916 | PBXProjectModuleLabel 917 | Project Find 918 | 919 | GeometryConfiguration 920 | 921 | Frame 922 | {{8, 0}, {773, 254}} 923 | RubberWindowFrame 924 | 62 385 781 470 0 0 1440 878 925 | 926 | Module 927 | PBXProjectFindModule 928 | Proportion 929 | 50% 930 | 931 | 932 | Proportion 933 | 428pt 934 | 935 | 936 | Name 937 | Project Find 938 | ServiceClasses 939 | 940 | PBXProjectFindModule 941 | 942 | StatusbarIsVisible 943 | 1 944 | TableOfContents 945 | 946 | 1C530D57069F1CE1000CFCEE 947 | 1C530D58069F1CE1000CFCEE 948 | 1C530D59069F1CE1000CFCEE 949 | 1CDD528C0622207200134675 950 | 1C530D5A069F1CE1000CFCEE 951 | 1CE0B1FE06471DED0097A5F4 952 | 1CD0528E0623707200166675 953 | 954 | WindowString 955 | 62 385 781 470 0 0 1440 878 956 | WindowToolGUID 957 | 1C530D57069F1CE1000CFCEE 958 | WindowToolIsVisible 959 | 0 960 | 961 | 962 | Identifier 963 | windowTool.snapshots 964 | Layout 965 | 966 | 967 | Dock 968 | 969 | 970 | Module 971 | XCSnapshotModule 972 | Proportion 973 | 100% 974 | 975 | 976 | Proportion 977 | 100% 978 | 979 | 980 | Name 981 | Snapshots 982 | ServiceClasses 983 | 984 | XCSnapshotModule 985 | 986 | StatusbarIsVisible 987 | Yes 988 | ToolbarConfiguration 989 | xcode.toolbar.config.snapshots 990 | WindowString 991 | 315 824 300 550 0 0 1440 878 992 | WindowToolIsVisible 993 | Yes 994 | 995 | 996 | Identifier 997 | windowTool.debuggerConsole 998 | Layout 999 | 1000 | 1001 | Dock 1002 | 1003 | 1004 | BecomeActive 1005 | 1 1006 | ContentConfiguration 1007 | 1008 | PBXProjectModuleGUID 1009 | 1C78EAAC065D492600B07095 1010 | PBXProjectModuleLabel 1011 | Debugger Console 1012 | 1013 | GeometryConfiguration 1014 | 1015 | Frame 1016 | {{0, 0}, {700, 358}} 1017 | RubberWindowFrame 1018 | 149 87 700 400 0 0 1440 878 1019 | 1020 | Module 1021 | PBXDebugCLIModule 1022 | Proportion 1023 | 358pt 1024 | 1025 | 1026 | Proportion 1027 | 358pt 1028 | 1029 | 1030 | Name 1031 | Debugger Console 1032 | ServiceClasses 1033 | 1034 | PBXDebugCLIModule 1035 | 1036 | StatusbarIsVisible 1037 | 1 1038 | TableOfContents 1039 | 1040 | 1C530D5B069F1CE1000CFCEE 1041 | 1C530D5C069F1CE1000CFCEE 1042 | 1C78EAAC065D492600B07095 1043 | 1044 | ToolbarConfiguration 1045 | xcode.toolbar.config.consoleV3 1046 | WindowString 1047 | 149 87 440 400 0 0 1440 878 1048 | WindowToolGUID 1049 | 1C530D5B069F1CE1000CFCEE 1050 | WindowToolIsVisible 1051 | 0 1052 | 1053 | 1054 | Identifier 1055 | windowTool.scm 1056 | Layout 1057 | 1058 | 1059 | Dock 1060 | 1061 | 1062 | ContentConfiguration 1063 | 1064 | PBXProjectModuleGUID 1065 | 1C78EAB2065D492600B07095 1066 | PBXProjectModuleLabel 1067 | <No Editor> 1068 | PBXSplitModuleInNavigatorKey 1069 | 1070 | Split0 1071 | 1072 | PBXProjectModuleGUID 1073 | 1C78EAB3065D492600B07095 1074 | 1075 | SplitCount 1076 | 1 1077 | 1078 | StatusBarVisibility 1079 | 1 1080 | 1081 | GeometryConfiguration 1082 | 1083 | Frame 1084 | {{0, 0}, {452, 0}} 1085 | RubberWindowFrame 1086 | 743 379 452 308 0 0 1280 1002 1087 | 1088 | Module 1089 | PBXNavigatorGroup 1090 | Proportion 1091 | 0pt 1092 | 1093 | 1094 | BecomeActive 1095 | 1 1096 | ContentConfiguration 1097 | 1098 | PBXProjectModuleGUID 1099 | 1CD052920623707200166675 1100 | PBXProjectModuleLabel 1101 | SCM 1102 | 1103 | GeometryConfiguration 1104 | 1105 | ConsoleFrame 1106 | {{0, 259}, {452, 0}} 1107 | Frame 1108 | {{0, 7}, {452, 259}} 1109 | RubberWindowFrame 1110 | 743 379 452 308 0 0 1280 1002 1111 | TableConfiguration 1112 | 1113 | Status 1114 | 30 1115 | FileName 1116 | 199 1117 | Path 1118 | 197.09500122070312 1119 | 1120 | TableFrame 1121 | {{0, 0}, {452, 250}} 1122 | 1123 | Module 1124 | PBXCVSModule 1125 | Proportion 1126 | 262pt 1127 | 1128 | 1129 | Proportion 1130 | 266pt 1131 | 1132 | 1133 | Name 1134 | SCM 1135 | ServiceClasses 1136 | 1137 | PBXCVSModule 1138 | 1139 | StatusbarIsVisible 1140 | 1 1141 | TableOfContents 1142 | 1143 | 1C78EAB4065D492600B07095 1144 | 1C78EAB5065D492600B07095 1145 | 1C78EAB2065D492600B07095 1146 | 1CD052920623707200166675 1147 | 1148 | ToolbarConfiguration 1149 | xcode.toolbar.config.scmV3 1150 | WindowString 1151 | 743 379 452 308 0 0 1280 1002 1152 | 1153 | 1154 | Identifier 1155 | windowTool.breakpoints 1156 | IsVertical 1157 | 0 1158 | Layout 1159 | 1160 | 1161 | Dock 1162 | 1163 | 1164 | BecomeActive 1165 | 1 1166 | ContentConfiguration 1167 | 1168 | PBXBottomSmartGroupGIDs 1169 | 1170 | 1C77FABC04509CD000000102 1171 | 1172 | PBXProjectModuleGUID 1173 | 1CE0B1FE06471DED0097A5F4 1174 | PBXProjectModuleLabel 1175 | Files 1176 | PBXProjectStructureProvided 1177 | no 1178 | PBXSmartGroupTreeModuleColumnData 1179 | 1180 | PBXSmartGroupTreeModuleColumnWidthsKey 1181 | 1182 | 168 1183 | 1184 | PBXSmartGroupTreeModuleColumnsKey_v4 1185 | 1186 | MainColumn 1187 | 1188 | 1189 | PBXSmartGroupTreeModuleOutlineStateKey_v7 1190 | 1191 | PBXSmartGroupTreeModuleOutlineStateExpansionKey 1192 | 1193 | 1C77FABC04509CD000000102 1194 | 1195 | PBXSmartGroupTreeModuleOutlineStateSelectionKey 1196 | 1197 | 1198 | 0 1199 | 1200 | 1201 | PBXSmartGroupTreeModuleOutlineStateVisibleRectKey 1202 | {{0, 0}, {168, 350}} 1203 | 1204 | PBXTopSmartGroupGIDs 1205 | 1206 | XCIncludePerspectivesSwitch 1207 | 0 1208 | 1209 | GeometryConfiguration 1210 | 1211 | Frame 1212 | {{0, 0}, {185, 368}} 1213 | GroupTreeTableConfiguration 1214 | 1215 | MainColumn 1216 | 168 1217 | 1218 | RubberWindowFrame 1219 | 315 424 744 409 0 0 1440 878 1220 | 1221 | Module 1222 | PBXSmartGroupTreeModule 1223 | Proportion 1224 | 185pt 1225 | 1226 | 1227 | ContentConfiguration 1228 | 1229 | PBXProjectModuleGUID 1230 | 1CA1AED706398EBD00589147 1231 | PBXProjectModuleLabel 1232 | Detail 1233 | 1234 | GeometryConfiguration 1235 | 1236 | Frame 1237 | {{190, 0}, {554, 368}} 1238 | RubberWindowFrame 1239 | 315 424 744 409 0 0 1440 878 1240 | 1241 | Module 1242 | XCDetailModule 1243 | Proportion 1244 | 554pt 1245 | 1246 | 1247 | Proportion 1248 | 368pt 1249 | 1250 | 1251 | MajorVersion 1252 | 3 1253 | MinorVersion 1254 | 0 1255 | Name 1256 | Breakpoints 1257 | ServiceClasses 1258 | 1259 | PBXSmartGroupTreeModule 1260 | XCDetailModule 1261 | 1262 | StatusbarIsVisible 1263 | 1 1264 | TableOfContents 1265 | 1266 | 1CDDB66807F98D9800BB5817 1267 | 1CDDB66907F98D9800BB5817 1268 | 1CE0B1FE06471DED0097A5F4 1269 | 1CA1AED706398EBD00589147 1270 | 1271 | ToolbarConfiguration 1272 | xcode.toolbar.config.breakpointsV3 1273 | WindowString 1274 | 315 424 744 409 0 0 1440 878 1275 | WindowToolGUID 1276 | 1CDDB66807F98D9800BB5817 1277 | WindowToolIsVisible 1278 | 1 1279 | 1280 | 1281 | Identifier 1282 | windowTool.debugAnimator 1283 | Layout 1284 | 1285 | 1286 | Dock 1287 | 1288 | 1289 | Module 1290 | PBXNavigatorGroup 1291 | Proportion 1292 | 100% 1293 | 1294 | 1295 | Proportion 1296 | 100% 1297 | 1298 | 1299 | Name 1300 | Debug Visualizer 1301 | ServiceClasses 1302 | 1303 | PBXNavigatorGroup 1304 | 1305 | StatusbarIsVisible 1306 | 1 1307 | ToolbarConfiguration 1308 | xcode.toolbar.config.debugAnimatorV3 1309 | WindowString 1310 | 100 100 700 500 0 0 1280 1002 1311 | 1312 | 1313 | Identifier 1314 | windowTool.bookmarks 1315 | Layout 1316 | 1317 | 1318 | Dock 1319 | 1320 | 1321 | Module 1322 | PBXBookmarksModule 1323 | Proportion 1324 | 166pt 1325 | 1326 | 1327 | Proportion 1328 | 166pt 1329 | 1330 | 1331 | Name 1332 | Bookmarks 1333 | ServiceClasses 1334 | 1335 | PBXBookmarksModule 1336 | 1337 | StatusbarIsVisible 1338 | 0 1339 | WindowString 1340 | 538 42 401 187 0 0 1280 1002 1341 | 1342 | 1343 | Identifier 1344 | windowTool.projectFormatConflicts 1345 | Layout 1346 | 1347 | 1348 | Dock 1349 | 1350 | 1351 | Module 1352 | XCProjectFormatConflictsModule 1353 | Proportion 1354 | 100% 1355 | 1356 | 1357 | Proportion 1358 | 100% 1359 | 1360 | 1361 | Name 1362 | Project Format Conflicts 1363 | ServiceClasses 1364 | 1365 | XCProjectFormatConflictsModule 1366 | 1367 | StatusbarIsVisible 1368 | 0 1369 | WindowContentMinSize 1370 | 450 300 1371 | WindowString 1372 | 50 850 472 307 0 0 1440 877 1373 | 1374 | 1375 | Identifier 1376 | windowTool.classBrowser 1377 | Layout 1378 | 1379 | 1380 | Dock 1381 | 1382 | 1383 | BecomeActive 1384 | 1 1385 | ContentConfiguration 1386 | 1387 | OptionsSetName 1388 | Hierarchy, all classes 1389 | PBXProjectModuleGUID 1390 | 1CA6456E063B45B4001379D8 1391 | PBXProjectModuleLabel 1392 | Class Browser - NSObject 1393 | 1394 | GeometryConfiguration 1395 | 1396 | ClassesFrame 1397 | {{0, 0}, {369, 96}} 1398 | ClassesTreeTableConfiguration 1399 | 1400 | PBXClassNameColumnIdentifier 1401 | 208 1402 | PBXClassBookColumnIdentifier 1403 | 22 1404 | 1405 | Frame 1406 | {{0, 0}, {616, 353}} 1407 | MembersFrame 1408 | {{0, 105}, {369, 395}} 1409 | MembersTreeTableConfiguration 1410 | 1411 | PBXMemberTypeIconColumnIdentifier 1412 | 22 1413 | PBXMemberNameColumnIdentifier 1414 | 216 1415 | PBXMemberTypeColumnIdentifier 1416 | 94 1417 | PBXMemberBookColumnIdentifier 1418 | 22 1419 | 1420 | PBXModuleWindowStatusBarHidden2 1421 | 1 1422 | RubberWindowFrame 1423 | 597 125 616 374 0 0 1280 1002 1424 | 1425 | Module 1426 | PBXClassBrowserModule 1427 | Proportion 1428 | 354pt 1429 | 1430 | 1431 | Proportion 1432 | 354pt 1433 | 1434 | 1435 | Name 1436 | Class Browser 1437 | ServiceClasses 1438 | 1439 | PBXClassBrowserModule 1440 | 1441 | StatusbarIsVisible 1442 | 0 1443 | TableOfContents 1444 | 1445 | 1C78EABA065D492600B07095 1446 | 1C78EABB065D492600B07095 1447 | 1CA6456E063B45B4001379D8 1448 | 1449 | ToolbarConfiguration 1450 | xcode.toolbar.config.classbrowser 1451 | WindowString 1452 | 597 125 616 374 0 0 1280 1002 1453 | 1454 | 1455 | Identifier 1456 | windowTool.refactoring 1457 | IncludeInToolsMenu 1458 | 0 1459 | Layout 1460 | 1461 | 1462 | Dock 1463 | 1464 | 1465 | BecomeActive 1466 | 1 1467 | GeometryConfiguration 1468 | 1469 | Frame 1470 | {0, 0}, {500, 335} 1471 | RubberWindowFrame 1472 | {0, 0}, {500, 335} 1473 | 1474 | Module 1475 | XCRefactoringModule 1476 | Proportion 1477 | 100% 1478 | 1479 | 1480 | Proportion 1481 | 100% 1482 | 1483 | 1484 | Name 1485 | Refactoring 1486 | ServiceClasses 1487 | 1488 | XCRefactoringModule 1489 | 1490 | WindowString 1491 | 200 200 500 356 0 0 1920 1200 1492 | 1493 | 1494 | 1495 | 1496 | -------------------------------------------------------------------------------- /Demo/TSAVDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 45; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 013DD51B12ECF0D300B34A41 /* Source Code License.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 013DD51A12ECF0D300B34A41 /* Source Code License.rtf */; }; 11 | 01A538A012E954E400B0F4A4 /* TSAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 01A5389912E954E400B0F4A4 /* TSAlertView.m */; }; 12 | 01A538A112E954E400B0F4A4 /* TSAlertViewMessageListViewShadow.png in Resources */ = {isa = PBXBuildFile; fileRef = 01A5389A12E954E400B0F4A4 /* TSAlertViewMessageListViewShadow.png */; }; 13 | 01A538A212E954E400B0F4A4 /* TSAlertViewBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = 01A5389B12E954E400B0F4A4 /* TSAlertViewBackground.png */; }; 14 | 01A538A312E954E400B0F4A4 /* TSAlertViewBackground2.png in Resources */ = {isa = PBXBuildFile; fileRef = 01A5389C12E954E400B0F4A4 /* TSAlertViewBackground2.png */; }; 15 | 01A538A412E954E400B0F4A4 /* TSAlertViewButtonBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = 01A5389D12E954E400B0F4A4 /* TSAlertViewButtonBackground.png */; }; 16 | 01A538A512E954E400B0F4A4 /* TSAlertViewButtonBackground_Highlighted.png in Resources */ = {isa = PBXBuildFile; fileRef = 01A5389E12E954E400B0F4A4 /* TSAlertViewButtonBackground_Highlighted.png */; }; 17 | 01A538A612E954E400B0F4A4 /* TSAlertViewCancelButtonBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = 01A5389F12E954E400B0F4A4 /* TSAlertViewCancelButtonBackground.png */; }; 18 | 01A5399C12E9F4A600B0F4A4 /* TSAVDemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 01A5399A12E9F4A600B0F4A4 /* TSAVDemoViewController.m */; }; 19 | 01A5399D12E9F4A600B0F4A4 /* TSAVDemoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 01A5399B12E9F4A600B0F4A4 /* TSAVDemoViewController.xib */; }; 20 | 01A5399F12E9F4B500B0F4A4 /* MainWindow-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 01A5399E12E9F4B500B0F4A4 /* MainWindow-iPad.xib */; }; 21 | 1D3623260D0F684500981E51 /* TSAVDemoAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* TSAVDemoAppDelegate.m */; }; 22 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 23 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 24 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 25 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; 26 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 0110735812EBA60D00BAC93C /* README.mdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.mdown; path = ../README.mdown; sourceTree = SOURCE_ROOT; }; 31 | 013DD51A12ECF0D300B34A41 /* Source Code License.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = "Source Code License.rtf"; path = "../Source Code License.rtf"; sourceTree = ""; }; 32 | 01A5389812E954E400B0F4A4 /* TSAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSAlertView.h; sourceTree = ""; }; 33 | 01A5389912E954E400B0F4A4 /* TSAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSAlertView.m; sourceTree = ""; }; 34 | 01A5389A12E954E400B0F4A4 /* TSAlertViewMessageListViewShadow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TSAlertViewMessageListViewShadow.png; sourceTree = ""; }; 35 | 01A5389B12E954E400B0F4A4 /* TSAlertViewBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TSAlertViewBackground.png; sourceTree = ""; }; 36 | 01A5389C12E954E400B0F4A4 /* TSAlertViewBackground2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TSAlertViewBackground2.png; sourceTree = ""; }; 37 | 01A5389D12E954E400B0F4A4 /* TSAlertViewButtonBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TSAlertViewButtonBackground.png; sourceTree = ""; }; 38 | 01A5389E12E954E400B0F4A4 /* TSAlertViewButtonBackground_Highlighted.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TSAlertViewButtonBackground_Highlighted.png; sourceTree = ""; }; 39 | 01A5389F12E954E400B0F4A4 /* TSAlertViewCancelButtonBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TSAlertViewCancelButtonBackground.png; sourceTree = ""; }; 40 | 01A5399912E9F4A600B0F4A4 /* TSAVDemoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TSAVDemoViewController.h; path = Classes/TSAVDemoViewController.h; sourceTree = ""; }; 41 | 01A5399A12E9F4A600B0F4A4 /* TSAVDemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TSAVDemoViewController.m; path = Classes/TSAVDemoViewController.m; sourceTree = ""; }; 42 | 01A5399B12E9F4A600B0F4A4 /* TSAVDemoViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = TSAVDemoViewController.xib; path = Classes/TSAVDemoViewController.xib; sourceTree = ""; }; 43 | 01A5399E12E9F4B500B0F4A4 /* MainWindow-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = "MainWindow-iPad.xib"; sourceTree = ""; }; 44 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 45 | 1D3623240D0F684500981E51 /* TSAVDemoAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TSAVDemoAppDelegate.h; path = Classes/TSAVDemoAppDelegate.h; sourceTree = ""; }; 46 | 1D3623250D0F684500981E51 /* TSAVDemoAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TSAVDemoAppDelegate.m; path = Classes/TSAVDemoAppDelegate.m; sourceTree = ""; }; 47 | 1D6058910D05DD3D006BFB54 /* TSAVDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TSAVDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 49 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 50 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; 51 | 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 52 | 32CA4F630368D1EE00C91783 /* TSAVDemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSAVDemo_Prefix.pch; sourceTree = ""; }; 53 | 8D1107310486CEB800E47090 /* TSAVDemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "TSAVDemo-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; 54 | /* End PBXFileReference section */ 55 | 56 | /* Begin PBXFrameworksBuildPhase section */ 57 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 62 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 63 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | /* End PBXFrameworksBuildPhase section */ 68 | 69 | /* Begin PBXGroup section */ 70 | 01A5389712E954E400B0F4A4 /* TSAlertView */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | 01A5389812E954E400B0F4A4 /* TSAlertView.h */, 74 | 01A5389912E954E400B0F4A4 /* TSAlertView.m */, 75 | 01A5389A12E954E400B0F4A4 /* TSAlertViewMessageListViewShadow.png */, 76 | 01A5389B12E954E400B0F4A4 /* TSAlertViewBackground.png */, 77 | 01A5389C12E954E400B0F4A4 /* TSAlertViewBackground2.png */, 78 | 01A5389D12E954E400B0F4A4 /* TSAlertViewButtonBackground.png */, 79 | 01A5389E12E954E400B0F4A4 /* TSAlertViewButtonBackground_Highlighted.png */, 80 | 01A5389F12E954E400B0F4A4 /* TSAlertViewCancelButtonBackground.png */, 81 | ); 82 | name = TSAlertView; 83 | path = ../TSAlertView; 84 | sourceTree = ""; 85 | }; 86 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 1D6058910D05DD3D006BFB54 /* TSAVDemo.app */, 90 | ); 91 | name = Products; 92 | sourceTree = ""; 93 | }; 94 | 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 013DD51A12ECF0D300B34A41 /* Source Code License.rtf */, 98 | 0110735812EBA60D00BAC93C /* README.mdown */, 99 | 01A5399912E9F4A600B0F4A4 /* TSAVDemoViewController.h */, 100 | 01A5399A12E9F4A600B0F4A4 /* TSAVDemoViewController.m */, 101 | 01A5399B12E9F4A600B0F4A4 /* TSAVDemoViewController.xib */, 102 | 1D3623240D0F684500981E51 /* TSAVDemoAppDelegate.h */, 103 | 1D3623250D0F684500981E51 /* TSAVDemoAppDelegate.m */, 104 | 01A5389712E954E400B0F4A4 /* TSAlertView */, 105 | 29B97315FDCFA39411CA2CEA /* Other Sources */, 106 | 29B97317FDCFA39411CA2CEA /* Resources */, 107 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 108 | 19C28FACFE9D520D11CA2CBB /* Products */, 109 | ); 110 | name = CustomTemplate; 111 | sourceTree = ""; 112 | }; 113 | 29B97315FDCFA39411CA2CEA /* Other Sources */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 32CA4F630368D1EE00C91783 /* TSAVDemo_Prefix.pch */, 117 | 29B97316FDCFA39411CA2CEA /* main.m */, 118 | ); 119 | name = "Other Sources"; 120 | sourceTree = ""; 121 | }; 122 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 01A5399E12E9F4B500B0F4A4 /* MainWindow-iPad.xib */, 126 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */, 127 | 8D1107310486CEB800E47090 /* TSAVDemo-Info.plist */, 128 | ); 129 | name = Resources; 130 | sourceTree = ""; 131 | }; 132 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 136 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 137 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */, 138 | ); 139 | name = Frameworks; 140 | sourceTree = ""; 141 | }; 142 | /* End PBXGroup section */ 143 | 144 | /* Begin PBXNativeTarget section */ 145 | 1D6058900D05DD3D006BFB54 /* TSAVDemo */ = { 146 | isa = PBXNativeTarget; 147 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TSAVDemo" */; 148 | buildPhases = ( 149 | 1D60588D0D05DD3D006BFB54 /* Resources */, 150 | 1D60588E0D05DD3D006BFB54 /* Sources */, 151 | 1D60588F0D05DD3D006BFB54 /* Frameworks */, 152 | ); 153 | buildRules = ( 154 | ); 155 | dependencies = ( 156 | ); 157 | name = TSAVDemo; 158 | productName = TSAVDemo; 159 | productReference = 1D6058910D05DD3D006BFB54 /* TSAVDemo.app */; 160 | productType = "com.apple.product-type.application"; 161 | }; 162 | /* End PBXNativeTarget section */ 163 | 164 | /* Begin PBXProject section */ 165 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 166 | isa = PBXProject; 167 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TSAVDemo" */; 168 | compatibilityVersion = "Xcode 3.1"; 169 | developmentRegion = English; 170 | hasScannedForEncodings = 1; 171 | knownRegions = ( 172 | English, 173 | Japanese, 174 | French, 175 | German, 176 | ); 177 | mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; 178 | projectDirPath = ""; 179 | projectRoot = ""; 180 | targets = ( 181 | 1D6058900D05DD3D006BFB54 /* TSAVDemo */, 182 | ); 183 | }; 184 | /* End PBXProject section */ 185 | 186 | /* Begin PBXResourcesBuildPhase section */ 187 | 1D60588D0D05DD3D006BFB54 /* Resources */ = { 188 | isa = PBXResourcesBuildPhase; 189 | buildActionMask = 2147483647; 190 | files = ( 191 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, 192 | 01A538A112E954E400B0F4A4 /* TSAlertViewMessageListViewShadow.png in Resources */, 193 | 01A538A212E954E400B0F4A4 /* TSAlertViewBackground.png in Resources */, 194 | 01A538A312E954E400B0F4A4 /* TSAlertViewBackground2.png in Resources */, 195 | 01A538A412E954E400B0F4A4 /* TSAlertViewButtonBackground.png in Resources */, 196 | 01A538A512E954E400B0F4A4 /* TSAlertViewButtonBackground_Highlighted.png in Resources */, 197 | 01A538A612E954E400B0F4A4 /* TSAlertViewCancelButtonBackground.png in Resources */, 198 | 01A5399D12E9F4A600B0F4A4 /* TSAVDemoViewController.xib in Resources */, 199 | 01A5399F12E9F4B500B0F4A4 /* MainWindow-iPad.xib in Resources */, 200 | 013DD51B12ECF0D300B34A41 /* Source Code License.rtf in Resources */, 201 | ); 202 | runOnlyForDeploymentPostprocessing = 0; 203 | }; 204 | /* End PBXResourcesBuildPhase section */ 205 | 206 | /* Begin PBXSourcesBuildPhase section */ 207 | 1D60588E0D05DD3D006BFB54 /* Sources */ = { 208 | isa = PBXSourcesBuildPhase; 209 | buildActionMask = 2147483647; 210 | files = ( 211 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 212 | 1D3623260D0F684500981E51 /* TSAVDemoAppDelegate.m in Sources */, 213 | 01A538A012E954E400B0F4A4 /* TSAlertView.m in Sources */, 214 | 01A5399C12E9F4A600B0F4A4 /* TSAVDemoViewController.m in Sources */, 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | }; 218 | /* End PBXSourcesBuildPhase section */ 219 | 220 | /* Begin XCBuildConfiguration section */ 221 | 1D6058940D05DD3E006BFB54 /* Debug */ = { 222 | isa = XCBuildConfiguration; 223 | buildSettings = { 224 | ALWAYS_SEARCH_USER_PATHS = NO; 225 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 226 | COPY_PHASE_STRIP = NO; 227 | GCC_DYNAMIC_NO_PIC = NO; 228 | GCC_OPTIMIZATION_LEVEL = 0; 229 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 230 | GCC_PREFIX_HEADER = TSAVDemo_Prefix.pch; 231 | INFOPLIST_FILE = "TSAVDemo-Info.plist"; 232 | PRODUCT_NAME = TSAVDemo; 233 | SDKROOT = iphoneos; 234 | TARGETED_DEVICE_FAMILY = "1,2"; 235 | }; 236 | name = Debug; 237 | }; 238 | 1D6058950D05DD3E006BFB54 /* Release */ = { 239 | isa = XCBuildConfiguration; 240 | buildSettings = { 241 | ALWAYS_SEARCH_USER_PATHS = NO; 242 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 243 | COPY_PHASE_STRIP = YES; 244 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 245 | GCC_PREFIX_HEADER = TSAVDemo_Prefix.pch; 246 | INFOPLIST_FILE = "TSAVDemo-Info.plist"; 247 | PRODUCT_NAME = TSAVDemo; 248 | SDKROOT = iphoneos; 249 | TARGETED_DEVICE_FAMILY = "1,2"; 250 | VALIDATE_PRODUCT = YES; 251 | }; 252 | name = Release; 253 | }; 254 | C01FCF4F08A954540054247B /* Debug */ = { 255 | isa = XCBuildConfiguration; 256 | buildSettings = { 257 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 258 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 259 | GCC_C_LANGUAGE_STANDARD = c99; 260 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 261 | GCC_WARN_UNUSED_VARIABLE = YES; 262 | PREBINDING = NO; 263 | SDKROOT = iphoneos; 264 | }; 265 | name = Debug; 266 | }; 267 | C01FCF5008A954540054247B /* Release */ = { 268 | isa = XCBuildConfiguration; 269 | buildSettings = { 270 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 271 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 272 | GCC_C_LANGUAGE_STANDARD = c99; 273 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 276 | PREBINDING = NO; 277 | SDKROOT = iphoneos; 278 | }; 279 | name = Release; 280 | }; 281 | /* End XCBuildConfiguration section */ 282 | 283 | /* Begin XCConfigurationList section */ 284 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TSAVDemo" */ = { 285 | isa = XCConfigurationList; 286 | buildConfigurations = ( 287 | 1D6058940D05DD3E006BFB54 /* Debug */, 288 | 1D6058950D05DD3E006BFB54 /* Release */, 289 | ); 290 | defaultConfigurationIsVisible = 0; 291 | defaultConfigurationName = Release; 292 | }; 293 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TSAVDemo" */ = { 294 | isa = XCConfigurationList; 295 | buildConfigurations = ( 296 | C01FCF4F08A954540054247B /* Debug */, 297 | C01FCF5008A954540054247B /* Release */, 298 | ); 299 | defaultConfigurationIsVisible = 0; 300 | defaultConfigurationName = Release; 301 | }; 302 | /* End XCConfigurationList section */ 303 | }; 304 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 305 | } 306 | -------------------------------------------------------------------------------- /Demo/TSAVDemo_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'TSAVDemo' target in the 'TSAVDemo' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /Demo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // TSAVDemo 4 | // 5 | // Created by Nick Hodapp aka Tom Swift on 1/19/11. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, char *argv[]) { 11 | 12 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 13 | int retVal = UIApplicationMain(argc, argv, nil, nil); 14 | [pool release]; 15 | return retVal; 16 | } 17 | -------------------------------------------------------------------------------- /README.mdown: -------------------------------------------------------------------------------- 1 | TSAlertView 2 | =========== 3 | 4 | TSAlertView is a drop-in replacement for UIAlertView in iOS, offering additional functionality: 5 | 6 | * "buttonLayout" property. This is useful when you have two buttons and you want them to be "stacked" instead of side-by-side. 7 | * "width" property. Controls the display width of the alert view. Make better-looking alert views on larger screens. 8 | * "maxHeight" property. Control how tall the alert view can grow before it displays the message in a scrolling UITextView instead of a UILabel. 9 | * "style" property. Can be TSAlertViewStyleNormal for a normal alert view.  Or it can be TSAlertViewStyleInput for an alert view that contains an input text field.  When it's an input alert view, the keyboard is shown right away, and the alert view will slide up and possibly resize if necessary. 10 | * "usesMessageTextView" property.  Set to YES to force the alert view to use a textview for the message area. 11 | * "backgroundImage" property.  Can be set to a custom background image.  You should set this to a UIImage which you created with stretchableImageWithLeftCapWidth:topCapHeight: 12 | * "inputTextField" property.  Use to access the input value before the alert view is shown.  Could also set the font or text alignment prior to showing the alert view. 13 | 14 | TSAlertView is NOT derived from UIAlertView. It is a clean implementation based on UIView. 15 | 16 | [![](http://dl.dropbox.com/u/47535/TSAlertView/1-thumb.png)](http://dl.dropbox.com/u/47535/TSAlertView/1.png) 17 | [![](http://dl.dropbox.com/u/47535/TSAlertView/2-thumb.png)](http://dl.dropbox.com/u/47535/TSAlertView/2.png) 18 | [![](http://dl.dropbox.com/u/47535/TSAlertView/3-thumb.png)](http://dl.dropbox.com/u/47535/TSAlertView/3.png) 19 | 20 | Adding TSAlertView to your project 21 | ==================================== 22 | 23 | The simplest way to add the TSAlertView to your project is to directly add the `TSAlertView` folder with source filees and resources to your project. 24 | 25 | 1. Download the latest code version from the repository (you can simply use the Download Source button and get the zip or tar archive of the master branch). 26 | 2. Extract the archive. 27 | 3. Open your project in Xcode, than drag and drop the `TSAlertView` folder, with all of its contents, to your classes group (in the Groups & Files view). 28 | 4. Make sure to select Copy items when asked. 29 | 30 | If you have a git tracked project, you can add TSAlertView as a submodule to your project. 31 | 32 | 1. Move inside your git tracked project. 33 | 2. Add TSAlertView as a submodule using `git submodule add git://github.com/TomSwift/TSAlertView.git TSAlertView` . 34 | 3. Open your project in Xcode, than drag and drop the `TSAlertView` folder to your classes group (in the Groups & Files view). 35 | 4. Don't select Copy items and select a suitable Reference type (relative to project should work fine most of the time). 36 | 37 | Usage 38 | ===== 39 | 40 | A demo project is included in the Demo directory. This should give you an idea how to use the class. 41 | 42 | Donate 43 | ====== 44 | 45 | Please consider a small donation if you use TSAlertView in your projects. It'll make me feel good. 46 | 47 | Donate with WePay 48 | 49 | License and Warranty 50 | ==================== 51 | 52 | The license for the code is included with the project; it's basically a BSD license with attribution. 53 | 54 | You're welcome to use it in commercial, closed-source, open source, free or any other kind of software, as long as you credit me appropriately. 55 | 56 | The TSAlertView code comes with no warranty of any kind. I hope it'll be useful to you (it certainly is to me), but I make no guarantees regarding its functionality or otherwise. 57 | 58 | 59 | Change-log 60 | ========== 61 | 62 | **Version 0.1** @ 01.23.11 63 | 64 | - Initial release. Probably has a lot of bugs. The demo project isn't very good. 65 | 66 | 67 | Thanks 68 | ====== 69 | 70 | * Matej Bukovinski, Matt Gemmell: I used your MBProgressHUD and MGSplitViewController projects as best-practice examples and templates for how to publish TSAlertView on github. Thanks! -------------------------------------------------------------------------------- /Source Code License.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 2 | {\fonttbl\f0\fnil\fcharset0 LucidaGrande;} 3 | {\colortbl;\red255\green255\blue255;\red51\green51\blue51;\red0\green180\blue128;\red255\green0\blue0; 4 | \red31\green105\blue199;\red119\green119\blue119;} 5 | {\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid1\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid1}} 6 | {\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}} 7 | \vieww23860\viewh17440\viewkind0 8 | \deftab720 9 | \pard\pardeftab720\ql\qnatural 10 | 11 | \f0\b\fs24 \cf2 Nick Hodapp / CoDeveloper LLC Source Code License\ 12 | 13 | \b0\fs22 Last updated: 23rd January 2011 14 | \fs24 \ 15 | \ 16 | \ 17 | Thanks for downloading some of our source code!\ 18 | \ 19 | This is the license agreement for the source code which this document accompanies (don\'92t worry: you\'92re allowed to use it in your own products, commercial or otherwise).\ 20 | \ 21 | The full license text is further down this page, and you should only use the source code if you agree to the terms in that text. For convenience, though, we\'92ve put together a human-readable 22 | \b non-authoritative 23 | \b0 interpretation of the license which will hopefully answer any questions you have.\ 24 | \ 25 | \ 26 | 27 | \b \cf3 Green 28 | \b0 \cf2 text shows 29 | \b \cf3 what you can do with the code 30 | \b0 \cf2 .\ 31 | 32 | \b \cf4 Red 33 | \b0 \cf2 text means 34 | \b \cf4 restrictions you must abide by 35 | \b0 \cf2 .\ 36 | \ 37 | Basically, the license says that:\ 38 | \ 39 | \pard\tx220\tx720\pardeftab720\li720\fi-720\ql\qnatural 40 | \ls1\ilvl0\cf2 {\listtext 1. }You can 41 | \b \cf3 use the code in your own products, including commercial and/or closed-source products 42 | \b0 \cf2 .\ 43 | {\listtext 2. }You can 44 | \b \cf3 modify the code 45 | \b0 \cf0 as you wish\cf2 , and 46 | \b \cf3 use the modified code in your products 47 | \b0 \cf2 .\ 48 | {\listtext 3. }You can 49 | \b \cf3 redistribute the original, unmodified code 50 | \b0 \cf2 , but you 51 | \b \cf4 have to include the full license text below 52 | \b0 \cf2 .\ 53 | {\listtext 4. }You can 54 | \b \cf3 redistribute the modified code 55 | \b0 \cf2 as you wish ( 56 | \b \cf4 without the full license text below 57 | \b0 \cf2 ).\ 58 | {\listtext 5. }In all cases, you 59 | \b \cf4 must include a credit mentioning Nick Hodapp 60 | \b0 \cf2 as the original author of the source.\ 61 | {\listtext 6. }Nick Hodapp is \cf0 not liable for anything you do with the code\cf2 , no matter what. So be sensible.\ 62 | {\listtext 7. }You 63 | \b \cf4 can\'92t use the name Nick Hodapp, the name CoDeveloper LLC, the CoDeveloper logo or any other related marks to promote your products 64 | \b0 \cf2 based on the code.\ 65 | {\listtext 8. }If you agree to all of that, go ahead and use the source. Otherwise, don\'92t!\ 66 | \pard\pardeftab720\ql\qnatural 67 | \cf2 \ 68 | 69 | \b \ 70 | \ 71 | Suggested Attribution Format\ 72 | 73 | \b0 \ 74 | The license requires that you give credit to Nick Hodapp, as the original author of any of our source that you use. The placement and format of the credit is up to you, but we prefer the credit to be in the software\'92s \'93About\'94 window. Alternatively, you could put the credit in a list of acknowledgements within the software, in the software\'92s documentation, or on the web page for the software. The suggested format for the attribution is:\ 75 | \ 76 | \pard\pardeftab720\ql\qnatural 77 | 78 | \b \cf0 Includes code by {\field{\*\fldinst{HYPERLINK "http://www.linkedin.com/in/nicholashodapp"}}{\fldrslt \cf5 Nick Hodapp}}\cf6 . 79 | \b0 \ 80 | \pard\pardeftab720\ql\qnatural 81 | \cf2 \ 82 | where would be replaced by the name of the specific source-code package you made use of. Where possible, please link the text \'93Nick Hodapp\'94 to the following URL, or include the URL as plain text: {\field{\*\fldinst{HYPERLINK "http://www.linkedin.com/in/nicholashodapp"}}{\fldrslt \cf5 http://www.linkedin.com/in/nicholashodapp}}\ 83 | \ 84 | \ 85 | 86 | \b Full Source Code License Text\ 87 | \ 88 | 89 | \b0 Below you can find the actual text of the license agreement. 90 | \b \ 91 | \ 92 | \pard\pardeftab720\ql\qnatural 93 | \cf6 \ 94 | License Agreement for Source Code provided by Nick Hodapp 95 | \b0 \ 96 | \ 97 | This software is supplied to you by Nick Hodapp in consideration of your agreement to the following terms, and your use, installation, modification or redistribution of this software constitutes acceptance of these terms. If you do not agree with these terms, please do not use, install, modify or redistribute this software.\ 98 | \ 99 | In consideration of your agreement to abide by the following terms, and subject to these terms, Nick Hodapp grants you a personal, non-exclusive license, to use, reproduce, modify and redistribute the software, with or without modifications, in source and/or binary forms; provided that if you redistribute the software in its entirety and without modifications, you must retain this notice and the following text and disclaimers in all such redistributions of the software, and that in all cases attribution of Nick Hodapp as the original author of the source code shall be included in all such resulting software products or distributions.\uc0\u8232 \ 100 | Neither the name, trademarks, service marks or logos of Nick Hodapp or CoDeveloper LLC may be used to endorse or promote products derived from the software without specific prior written permission from Nick Hodapp. Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by Nick Hodapp herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the software may be incorporated.\ 101 | \ 102 | The software is provided by Nick Hodapp on an "AS IS" basis. NICK HODAPP AND CODEVELOPER LLC MAKE NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.\ 103 | \ 104 | IN NO EVENT SHALL NICK HODAPP OR CODEVELOPER LLC BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NICK HODAPP OR CODEVELOPER LLC HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\ 105 | } -------------------------------------------------------------------------------- /TSAlertView/TSAlertView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TSAlertView.h 3 | // 4 | // Created by Nick Hodapp aka Tom Swift on 1/19/11. 5 | // 6 | 7 | 8 | #import 9 | 10 | typedef enum 11 | { 12 | TSAlertViewButtonLayoutNormal, 13 | TSAlertViewButtonLayoutStacked 14 | 15 | } TSAlertViewButtonLayout; 16 | 17 | typedef enum 18 | { 19 | TSAlertViewStyleNormal, 20 | TSAlertViewStyleInput, 21 | 22 | } TSAlertViewStyle; 23 | 24 | @class TSAlertViewController; 25 | @class TSAlertView; 26 | 27 | @protocol TSAlertViewDelegate 28 | @optional 29 | 30 | // Called when a button is clicked. The view will be automatically dismissed after this call returns 31 | - (void)alertView:(TSAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex; 32 | 33 | // Called when we cancel a view (eg. the user clicks the Home button). This is not called when the user clicks the cancel button. 34 | // If not defined in the delegate, we simulate a click in the cancel button 35 | - (void)alertViewCancel:(TSAlertView *)alertView; 36 | 37 | - (void)willPresentAlertView:(TSAlertView *)alertView; // before animation and showing view 38 | - (void)didPresentAlertView:(TSAlertView *)alertView; // after animation 39 | 40 | - (void)alertView:(TSAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex; // before animation and hiding view 41 | - (void)alertView:(TSAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex; // after animation 42 | 43 | @end 44 | 45 | @interface TSAlertView : UIView 46 | { 47 | UIImage* _backgroundImage; 48 | UILabel* _titleLabel; 49 | UILabel* _messageLabel; 50 | UITextView* _messageTextView; 51 | UIImageView* _messageTextViewMaskImageView; 52 | UITextField* _inputTextField; 53 | NSMutableArray* _buttons; 54 | } 55 | @property(nonatomic, copy) NSString *title; 56 | @property(nonatomic, copy) NSString *message; 57 | @property(nonatomic, assign) id delegate; 58 | @property(nonatomic) NSInteger cancelButtonIndex; 59 | @property(nonatomic, readonly) NSInteger firstOtherButtonIndex; 60 | @property(nonatomic, readonly) NSInteger numberOfButtons; 61 | @property(nonatomic, readonly, getter=isVisible) BOOL visible; 62 | 63 | @property(nonatomic, assign) TSAlertViewButtonLayout buttonLayout; 64 | @property(nonatomic, assign) CGFloat width; 65 | @property(nonatomic, assign) CGFloat maxHeight; 66 | @property(nonatomic, assign) BOOL usesMessageTextView; 67 | @property(nonatomic, retain) UIImage* backgroundImage; 68 | @property(nonatomic, assign) TSAlertViewStyle style; 69 | @property(nonatomic, readonly) UITextField* inputTextField; 70 | 71 | - (id)initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)delegate cancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitles:(NSString *)otherButtonTitles, ...; 72 | - (NSInteger)addButtonWithTitle:(NSString *)title; 73 | - (NSString *)buttonTitleAtIndex:(NSInteger)buttonIndex; 74 | - (void)dismissWithClickedButtonIndex:(NSInteger)buttonIndex animated:(BOOL)animated; 75 | - (void)show; 76 | 77 | @end 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /TSAlertView/TSAlertView.m: -------------------------------------------------------------------------------- 1 | // 2 | // TSAlertView.m 3 | // 4 | // Created by Nick Hodapp aka Tom Swift on 1/19/11. 5 | // 6 | 7 | #import "TSAlertView.h" 8 | #import 9 | 10 | @interface TSAlertOverlayWindow : UIWindow 11 | { 12 | } 13 | @property (nonatomic,retain) UIWindow* oldKeyWindow; 14 | @end 15 | 16 | @implementation TSAlertOverlayWindow 17 | @synthesize oldKeyWindow; 18 | 19 | - (void) makeKeyAndVisible 20 | { 21 | self.oldKeyWindow = [[UIApplication sharedApplication] keyWindow]; 22 | self.windowLevel = UIWindowLevelAlert; 23 | [super makeKeyAndVisible]; 24 | } 25 | 26 | - (void) resignKeyWindow 27 | { 28 | [super resignKeyWindow]; 29 | [self.oldKeyWindow makeKeyWindow]; 30 | } 31 | 32 | - (void) drawRect: (CGRect) rect 33 | { 34 | // render the radial gradient behind the alertview 35 | 36 | CGFloat width = self.frame.size.width; 37 | CGFloat height = self.frame.size.height; 38 | CGFloat locations[3] = { 0.0, 0.5, 1.0 }; 39 | CGFloat components[12] = { 1, 1, 1, 0.5, 40 | 0, 0, 0, 0.5, 41 | 0, 0, 0, 0.7 }; 42 | 43 | CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceRGB(); 44 | CGGradientRef backgroundGradient = CGGradientCreateWithColorComponents(colorspace, components, locations, 3); 45 | CGColorSpaceRelease(colorspace); 46 | 47 | CGContextDrawRadialGradient(UIGraphicsGetCurrentContext(), 48 | backgroundGradient, 49 | CGPointMake(width/2, height/2), 0, 50 | CGPointMake(width/2, height/2), width, 51 | 0); 52 | 53 | CGGradientRelease(backgroundGradient); 54 | } 55 | 56 | - (void) dealloc 57 | { 58 | self.oldKeyWindow = nil; 59 | 60 | NSLog( @"TSAlertView: TSAlertOverlayWindow dealloc" ); 61 | 62 | [super dealloc]; 63 | } 64 | 65 | @end 66 | 67 | @interface TSAlertView (private) 68 | @property (nonatomic, readonly) NSMutableArray* buttons; 69 | @property (nonatomic, readonly) UILabel* titleLabel; 70 | @property (nonatomic, readonly) UILabel* messageLabel; 71 | @property (nonatomic, readonly) UITextView* messageTextView; 72 | - (void) TSAlertView_commonInit; 73 | - (void) releaseWindow: (int) buttonIndex; 74 | - (void) pulse; 75 | - (CGSize) titleLabelSize; 76 | - (CGSize) messageLabelSize; 77 | - (CGSize) inputTextFieldSize; 78 | - (CGSize) buttonsAreaSize_Stacked; 79 | - (CGSize) buttonsAreaSize_SideBySide; 80 | - (CGSize) recalcSizeAndLayout: (BOOL) layout; 81 | @end 82 | 83 | @interface TSAlertViewController : UIViewController 84 | { 85 | } 86 | @end 87 | 88 | @implementation TSAlertViewController 89 | - (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation 90 | { 91 | return YES; 92 | } 93 | - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration 94 | { 95 | TSAlertView* av = [self.view.subviews lastObject]; 96 | if (!av || ![av isKindOfClass:[TSAlertView class]]) 97 | return; 98 | // resize the alertview if it wants to make use of any extra space (or needs to contract) 99 | [UIView animateWithDuration:duration 100 | animations:^{ 101 | [av sizeToFit]; 102 | av.center = CGPointMake( CGRectGetMidX( self.view.bounds ), CGRectGetMidY( self.view.bounds ) );; 103 | av.frame = CGRectIntegral( av.frame ); 104 | }]; 105 | } 106 | 107 | - (void) dealloc 108 | { 109 | NSLog( @"TSAlertView: TSAlertViewController dealloc" ); 110 | [super dealloc]; 111 | } 112 | 113 | @end 114 | 115 | 116 | @implementation TSAlertView 117 | 118 | @synthesize delegate; 119 | @synthesize cancelButtonIndex; 120 | @synthesize firstOtherButtonIndex; 121 | @synthesize buttonLayout; 122 | @synthesize width; 123 | @synthesize maxHeight; 124 | @synthesize usesMessageTextView; 125 | @synthesize backgroundImage = _backgroundImage; 126 | @synthesize style; 127 | 128 | const CGFloat kTSAlertView_LeftMargin = 10.0; 129 | const CGFloat kTSAlertView_TopMargin = 16.0; 130 | const CGFloat kTSAlertView_BottomMargin = 15.0; 131 | const CGFloat kTSAlertView_RowMargin = 5.0; 132 | const CGFloat kTSAlertView_ColumnMargin = 10.0; 133 | 134 | - (id) init 135 | { 136 | if ( ( self = [super init] ) ) 137 | { 138 | [self TSAlertView_commonInit]; 139 | } 140 | return self; 141 | } 142 | 143 | - (id) initWithFrame:(CGRect)frame 144 | { 145 | if ( ( self = [super initWithFrame: frame] ) ) 146 | { 147 | [self TSAlertView_commonInit]; 148 | 149 | if ( !CGRectIsEmpty( frame ) ) 150 | { 151 | width = frame.size.width; 152 | maxHeight = frame.size.height; 153 | } 154 | } 155 | return self; 156 | } 157 | 158 | - (id) initWithTitle: (NSString *) t message: (NSString *) m delegate: (id) d cancelButtonTitle: (NSString *) cancelButtonTitle otherButtonTitles: (NSString *) otherButtonTitles, ... 159 | { 160 | if ( (self = [super init] ) ) // will call into initWithFrame, thus TSAlertView_commonInit is called 161 | { 162 | self.title = t; 163 | self.message = m; 164 | self.delegate = d; 165 | 166 | if ( nil != cancelButtonTitle ) 167 | { 168 | [self addButtonWithTitle: cancelButtonTitle ]; 169 | self.cancelButtonIndex = 0; 170 | } 171 | 172 | if ( nil != otherButtonTitles ) 173 | { 174 | firstOtherButtonIndex = [self.buttons count]; 175 | [self addButtonWithTitle: otherButtonTitles ]; 176 | 177 | va_list args; 178 | va_start(args, otherButtonTitles); 179 | 180 | id arg; 181 | while ( nil != ( arg = va_arg( args, id ) ) ) 182 | { 183 | if ( ![arg isKindOfClass: [NSString class] ] ) 184 | return nil; 185 | 186 | [self addButtonWithTitle: (NSString*)arg ]; 187 | } 188 | } 189 | } 190 | 191 | return self; 192 | } 193 | 194 | - (CGSize) sizeThatFits: (CGSize) unused 195 | { 196 | CGSize s = [self recalcSizeAndLayout: NO]; 197 | return s; 198 | } 199 | 200 | - (void) layoutSubviews 201 | { 202 | [self recalcSizeAndLayout: YES]; 203 | } 204 | 205 | - (void) drawRect:(CGRect)rect 206 | { 207 | [self.backgroundImage drawInRect: rect]; 208 | } 209 | 210 | - (void)dealloc 211 | { 212 | [_backgroundImage release]; 213 | [_buttons release]; 214 | [_titleLabel release]; 215 | [_messageLabel release]; 216 | [_messageTextView release]; 217 | [_messageTextViewMaskImageView release]; 218 | 219 | [[NSNotificationCenter defaultCenter] removeObserver: self ]; 220 | 221 | NSLog( @"TSAlertView: TSAlertOverlayWindow dealloc" ); 222 | 223 | [super dealloc]; 224 | } 225 | 226 | 227 | - (void) TSAlertView_commonInit 228 | { 229 | self.backgroundColor = [UIColor clearColor]; 230 | self.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin; 231 | 232 | // defaults: 233 | style = TSAlertViewStyleNormal; 234 | self.width = 0; // set to default 235 | self.maxHeight = 0; // set to default 236 | buttonLayout = TSAlertViewButtonLayoutNormal; 237 | cancelButtonIndex = -1; 238 | firstOtherButtonIndex = -1; 239 | } 240 | 241 | - (void) setWidth:(CGFloat) w 242 | { 243 | if ( w <= 0 ) 244 | w = 284; 245 | 246 | width = MAX( w, self.backgroundImage.size.width ); 247 | } 248 | 249 | - (CGFloat) width 250 | { 251 | if ( nil == self.superview ) 252 | return width; 253 | 254 | CGFloat maxWidth = self.superview.bounds.size.width - 20; 255 | 256 | return MIN( width, maxWidth ); 257 | } 258 | 259 | - (void) setMaxHeight:(CGFloat) h 260 | { 261 | if ( h <= 0 ) 262 | h = 358; 263 | 264 | maxHeight = MAX( h, self.backgroundImage.size.height ); 265 | } 266 | 267 | - (CGFloat) maxHeight 268 | { 269 | if ( nil == self.superview ) 270 | return maxHeight; 271 | 272 | return MIN( maxHeight, self.superview.bounds.size.height - 20 ); 273 | } 274 | 275 | - (void) setStyle:(TSAlertViewStyle)newStyle 276 | { 277 | if ( style != newStyle ) 278 | { 279 | style = newStyle; 280 | 281 | if ( style == TSAlertViewStyleInput ) 282 | { 283 | // need to watch for keyboard 284 | [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector( onKeyboardWillShow:) name: UIKeyboardWillShowNotification object: nil]; 285 | [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector( onKeyboardWillHide:) name: UIKeyboardWillHideNotification object: nil]; 286 | } 287 | } 288 | } 289 | 290 | - (void) onKeyboardWillShow: (NSNotification*) note 291 | { 292 | NSValue* v = [note.userInfo objectForKey: UIKeyboardFrameEndUserInfoKey]; 293 | CGRect kbframe = [v CGRectValue]; 294 | kbframe = [self.superview convertRect: kbframe fromView: nil]; 295 | 296 | if ( CGRectIntersectsRect( self.frame, kbframe) ) 297 | { 298 | CGPoint c = self.center; 299 | 300 | if ( self.frame.size.height > kbframe.origin.y - 20 ) 301 | { 302 | self.maxHeight = kbframe.origin.y - 20; 303 | [self sizeToFit]; 304 | [self layoutSubviews]; 305 | } 306 | 307 | c.y = kbframe.origin.y / 2; 308 | 309 | [UIView animateWithDuration: 0.2 310 | animations: ^{ 311 | self.center = c; 312 | self.frame = CGRectIntegral(self.frame); 313 | }]; 314 | } 315 | } 316 | 317 | - (void) onKeyboardWillHide: (NSNotification*) note 318 | { 319 | [UIView animateWithDuration: 0.2 320 | animations: ^{ 321 | self.center = CGPointMake( CGRectGetMidX( self.superview.bounds ), CGRectGetMidY( self.superview.bounds )); 322 | self.frame = CGRectIntegral(self.frame); 323 | }]; 324 | } 325 | 326 | - (NSMutableArray*) buttons 327 | { 328 | if ( _buttons == nil ) 329 | { 330 | _buttons = [[NSMutableArray arrayWithCapacity:4] retain]; 331 | } 332 | 333 | return _buttons; 334 | } 335 | 336 | - (UILabel*) titleLabel 337 | { 338 | if ( _titleLabel == nil ) 339 | { 340 | _titleLabel = [[UILabel alloc] init]; 341 | _titleLabel.font = [UIFont boldSystemFontOfSize: 18]; 342 | _titleLabel.backgroundColor = [UIColor clearColor]; 343 | _titleLabel.textColor = [UIColor whiteColor]; 344 | _titleLabel.textAlignment = UITextAlignmentCenter; 345 | _titleLabel.lineBreakMode = UILineBreakModeWordWrap; 346 | _titleLabel.numberOfLines = 0; 347 | } 348 | 349 | return _titleLabel; 350 | } 351 | 352 | - (UILabel*) messageLabel 353 | { 354 | if ( _messageLabel == nil ) 355 | { 356 | _messageLabel = [[UILabel alloc] init]; 357 | _messageLabel.font = [UIFont systemFontOfSize: 16]; 358 | _messageLabel.backgroundColor = [UIColor clearColor]; 359 | _messageLabel.textColor = [UIColor whiteColor]; 360 | _messageLabel.textAlignment = UITextAlignmentCenter; 361 | _messageLabel.lineBreakMode = UILineBreakModeWordWrap; 362 | _messageLabel.numberOfLines = 0; 363 | } 364 | 365 | return _messageLabel; 366 | } 367 | 368 | - (UITextView*) messageTextView 369 | { 370 | if ( _messageTextView == nil ) 371 | { 372 | _messageTextView = [[UITextView alloc] init]; 373 | _messageTextView.editable = NO; 374 | _messageTextView.font = [UIFont systemFontOfSize: 16]; 375 | _messageTextView.backgroundColor = [UIColor whiteColor]; 376 | _messageTextView.textColor = [UIColor darkTextColor]; 377 | _messageTextView.textAlignment = UITextAlignmentLeft; 378 | _messageTextView.bounces = YES; 379 | _messageTextView.alwaysBounceVertical = YES; 380 | _messageTextView.layer.cornerRadius = 5; 381 | } 382 | 383 | return _messageTextView; 384 | } 385 | 386 | - (UIImageView*) messageTextViewMaskView 387 | { 388 | if ( _messageTextViewMaskImageView == nil ) 389 | { 390 | UIImage* shadowImage = [[UIImage imageNamed:@"TSAlertViewMessageListViewShadow.png"] stretchableImageWithLeftCapWidth:6 topCapHeight:7]; 391 | 392 | _messageTextViewMaskImageView = [[UIImageView alloc] initWithImage: shadowImage]; 393 | _messageTextViewMaskImageView.userInteractionEnabled = NO; 394 | _messageTextViewMaskImageView.layer.masksToBounds = YES; 395 | _messageTextViewMaskImageView.layer.cornerRadius = 6; 396 | } 397 | return _messageTextViewMaskImageView; 398 | } 399 | 400 | - (UITextField*) inputTextField 401 | { 402 | if ( _inputTextField == nil ) 403 | { 404 | _inputTextField = [[UITextField alloc] init]; 405 | _inputTextField.borderStyle = UITextBorderStyleRoundedRect; 406 | } 407 | 408 | return _inputTextField; 409 | } 410 | 411 | - (UIImage*) backgroundImage 412 | { 413 | if ( _backgroundImage == nil ) 414 | { 415 | self.backgroundImage = [[UIImage imageNamed: @"TSAlertViewBackground.png"] stretchableImageWithLeftCapWidth: 15 topCapHeight: 30]; 416 | } 417 | 418 | return _backgroundImage; 419 | } 420 | 421 | - (void) setTitle:(NSString *)t 422 | { 423 | self.titleLabel.text = t; 424 | } 425 | 426 | - (NSString*) title 427 | { 428 | return self.titleLabel.text; 429 | } 430 | 431 | - (void) setMessage:(NSString *)t 432 | { 433 | self.messageLabel.text = t; 434 | self.messageTextView.text = t; 435 | } 436 | 437 | - (NSString*) message 438 | { 439 | return self.messageLabel.text; 440 | } 441 | 442 | - (NSInteger) numberOfButtons 443 | { 444 | return [self.buttons count]; 445 | } 446 | 447 | - (void) setCancelButtonIndex:(NSInteger)buttonIndex 448 | { 449 | // avoid a NSRange exception 450 | if ( buttonIndex < 0 || buttonIndex >= [self.buttons count] ) 451 | return; 452 | 453 | cancelButtonIndex = buttonIndex; 454 | 455 | UIButton* b = [self.buttons objectAtIndex: buttonIndex]; 456 | 457 | UIImage* buttonBgNormal = [UIImage imageNamed: @"TSAlertViewCancelButtonBackground.png"]; 458 | buttonBgNormal = [buttonBgNormal stretchableImageWithLeftCapWidth: buttonBgNormal.size.width / 2.0 topCapHeight: buttonBgNormal.size.height / 2.0]; 459 | [b setBackgroundImage: buttonBgNormal forState: UIControlStateNormal]; 460 | 461 | UIImage* buttonBgPressed = [UIImage imageNamed: @"TSAlertViewButtonBackground_Highlighted.png"]; 462 | buttonBgPressed = [buttonBgPressed stretchableImageWithLeftCapWidth: buttonBgPressed.size.width / 2.0 topCapHeight: buttonBgPressed.size.height / 2.0]; 463 | [b setBackgroundImage: buttonBgPressed forState: UIControlStateHighlighted]; 464 | } 465 | 466 | - (BOOL) isVisible 467 | { 468 | return self.superview != nil; 469 | } 470 | 471 | - (NSInteger) addButtonWithTitle: (NSString *) t 472 | { 473 | UIButton* b = [UIButton buttonWithType: UIButtonTypeCustom]; 474 | [b setTitle: t forState: UIControlStateNormal]; 475 | 476 | UIImage* buttonBgNormal = [UIImage imageNamed: @"TSAlertViewButtonBackground.png"]; 477 | buttonBgNormal = [buttonBgNormal stretchableImageWithLeftCapWidth: buttonBgNormal.size.width / 2.0 topCapHeight: buttonBgNormal.size.height / 2.0]; 478 | [b setBackgroundImage: buttonBgNormal forState: UIControlStateNormal]; 479 | 480 | UIImage* buttonBgPressed = [UIImage imageNamed: @"TSAlertViewButtonBackground_Highlighted.png"]; 481 | buttonBgPressed = [buttonBgPressed stretchableImageWithLeftCapWidth: buttonBgPressed.size.width / 2.0 topCapHeight: buttonBgPressed.size.height / 2.0]; 482 | [b setBackgroundImage: buttonBgPressed forState: UIControlStateHighlighted]; 483 | 484 | [b addTarget: self action: @selector(onButtonPress:) forControlEvents: UIControlEventTouchUpInside]; 485 | 486 | [self.buttons addObject: b]; 487 | 488 | [self setNeedsLayout]; 489 | 490 | return self.buttons.count-1; 491 | } 492 | 493 | - (NSString *) buttonTitleAtIndex:(NSInteger)buttonIndex 494 | { 495 | // avoid a NSRange exception 496 | if ( buttonIndex < 0 || buttonIndex >= [self.buttons count] ) 497 | return nil; 498 | 499 | UIButton* b = [self.buttons objectAtIndex: buttonIndex]; 500 | 501 | return [b titleForState: UIControlStateNormal]; 502 | } 503 | 504 | - (void) dismissWithClickedButtonIndex: (NSInteger)buttonIndex animated: (BOOL) animated 505 | { 506 | if ( self.style == TSAlertViewStyleInput && [self.inputTextField isFirstResponder] ) 507 | { 508 | [self.inputTextField resignFirstResponder]; 509 | } 510 | 511 | if ( [self.delegate respondsToSelector: @selector(alertView:willDismissWithButtonIndex:)] ) 512 | { 513 | [self.delegate alertView: self willDismissWithButtonIndex: buttonIndex ]; 514 | } 515 | 516 | if ( animated ) 517 | { 518 | self.window.backgroundColor = [UIColor clearColor]; 519 | self.window.alpha = 1; 520 | 521 | [UIView animateWithDuration: 0.2 522 | animations: ^{ 523 | [self.window resignKeyWindow]; 524 | self.window.alpha = 0; 525 | } 526 | completion: ^(BOOL finished) { 527 | [self releaseWindow: buttonIndex]; 528 | }]; 529 | 530 | [UIView commitAnimations]; 531 | } 532 | else 533 | { 534 | [self.window resignKeyWindow]; 535 | 536 | [self releaseWindow: buttonIndex]; 537 | } 538 | } 539 | 540 | - (void) releaseWindow: (int) buttonIndex 541 | { 542 | if ( [self.delegate respondsToSelector: @selector(alertView:didDismissWithButtonIndex:)] ) 543 | { 544 | [self.delegate alertView: self didDismissWithButtonIndex: buttonIndex ]; 545 | } 546 | 547 | // the one place we release the window we allocated in "show" 548 | // this will propogate releases to us (TSAlertView), and our TSAlertViewController 549 | 550 | [self.window release]; 551 | } 552 | 553 | - (void) show 554 | { 555 | [[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode beforeDate:[NSDate date]]; 556 | 557 | TSAlertViewController* avc = [[[TSAlertViewController alloc] init] autorelease]; 558 | avc.view.backgroundColor = [UIColor clearColor]; 559 | 560 | // $important - the window is released only when the user clicks an alert view button 561 | TSAlertOverlayWindow* ow = [[TSAlertOverlayWindow alloc] initWithFrame: [UIScreen mainScreen].bounds]; 562 | ow.alpha = 0.0; 563 | ow.backgroundColor = [UIColor clearColor]; 564 | ow.rootViewController = avc; 565 | [ow makeKeyAndVisible]; 566 | 567 | // fade in the window 568 | [UIView animateWithDuration: 0.2 animations: ^{ 569 | ow.alpha = 1; 570 | }]; 571 | 572 | // add and pulse the alertview 573 | // add the alertview 574 | [avc.view addSubview: self]; 575 | [self sizeToFit]; 576 | self.center = CGPointMake( CGRectGetMidX( avc.view.bounds ), CGRectGetMidY( avc.view.bounds ) );; 577 | self.frame = CGRectIntegral( self.frame ); 578 | [self pulse]; 579 | 580 | if ( self.style == TSAlertViewStyleInput ) 581 | { 582 | [self layoutSubviews]; 583 | [self.inputTextField becomeFirstResponder]; 584 | } 585 | } 586 | 587 | - (void) pulse 588 | { 589 | // pulse animation thanks to: http://delackner.com/blog/2009/12/mimicking-uialertviews-animated-transition/ 590 | self.transform = CGAffineTransformMakeScale(0.6, 0.6); 591 | [UIView animateWithDuration: 0.2 592 | animations: ^{ 593 | self.transform = CGAffineTransformMakeScale(1.1, 1.1); 594 | } 595 | completion: ^(BOOL finished){ 596 | [UIView animateWithDuration:1.0/15.0 597 | animations: ^{ 598 | self.transform = CGAffineTransformMakeScale(0.9, 0.9); 599 | } 600 | completion: ^(BOOL finished){ 601 | [UIView animateWithDuration:1.0/7.5 602 | animations: ^{ 603 | self.transform = CGAffineTransformIdentity; 604 | }]; 605 | }]; 606 | }]; 607 | 608 | } 609 | 610 | - (void) onButtonPress: (id) sender 611 | { 612 | int buttonIndex = [_buttons indexOfObjectIdenticalTo: sender]; 613 | 614 | if ( [self.delegate respondsToSelector: @selector(alertView:clickedButtonAtIndex:)] ) 615 | { 616 | [self.delegate alertView: self clickedButtonAtIndex: buttonIndex ]; 617 | } 618 | 619 | if ( buttonIndex == self.cancelButtonIndex ) 620 | { 621 | if ( [self.delegate respondsToSelector: @selector(alertViewCancel:)] ) 622 | { 623 | [self.delegate alertViewCancel: self ]; 624 | } 625 | } 626 | 627 | [self dismissWithClickedButtonIndex: buttonIndex animated: YES]; 628 | } 629 | 630 | - (CGSize) recalcSizeAndLayout: (BOOL) layout 631 | { 632 | BOOL stacked = !(self.buttonLayout == TSAlertViewButtonLayoutNormal && [self.buttons count] == 2 ); 633 | 634 | CGFloat maxWidth = self.width - (kTSAlertView_LeftMargin * 2); 635 | 636 | CGSize titleLabelSize = [self titleLabelSize]; 637 | CGSize messageViewSize = [self messageLabelSize]; 638 | CGSize inputTextFieldSize = [self inputTextFieldSize]; 639 | CGSize buttonsAreaSize = stacked ? [self buttonsAreaSize_Stacked] : [self buttonsAreaSize_SideBySide]; 640 | 641 | CGFloat inputRowHeight = self.style == TSAlertViewStyleInput ? inputTextFieldSize.height + kTSAlertView_RowMargin : 0; 642 | 643 | CGFloat totalHeight = kTSAlertView_TopMargin + titleLabelSize.height + kTSAlertView_RowMargin + messageViewSize.height + inputRowHeight + kTSAlertView_RowMargin + buttonsAreaSize.height + kTSAlertView_BottomMargin; 644 | 645 | if ( totalHeight > self.maxHeight ) 646 | { 647 | // too tall - we'll condense by using a textView (with scrolling) for the message 648 | 649 | totalHeight -= messageViewSize.height; 650 | //$$what if it's still too tall? 651 | messageViewSize.height = self.maxHeight - totalHeight; 652 | 653 | totalHeight = self.maxHeight; 654 | 655 | self.usesMessageTextView = YES; 656 | } 657 | 658 | if ( layout ) 659 | { 660 | // title 661 | CGFloat y = kTSAlertView_TopMargin; 662 | if ( self.title != nil ) 663 | { 664 | self.titleLabel.frame = CGRectMake( kTSAlertView_LeftMargin, y, titleLabelSize.width, titleLabelSize.height ); 665 | [self addSubview: self.titleLabel]; 666 | y += titleLabelSize.height + kTSAlertView_RowMargin; 667 | } 668 | 669 | // message 670 | if ( self.message != nil ) 671 | { 672 | if ( self.usesMessageTextView ) 673 | { 674 | self.messageTextView.frame = CGRectMake( kTSAlertView_LeftMargin, y, messageViewSize.width, messageViewSize.height ); 675 | [self addSubview: self.messageTextView]; 676 | y += messageViewSize.height + kTSAlertView_RowMargin; 677 | 678 | UIImageView* maskImageView = [self messageTextViewMaskView]; 679 | maskImageView.frame = self.messageTextView.frame; 680 | [self addSubview: maskImageView]; 681 | } 682 | else 683 | { 684 | self.messageLabel.frame = CGRectMake( kTSAlertView_LeftMargin, y, messageViewSize.width, messageViewSize.height ); 685 | [self addSubview: self.messageLabel]; 686 | y += messageViewSize.height + kTSAlertView_RowMargin; 687 | } 688 | } 689 | 690 | // input 691 | if ( self.style == TSAlertViewStyleInput ) 692 | { 693 | self.inputTextField.frame = CGRectMake( kTSAlertView_LeftMargin, y, inputTextFieldSize.width, inputTextFieldSize.height ); 694 | [self addSubview: self.inputTextField]; 695 | y += inputTextFieldSize.height + kTSAlertView_RowMargin; 696 | } 697 | 698 | // buttons 699 | CGFloat buttonHeight = [[self.buttons objectAtIndex:0] sizeThatFits: CGSizeZero].height; 700 | if ( stacked ) 701 | { 702 | CGFloat buttonWidth = maxWidth; 703 | for ( UIButton* b in self.buttons ) 704 | { 705 | b.frame = CGRectMake( kTSAlertView_LeftMargin, y, buttonWidth, buttonHeight ); 706 | [self addSubview: b]; 707 | y += buttonHeight + kTSAlertView_RowMargin; 708 | } 709 | } 710 | else 711 | { 712 | CGFloat buttonWidth = (maxWidth - kTSAlertView_ColumnMargin) / 2.0; 713 | CGFloat x = kTSAlertView_LeftMargin; 714 | for ( UIButton* b in self.buttons ) 715 | { 716 | b.frame = CGRectMake( x, y, buttonWidth, buttonHeight ); 717 | [self addSubview: b]; 718 | x += buttonWidth + kTSAlertView_ColumnMargin; 719 | } 720 | } 721 | 722 | } 723 | 724 | return CGSizeMake( self.width, totalHeight ); 725 | } 726 | 727 | - (CGSize) titleLabelSize 728 | { 729 | CGFloat maxWidth = self.width - (kTSAlertView_LeftMargin * 2); 730 | CGSize s = [self.titleLabel.text sizeWithFont: self.titleLabel.font constrainedToSize: CGSizeMake(maxWidth, 1000) lineBreakMode: self.titleLabel.lineBreakMode]; 731 | if ( s.width < maxWidth ) 732 | s.width = maxWidth; 733 | 734 | return s; 735 | } 736 | 737 | - (CGSize) messageLabelSize 738 | { 739 | CGFloat maxWidth = self.width - (kTSAlertView_LeftMargin * 2); 740 | CGSize s = [self.messageLabel.text sizeWithFont: self.messageLabel.font constrainedToSize: CGSizeMake(maxWidth, 1000) lineBreakMode: self.messageLabel.lineBreakMode]; 741 | if ( s.width < maxWidth ) 742 | s.width = maxWidth; 743 | 744 | return s; 745 | } 746 | 747 | - (CGSize) inputTextFieldSize 748 | { 749 | if ( self.style == TSAlertViewStyleNormal) 750 | return CGSizeZero; 751 | 752 | CGFloat maxWidth = self.width - (kTSAlertView_LeftMargin * 2); 753 | 754 | CGSize s = [self.inputTextField sizeThatFits: CGSizeZero]; 755 | 756 | return CGSizeMake( maxWidth, s.height ); 757 | } 758 | 759 | - (CGSize) buttonsAreaSize_SideBySide 760 | { 761 | CGFloat maxWidth = self.width - (kTSAlertView_LeftMargin * 2); 762 | 763 | CGSize bs = [[self.buttons objectAtIndex:0] sizeThatFits: CGSizeZero]; 764 | 765 | bs.width = maxWidth; 766 | 767 | return bs; 768 | } 769 | 770 | - (CGSize) buttonsAreaSize_Stacked 771 | { 772 | CGFloat maxWidth = self.width - (kTSAlertView_LeftMargin * 2); 773 | int buttonCount = [self.buttons count]; 774 | 775 | CGSize bs = [[self.buttons objectAtIndex:0] sizeThatFits: CGSizeZero]; 776 | 777 | bs.width = maxWidth; 778 | 779 | bs.height = (bs.height * buttonCount) + (kTSAlertView_RowMargin * (buttonCount-1)); 780 | 781 | return bs; 782 | } 783 | 784 | @end 785 | 786 | 787 | 788 | 789 | -------------------------------------------------------------------------------- /TSAlertView/TSAlertViewBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomSwift/TSAlertView/37c4c4d3bba757d82201f7609577b32020561ef9/TSAlertView/TSAlertViewBackground.png -------------------------------------------------------------------------------- /TSAlertView/TSAlertViewBackground2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomSwift/TSAlertView/37c4c4d3bba757d82201f7609577b32020561ef9/TSAlertView/TSAlertViewBackground2.png -------------------------------------------------------------------------------- /TSAlertView/TSAlertViewButtonBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomSwift/TSAlertView/37c4c4d3bba757d82201f7609577b32020561ef9/TSAlertView/TSAlertViewButtonBackground.png -------------------------------------------------------------------------------- /TSAlertView/TSAlertViewButtonBackground_Highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomSwift/TSAlertView/37c4c4d3bba757d82201f7609577b32020561ef9/TSAlertView/TSAlertViewButtonBackground_Highlighted.png -------------------------------------------------------------------------------- /TSAlertView/TSAlertViewCancelButtonBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomSwift/TSAlertView/37c4c4d3bba757d82201f7609577b32020561ef9/TSAlertView/TSAlertViewCancelButtonBackground.png -------------------------------------------------------------------------------- /TSAlertView/TSAlertViewMessageListViewShadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomSwift/TSAlertView/37c4c4d3bba757d82201f7609577b32020561ef9/TSAlertView/TSAlertViewMessageListViewShadow.png --------------------------------------------------------------------------------