From deed2324a2118831a8d601c278e6a7a9051a7a1c Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 8 May 2012 22:07:01 -0400 Subject: Modified (3.) button: * Button now functions as the 'Internet Tune-up' button * Added parentheses labels on left & right sides of the button to indicate that it's optional * Label on top of the button that indicates the status of the internet request * Removed old RoundRect Internet Tune-up button (internetRequestButton) --- TODO | 6 +- Video Tuneup/Classes/WebserviceCommunicator.m | 4 +- Video Tuneup/ViewController.h | 2 +- Video Tuneup/ViewController.m | 6 +- Video Tuneup/en.lproj/ViewController_iPad.xib | 220 ++++++++++++++++++-------- 5 files changed, 160 insertions(+), 78 deletions(-) diff --git a/TODO b/TODO index f98cccc..0e09c50 100644 --- a/TODO +++ b/TODO @@ -20,6 +20,6 @@ v write up text * 3. button (Teddy) - * (3.) Put the whole button in parentheses to show that it's optional. - * Make 3. button the Internet Tune-up button (and remove current Internet Tune-up button) - * Put a label on 3. button that shows status of internet requests (like the current RoundRect internet button's changing label text) + v (3.) Put the whole button in parentheses to show that it's optional. + v Make 3. button the Internet Tune-up button (and remove current Internet Tune-up button) + v Put a label on 3. button that shows status of internet requests (like the current RoundRect internet button's changing label text) diff --git a/Video Tuneup/Classes/WebserviceCommunicator.m b/Video Tuneup/Classes/WebserviceCommunicator.m index 6fedd25..cdf5771 100644 --- a/Video Tuneup/Classes/WebserviceCommunicator.m +++ b/Video Tuneup/Classes/WebserviceCommunicator.m @@ -74,7 +74,7 @@ -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { NSLog(@"Song send failed"); if(_viewController != nil) { - [_viewController.internetRequestButton setTitle:@"Internet Tune-up (failed)" forState:UIControlStateNormal]; + [[_viewController internetRequestLabel] setText:@"(failed)"]; } } @@ -83,7 +83,7 @@ [fileHandle closeFile]; if(_viewController != nil) { - [_viewController.internetRequestButton setTitle:@"Internet Tune-up (completed)" forState:UIControlStateNormal]; + [[_viewController internetRequestLabel] setText:@"(completed)"]; } // This is happening before file is completely sent back. Need to change timeout. diff --git a/Video Tuneup/ViewController.h b/Video Tuneup/ViewController.h index 4568955..213bac1 100644 --- a/Video Tuneup/ViewController.h +++ b/Video Tuneup/ViewController.h @@ -41,7 +41,7 @@ @property (nonatomic, retain) IBOutlet UIButton *mediaLibraryButton; @property (nonatomic, retain) UIPopoverController *mediaLibraryPopover; -@property (nonatomic, retain) IBOutlet UIButton *internetRequestButton; +@property (nonatomic, retain) IBOutlet UILabel *internetRequestLabel; - (void)toggleHelpView; diff --git a/Video Tuneup/ViewController.m b/Video Tuneup/ViewController.m index beb0519..870e48a 100644 --- a/Video Tuneup/ViewController.m +++ b/Video Tuneup/ViewController.m @@ -22,7 +22,7 @@ static const NSString *ItemStatusContext; @synthesize player, playerItem, playerView, playButton, pauseButton, rewindButton, editor, videoNavBar, exportStatus, mScrubber, mediaLibraryButton, mediaLibraryPopover, exportButton, defaultHelpView; -@synthesize internetRequestButton; +@synthesize internetRequestLabel; #pragma mark - Video playback @@ -123,7 +123,7 @@ mScrubber, mediaLibraryButton, mediaLibraryPopover, exportButton, defaultHelpVie NSLog(@"Song asset duration is %f", CMTimeGetSeconds([songAsset duration])); if(CMTimeGetSeconds([songAsset duration]) == 0){ - [internetRequestButton setTitle:@"Internet Tune-up (failed)" forState:UIControlStateNormal]; + [internetRequestLabel setText:@"(failed)"]; return; } NSLog(@"Refreshing editor"); @@ -481,7 +481,7 @@ mScrubber, mediaLibraryButton, mediaLibraryPopover, exportButton, defaultHelpVie NSURL *songFileURL = [[NSBundle mainBundle] URLForResource:@"song" withExtension:@"mp3"]; [com setParentController:self]; [com mixMusic:songFileURL]; - [internetRequestButton setTitle:@"Attempting..." forState:UIControlStateNormal]; + [internetRequestLabel setText:@"(attempting...)"]; } #pragma mark - View controller boilerplate diff --git a/Video Tuneup/en.lproj/ViewController_iPad.xib b/Video Tuneup/en.lproj/ViewController_iPad.xib index b390865..b161e02 100644 --- a/Video Tuneup/en.lproj/ViewController_iPad.xib +++ b/Video Tuneup/en.lproj/ViewController_iPad.xib @@ -1,14 +1,14 @@ - 1296 - 11D50d - 2182 - 1138.32 - 568.00 + 1280 + 10K549 + 1938 + 1038.36 + 461.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 1181 + 933 IBUIView @@ -47,7 +47,7 @@ - + 1 MCAwIDAAA @@ -66,6 +66,7 @@ {{93, 11}, {917, 23}} + NO IBIPadFramework 0 @@ -216,7 +217,7 @@ CiAgIDQuIEV4cG9ydA {1024, 129} - + 9 NO IBIPadFramework @@ -286,7 +287,7 @@ CiAgIDQuIEV4cG9ydA 292 - {{365, -1}, {134, 133}} + {{376, -1}, {134, 133}} @@ -307,13 +308,45 @@ CiAgIDQuIEV4cG9ydA + + + 292 + {{425, 99}, {72, 21}} + + + + NO + YES + 7 + NO + IBIPadFramework + + + + + 1 + MCAwIDAgMC44OAA + + 1 + 10 + 2 + + 1 + 12 + + + Helvetica + 12 + 16 + + 292 - {{517, -1}, {134, 133}} + {{538, -1}, {134, 133}} - + NO IBIPadFramework 0 @@ -334,10 +367,10 @@ CiAgIDQuIEV4cG9ydA 293 - {{853, 0}, {151, 37}} + {{853, 33}, {151, 37}} - + NO IBIPadFramework 0 @@ -360,32 +393,10 @@ CiAgIDQuIEV4cG9ydA 16 - - - 293 - {{806, 42}, {198, 37}} - - - - NO - IBIPadFramework - 0 - 0 - 1 - Internet Tune-up (beta) - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - 293 - {{849, 84}, {155, 37}} + {{849, 80}, {155, 37}} @@ -414,10 +425,10 @@ CiAgIDQuIEV4cG9ydA 271 - {{538, 84}, {99, 30}} + {{557, 84}, {99, 30}} - + NO YES 7 @@ -442,6 +453,63 @@ CiAgIDQuIEV4cG9ydA 16 + + + 292 + {{352, -11}, {42, 132}} + + + + NO + YES + 7 + NO + IBIPadFramework + ( + + 1 + MC45MDIxNzM5MTMgMC45MDIxNzM5MTMgMC45MDIxNzM5MTMAA + + + + 1 + NO + 10 + + 1 + 90 + + + Helvetica + 90 + 16 + + + + + 292 + {{504, -11}, {42, 132}} + + + + NO + YES + 7 + NO + IBIPadFramework + ) + + 1 + MC44ODU4Njk1NjUyIDAuODg1ODY5NTY1MiAwLjg4NTg2OTU2NTIAA + + + + 1 + NO + 10 + + + {{0, 20}, {1024, 748}} @@ -482,14 +550,6 @@ CiAgIDQuIEV4cG9ydA 10 - - - internetRequestButton - - - - 69 - mediaLibraryButton @@ -538,6 +598,14 @@ CiAgIDQuIEV4cG9ydA 44 + + + internetRequestLabel + + + + 91 + loadDefaultAssetFromFile: @@ -608,15 +676,6 @@ CiAgIDQuIEV4cG9ydA 46 - - - sendMixRequest: - - - 7 - - 67 - showMediaLibrary: @@ -635,6 +694,15 @@ CiAgIDQuIEV4cG9ydA 78 + + + sendMixRequest: + + + 7 + + 89 + exportToCameraRoll: @@ -674,12 +742,14 @@ CiAgIDQuIEV4cG9ydA - + + + @@ -699,11 +769,6 @@ CiAgIDQuIEV4cG9ydA - - 65 - - - 70 @@ -804,6 +869,21 @@ CiAgIDQuIEV4cG9ydA + + 90 + + + + + 92 + + + + + 93 + + + @@ -823,7 +903,6 @@ CiAgIDQuIEV4cG9ydA com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin PlayerView com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -834,12 +913,15 @@ CiAgIDQuIEV4cG9ydA com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 88 + 93 @@ -912,7 +994,7 @@ CiAgIDQuIEV4cG9ydA UIView UIButton UILabel - UIButton + UILabel UISlider UIButton UIButton @@ -934,9 +1016,9 @@ CiAgIDQuIEV4cG9ydA exportStatus UILabel - - internetRequestButton - UIButton + + internetRequestLabel + UILabel mScrubber @@ -978,7 +1060,7 @@ CiAgIDQuIEV4cG9ydA IBIPadFramework com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - + YES 3 @@ -989,6 +1071,6 @@ CiAgIDQuIEV4cG9ydA {1024, 129} {134, 133} - 1181 + 933 -- cgit v1.2.3