From 5c0e1597bd05ae886cfc71cd3570e00c531e7cbf Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 8 May 2012 18:31:19 -0400 Subject: Default "no-content" view: if no video is selected, show this view so that the user knows they have to select a video, and so they know how to use the app. Once the user has selected a video, this 'help view' gets hidden so they can preview their video in the playerView. --- TODO | 8 +- Video Tuneup.xcodeproj/project.pbxproj | 4 + Video Tuneup/Classes/AssetsViewController.m | 1 + Video Tuneup/ViewController.h | 2 + Video Tuneup/ViewController.m | 17 ++- Video Tuneup/en.lproj/ViewController_iPad.xib | 143 ++++++++++++++++++++++++-- Video Tuneup/interface/noisy tile.png | Bin 0 -> 15014 bytes 7 files changed, 162 insertions(+), 13 deletions(-) create mode 100644 Video Tuneup/interface/noisy tile.png diff --git a/TODO b/TODO index 60bd346..e318587 100644 --- a/TODO +++ b/TODO @@ -14,7 +14,7 @@ v Video popup should disappear when a video is selected * Local mixing should happen when a song is selected * Create better buttons from 'demo' stuff - * Instructional NO-CONTENT view - * show when no video selected - * when video selected: hide; show player view - * write up text + v Instructional NO-CONTENT view + v show when no video selected + v when video selected: hide; show player view + v write up text diff --git a/Video Tuneup.xcodeproj/project.pbxproj b/Video Tuneup.xcodeproj/project.pbxproj index 85ab174..765b1ba 100644 --- a/Video Tuneup.xcodeproj/project.pbxproj +++ b/Video Tuneup.xcodeproj/project.pbxproj @@ -16,6 +16,7 @@ D115C7331559A00A008BEA8D /* mix icon.png in Resources */ = {isa = PBXBuildFile; fileRef = D115C72E1559A00A008BEA8D /* mix icon.png */; }; D115C7341559A00A008BEA8D /* toolbar.png in Resources */ = {isa = PBXBuildFile; fileRef = D115C72F1559A00A008BEA8D /* toolbar.png */; }; D115C7351559A00A008BEA8D /* video icon.png in Resources */ = {isa = PBXBuildFile; fileRef = D115C7301559A00A008BEA8D /* video icon.png */; }; + D14D0E351559C51400DC6034 /* noisy tile.png in Resources */ = {isa = PBXBuildFile; fileRef = D14D0E341559C51400DC6034 /* noisy tile.png */; }; D19C74771547289A006E4122 /* AssetsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D19C74761547289A006E4122 /* AssetsViewController.m */; }; D1A3079F1548F71C00FA4A94 /* WebserviceCommunicator.m in Sources */ = {isa = PBXBuildFile; fileRef = D1A3079E1548F71C00FA4A94 /* WebserviceCommunicator.m */; }; D3531C9C1523B7BB00E286B8 /* SimpleEditor.m in Sources */ = {isa = PBXBuildFile; fileRef = D3531C9B1523B7BB00E286B8 /* SimpleEditor.m */; }; @@ -69,6 +70,7 @@ D115C72E1559A00A008BEA8D /* mix icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mix icon.png"; sourceTree = ""; }; D115C72F1559A00A008BEA8D /* toolbar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = toolbar.png; sourceTree = ""; }; D115C7301559A00A008BEA8D /* video icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "video icon.png"; sourceTree = ""; }; + D14D0E341559C51400DC6034 /* noisy tile.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "noisy tile.png"; sourceTree = ""; }; D19C74751547289A006E4122 /* AssetsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AssetsViewController.h; path = Classes/AssetsViewController.h; sourceTree = ""; }; D19C74761547289A006E4122 /* AssetsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AssetsViewController.m; path = Classes/AssetsViewController.m; sourceTree = ""; }; D1A3079D1548F71C00FA4A94 /* WebserviceCommunicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebserviceCommunicator.h; path = Classes/WebserviceCommunicator.h; sourceTree = ""; }; @@ -156,6 +158,7 @@ D115C72B1559A00A008BEA8D /* interface */ = { isa = PBXGroup; children = ( + D14D0E341559C51400DC6034 /* noisy tile.png */, D115C72C1559A00A008BEA8D /* audio icon.png */, D115C72D1559A00A008BEA8D /* export button.png */, D115C72E1559A00A008BEA8D /* mix icon.png */, @@ -377,6 +380,7 @@ D115C7331559A00A008BEA8D /* mix icon.png in Resources */, D115C7341559A00A008BEA8D /* toolbar.png in Resources */, D115C7351559A00A008BEA8D /* video icon.png in Resources */, + D14D0E351559C51400DC6034 /* noisy tile.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Video Tuneup/Classes/AssetsViewController.m b/Video Tuneup/Classes/AssetsViewController.m index 44fb565..fa55089 100644 --- a/Video Tuneup/Classes/AssetsViewController.m +++ b/Video Tuneup/Classes/AssetsViewController.m @@ -185,6 +185,7 @@ NSLog(@"AssetURL %@", [assetURLs valueForKey:assetURLKey]); [_viewController loadAssetFromFile:[assetURLs valueForKey:assetURLKey]]; [[_viewController mediaLibraryPopover] dismissPopoverAnimated:YES]; // Dismiss the popover view + [_viewController toggleHelpView]; // remove the default help view if it's there. } } diff --git a/Video Tuneup/ViewController.h b/Video Tuneup/ViewController.h index 2a6b09e..4568955 100644 --- a/Video Tuneup/ViewController.h +++ b/Video Tuneup/ViewController.h @@ -25,6 +25,7 @@ id mTimeObserver; } +@property (nonatomic, retain) IBOutlet UIView *defaultHelpView; @property (nonatomic, retain) AVPlayer *player; @property (nonatomic, retain) SimpleEditor *editor; @property (retain) AVPlayerItem *playerItem; @@ -43,6 +44,7 @@ @property (nonatomic, retain) IBOutlet UIButton *internetRequestButton; +- (void)toggleHelpView; - (void)hideCameraRollText; - (IBAction)loadDefaultAssetFromFile:sender; - (IBAction)loadAssetFromFile:(NSURL *)fileURL; diff --git a/Video Tuneup/ViewController.m b/Video Tuneup/ViewController.m index 1e6f981..41925b9 100644 --- a/Video Tuneup/ViewController.m +++ b/Video Tuneup/ViewController.m @@ -20,7 +20,7 @@ static const NSString *ItemStatusContext; @implementation ViewController @synthesize player, playerItem, playerView, playButton, pauseButton, rewindButton, editor, videoNavBar, exportStatus, -mScrubber, mediaLibraryButton, mediaLibraryPopover, exportButton; +mScrubber, mediaLibraryButton, mediaLibraryPopover, exportButton, defaultHelpView; @synthesize internetRequestButton; @@ -497,6 +497,8 @@ mScrubber, mediaLibraryButton, mediaLibraryPopover, exportButton; [super viewDidLoad]; self.view.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"hixs_pattern_evolution.png"]]; + + [defaultHelpView setBackgroundColor:[[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"noisy tile.png"]]]; NSLog(@"viewDidLoad"); @@ -551,4 +553,17 @@ mScrubber, mediaLibraryButton, mediaLibraryPopover, exportButton; } } +- (void)toggleHelpView { + if (! [defaultHelpView isHidden]) { + [playerView setHidden:NO]; + [videoNavBar setHidden:NO]; + [defaultHelpView setHidden:YES]; + } + else { + [defaultHelpView setHidden:NO]; + [playerView setHidden:YES]; + [videoNavBar setHidden:YES]; + } +} + @end diff --git a/Video Tuneup/en.lproj/ViewController_iPad.xib b/Video Tuneup/en.lproj/ViewController_iPad.xib index b816a00..4c8f2b1 100644 --- a/Video Tuneup/en.lproj/ViewController_iPad.xib +++ b/Video Tuneup/en.lproj/ViewController_iPad.xib @@ -42,11 +42,11 @@ - 279 + -2147483369 {{0, 129}, {1024, 575}} - + 1 MCAwIDAAA @@ -58,7 +58,7 @@ - 266 + -2147483382 @@ -117,6 +117,100 @@ + + + 274 + + + + 292 + {{20, 149}, {984, 89}} + + + + + 3 + MCAwAA + + NO + YES + 7 + NO + IBIPadFramework + No video selected + + 1 + MC4zODQzODcwNDY4IDAuNDk3MDQ0OTk0MiAwLjY0MTMwNDM0NzggMC42NQA + + + + 3 + MQA + + {0, 1} + 1 + 10 + 1 + + 2 + 60 + + + Helvetica-Bold + 60 + 16 + + + + + 292 + {{399, 255}, {226, 170}} + + + + + NO + YES + 7 + NO + IBIPadFramework + SG93IGl0IHdvcmtzOgogICAxLiBQaWNrIGEgdmlkZW8KICAgMi4gUGljayBhIHNvbmcKICAgMy4gTWl4 +CiAgIDQuIEV4cG9ydA + + 1 + MC40MTMwNTU2Nzc5IDAuNDcyODM1MjM2NyAwLjY1MjE3MzkxMyAwLjcAA + + + + {0, 1} + 1 + 10 + 5 + + 1 + 26 + + + Helvetica + 26 + 16 + + + + {{0, 129}, {1024, 620}} + + + + + 3 + MC42NjY2NjY2NjY3AA + + NO + + + + IBIPadFramework + 271 @@ -171,10 +265,7 @@ IBIPadFramework 0 0 - - 3 - MQA - + 1 MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA @@ -437,6 +528,14 @@ 42 + + + defaultHelpView + + + + 88 + loadDefaultAssetFromFile: @@ -578,6 +677,7 @@ + @@ -683,6 +783,25 @@ + + 83 + + + + + + + + + 86 + + + + + 87 + + + @@ -710,12 +829,15 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 80 + 88 @@ -785,6 +907,7 @@ + UIView UIButton UILabel UIButton @@ -797,6 +920,10 @@ UIToolbar + + defaultHelpView + UIView + exportButton UIButton diff --git a/Video Tuneup/interface/noisy tile.png b/Video Tuneup/interface/noisy tile.png new file mode 100644 index 0000000..d45db0a Binary files /dev/null and b/Video Tuneup/interface/noisy tile.png differ -- cgit v1.2.3