aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Video Tuneup/SimpleEditor.m5
-rw-r--r--Video Tuneup/ViewController.h5
-rw-r--r--Video Tuneup/ViewController.m282
-rw-r--r--Video Tuneup/en.lproj/ViewController_iPad.xib269
4 files changed, 375 insertions, 186 deletions
diff --git a/Video Tuneup/SimpleEditor.m b/Video Tuneup/SimpleEditor.m
index 25daa4f..81ee0e5 100644
--- a/Video Tuneup/SimpleEditor.m
+++ b/Video Tuneup/SimpleEditor.m
@@ -125,7 +125,7 @@
- (void)buildCompositionObjectsForPlayback:(BOOL)forPlayback
{
- AVMutableComposition *composition = [AVMutableComposition composition];
+ AVMutableComposition *composition = [[AVMutableComposition alloc]init];
AVMutableAudioMix *audioMix = nil;
CGSize videoSize = [self.video naturalSize];
@@ -153,9 +153,8 @@
#endif // TARGET_OS_EMBEDDED
AVPlayerItem *playerItem = [AVPlayerItem playerItemWithAsset:self.composition];
- playerItem.audioMix = audioMix;
+// playerItem.audioMix = audioMix;
self.playerItem = playerItem;
-
}
}
diff --git a/Video Tuneup/ViewController.h b/Video Tuneup/ViewController.h
index 3eb2eb2..99a7a1b 100644
--- a/Video Tuneup/ViewController.h
+++ b/Video Tuneup/ViewController.h
@@ -25,13 +25,16 @@
@property (nonatomic, retain) IBOutlet UIButton *playButton;
@property (nonatomic, retain) IBOutlet UIButton *pauseButton;
@property (nonatomic, retain) IBOutlet UIButton *rewindButton;
+@property (nonatomic, retain) IBOutlet UIToolbar *videoNavBar;
+@property (nonatomic, retain) IBOutlet UILabel *exportStatus;
+- (void)hideCameraRollText;
- (IBAction)loadAssetFromFile:sender;
- (IBAction)loadAudioFromFile:sender;
- (IBAction)play:sender;
- (IBAction)pause:sender;
- (IBAction)rewind:sender;
-- (IBAction)edit:sender;
+- (IBAction)exportToCameraRoll:sender;
- (void)syncUI;
- (void)exportDidFinish:(AVAssetExportSession*)session;
diff --git a/Video Tuneup/ViewController.m b/Video Tuneup/ViewController.m
index 7715baa..ba65432 100644
--- a/Video Tuneup/ViewController.m
+++ b/Video Tuneup/ViewController.m
@@ -15,15 +15,15 @@ static const NSString *ItemStatusContext;
@implementation ViewController
-@synthesize player, playerItem, playerView, playButton, pauseButton, rewindButton, editor;
+@synthesize player, playerItem, playerView, playButton, pauseButton, rewindButton, editor, videoNavBar, exportStatus;
#pragma mark - Video playback
- (void)syncUI {
NSLog(@"syncUI");
-
+
if ((player.currentItem != nil) &&
- ([player.currentItem status] == AVPlayerItemStatusReadyToPlay)) {
+ ([player.currentItem status] == AVPlayerItemStatusReadyToPlay)) {
playButton.enabled = YES;
NSLog(@"Enabling play button");
@@ -34,67 +34,85 @@ static const NSString *ItemStatusContext;
}
}
+- (void)refreshEditor {
+ // Update assets
+ if (asset)
+ self.editor.video = asset;
+ if (songAsset)
+ self.editor.song = songAsset;
+
+ // Begin export
+ [self.editor buildCompositionObjectsForPlayback:YES];
+
+ // Initialize editor's player
+ self.playerItem = self.editor.playerItem;
+ [playerItem addObserver:self forKeyPath:@"status"
+ options:0 context:&ItemStatusContext];
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(playerItemDidReachEnd:)
+ name:AVPlayerItemDidPlayToEndTimeNotification
+ object:self.playerItem];
+ self.player = [AVPlayer playerWithPlayerItem:self.playerItem];
+ [playerView setPlayer:self.player];
+
+ [self play:nil];
+}
+
- (IBAction)loadAssetFromFile:sender {
NSLog(@"Loading asset.");
NSURL *fileURL = [[NSBundle mainBundle]
URLForResource:@"sample_iPod" withExtension:@"m4v"];
- NSURL *songFileURL = [[NSBundle mainBundle]
- URLForResource:@"song" withExtension:@"mp3"];
-
asset = [AVURLAsset URLAssetWithURL:fileURL options:nil];
- songAsset = [AVURLAsset URLAssetWithURL:songFileURL options:nil];
NSLog(@"Asset duration is %f", CMTimeGetSeconds([asset duration]));
- NSLog(@"Song asset duration is %f", CMTimeGetSeconds([songAsset duration]));
NSString *tracksKey = @"tracks";
-
+
[asset loadValuesAsynchronouslyForKeys:[NSArray arrayWithObject:tracksKey] completionHandler:
- ^{
- NSLog(@"Handler block reached");
- // Completion handler block.
- dispatch_async(dispatch_get_main_queue(),
+ ^{
+ NSLog(@"Handler block reached");
+ // Completion handler block.
+ dispatch_async(dispatch_get_main_queue(),
^{
NSError *error = nil;
AVKeyValueStatus status = [asset statusOfValueForKey:tracksKey error:&error];
-
+
if (status == AVKeyValueStatusLoaded) {
- self.playerItem = [AVPlayerItem playerItemWithAsset:asset];
- [playerItem addObserver:self forKeyPath:@"status"
- options:0 context:&ItemStatusContext];
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(playerItemDidReachEnd:)
- name:AVPlayerItemDidPlayToEndTimeNotification
- object:playerItem];
- self.player = [AVPlayer playerWithPlayerItem:playerItem];
- [playerView setPlayer:player];
+ [self refreshEditor];
// File has loaded into player
NSLog(@"File loaded!");
NSLog(@"Asset duration is %f", CMTimeGetSeconds([asset duration]));
+
}
else {
// You should deal with the error appropriately.
NSLog(@"The asset's tracks were not loaded:\n%@", [error localizedDescription]);
}
});
- }];
+ }];
}
- (IBAction)loadAudioFromFile:(id)sender {
- NSLog(@"Loading audio from file [NOT YET IMPLEMENTED]");
+ NSURL *songFileURL = [[NSBundle mainBundle]
+ URLForResource:@"song" withExtension:@"mp3"];
+ songAsset = [AVURLAsset URLAssetWithURL:songFileURL options:nil];
+ NSLog(@"Song asset duration is %f", CMTimeGetSeconds([songAsset duration]));
+
+ NSLog(@"Refreshing editor");
+ [self refreshEditor];
}
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object
change:(NSDictionary *)change context:(void *)context {
-
+
if (context == &ItemStatusContext) {
// Have to dispatch to main thread queue for UI operations
dispatch_async(dispatch_get_main_queue(),
- ^{
- [self syncUI];
- });
+ ^{
+ [self syncUI];
+ });
return;
}
[super observeValueForKeyPath:keyPath ofObject:object
@@ -102,108 +120,114 @@ static const NSString *ItemStatusContext;
return;
}
-- (IBAction)play:sender {
- [player play];
+- (IBAction)play:(id)sender {
+
+ if(player.rate == 0 && (player.currentItem != nil) && ([player.currentItem status] == AVPlayerItemStatusReadyToPlay)) { // Paused
+ NSLog(@"Playing item");
+ [player play];
+ [self.videoNavBar setItems:[NSArray
+ arrayWithObjects:[self.videoNavBar.items objectAtIndex:0],
+ [self.videoNavBar.items objectAtIndex:1],
+ [self.videoNavBar.items objectAtIndex:2],
+ [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemPause target:self action:@selector(play:)],nil] animated:NO];
+
+ } else {
+ [player pause];
+ [self.videoNavBar setItems:[NSArray arrayWithObjects:[self.videoNavBar.items objectAtIndex:0],
+ [self.videoNavBar.items objectAtIndex:1],
+ [self.videoNavBar.items objectAtIndex:2],
+ [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemPlay target:self action:@selector(play:)],nil] animated:NO];
+ }
}
-- (IBAction)pause:sender {
+- (IBAction)pause:(id)sender {
NSLog(@"Pausing...");
-
+
[player pause];
}
-- (IBAction)rewind:sender {
+- (IBAction)rewind:(id)sender {
[player seekToTime:kCMTimeZero];
}
-- (IBAction)edit:sender {
+- (IBAction)exportToCameraRoll:(id)sender {
NSLog(@"Editing...");
-
- // Initialize video editor
- self.editor = [[SimpleEditor alloc] init];
- self.editor.video = asset;
- self.editor.song = songAsset;
-
- // Begin export
- [self.editor buildCompositionObjectsForPlayback:NO];
NSLog(@"Put clips in. Build.");
- AVAssetExportSession *session = [self.editor assetExportSessionWithPreset:AVAssetExportPresetHighestQuality];
+ AVAssetExportSession *session = [self.editor assetExportSessionWithPreset:AVAssetExportPresetHighestQuality];
NSLog(@"Session");
-
+
NSLog(@"begin export");
NSString *filePath = nil;
- NSUInteger count = 0;
- do {
- NSLog(@"Filepath");
- filePath = NSTemporaryDirectory();
-
- NSString *numberString = count > 0 ? [NSString stringWithFormat:@"-%i", count] : @"";
- filePath = [filePath stringByAppendingPathComponent:[NSString stringWithFormat:@"Output-%@.mov", numberString]];
- count++;
- } while([[NSFileManager defaultManager] fileExistsAtPath:filePath]);
+ NSUInteger count = 0;
+ do {
+ NSLog(@"Filepath");
+ filePath = NSTemporaryDirectory();
+
+ NSString *numberString = count > 0 ? [NSString stringWithFormat:@"-%i", count] : @"";
+ filePath = [filePath stringByAppendingPathComponent:[NSString stringWithFormat:@"Output-%@.mov", numberString]];
+ count++;
+ } while ([[NSFileManager defaultManager] fileExistsAtPath:filePath]);
NSLog(@"Setting stuff.");
-
- session.outputURL = [NSURL fileURLWithPath:filePath];
- session.outputFileType = AVFileTypeQuickTimeMovie;
-
- [session exportAsynchronouslyWithCompletionHandler:^
- {
- dispatch_async(dispatch_get_main_queue(), ^{
- NSLog(@"Finished exporting.");
- [self exportDidFinish:session];
- });
- }];
+
+ session.outputURL = [NSURL fileURLWithPath:filePath];
+ session.outputFileType = AVFileTypeQuickTimeMovie;
+
+ [session exportAsynchronouslyWithCompletionHandler:^{
+ dispatch_async(dispatch_get_main_queue(), ^{
+ NSLog(@"Finished exporting.");
+ [self exportDidFinish:session];
+ });
+ }];
}
-- (void)exportDidFinish:(AVAssetExportSession*)session
-{
+- (void)exportDidFinish:(AVAssetExportSession *)session {
NSLog(@"Finished export, attempting photo album");
-
- NSURL *outputURL = session.outputURL;
-
+ NSURL *outputURL = session.outputURL;
+
// _exporting = NO;
// NSIndexPath *exportCellIndexPath = [NSIndexPath indexPathForRow:2 inSection:kProjectSection];
// ExportCell *cell = (ExportCell*)[self.tableView cellForRowAtIndexPath:exportCellIndexPath];
// cell.progressView.progress = 1.0;
// [cell setProgressViewHidden:YES animated:YES];
// [self updateCell:cell forRowAtIndexPath:exportCellIndexPath];
-
- ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
- if ([library videoAtPathIsCompatibleWithSavedPhotosAlbum:outputURL]) {
- [library writeVideoAtPathToSavedPhotosAlbum:outputURL
- completionBlock:^(NSURL *assetURL, NSError *error){
- dispatch_async(dispatch_get_main_queue(), ^{
- if (error) {
- NSLog(@"writeVideoToAssestsLibrary failed: %@", error);
- UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:[error localizedDescription]
- message:[error localizedRecoverySuggestion]
- delegate:nil
- cancelButtonTitle:@"OK"
- otherButtonTitles:nil];
- [alertView show];
+
+ ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
+ if ([library videoAtPathIsCompatibleWithSavedPhotosAlbum:outputURL]) {
+ [library writeVideoAtPathToSavedPhotosAlbum:outputURL
+ completionBlock:^(NSURL *assetURL, NSError *error) {
+ dispatch_async(dispatch_get_main_queue(), ^{
+ if (error) {
+ NSLog(@"writeVideoToAssestsLibrary failed: %@", error);
+ UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:[error localizedDescription]
+ message:[error localizedRecoverySuggestion]
+ delegate:nil cancelButtonTitle:@"OK"
+ otherButtonTitles:nil];
+ [alertView show];
// [alertView release];
- }
- else {
+ [exportStatus setText:@"Camera Roll Export Error"];
+ }
+ else {
NSLog(@"Completed photo album add");
-// _showSavedVideoToAssestsLibrary = YES;
-// ExportCell *cell = (ExportCell*)[self.tableView cellForRowAtIndexPath:exportCellIndexPath];
-// [cell setDetailTextLabelHidden:NO animated:YES];
-// [self updateCell:cell forRowAtIndexPath:exportCellIndexPath];
-// NSArray *modes = [[[NSArray alloc] initWithObjects:NSDefaultRunLoopMode, UITrackingRunLoopMode, nil] autorelease];
-// [self performSelector:@selector(hideCameraRollText) withObject:nil afterDelay:5.0 inModes:modes];
- }
- });
-
- }];
- } else {
+
+ [exportStatus setText:@"Exported to Camera Roll"];
+ [exportStatus setBackgroundColor:[UIColor colorWithRed:0.0 green:200.0 blue:0.0 alpha:255.0]];
+
+ [self performSelector:@selector(hideCameraRollText) withObject:nil afterDelay:5.0];
+ }
+ });
+
+ }];
+ } else {
NSLog(@"Video format is not compatible with saved photos album.");
}
}
+- (void)hideCameraRollText { [exportStatus setText: @""]; [exportStatus setBackgroundColor:[UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.0]];}
+
- (void)playerItemDidReachEnd:(NSNotification *)notification {
[player seekToTime:kCMTimeZero];
}
@@ -211,80 +235,60 @@ static const NSString *ItemStatusContext;
#pragma mark - View controller boilerplate
-- (void)didReceiveMemoryWarning
-{
+- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
#pragma mark - View lifecycle
-- (void)viewDidLoad
-{
+- (void)viewDidLoad {
[super viewDidLoad];
-
+
NSLog(@"viewDidLoad");
-
+
+ // Initialize editor
+ self.editor = [[SimpleEditor alloc] init];
+
+ [self refreshEditor]; // Generate composition
+
// Sync video player controls
NSLog(@"syncUI");
[self syncUI];
-
+
// Register with the notification center after creating the player item.
[[NSNotificationCenter defaultCenter]
- addObserver:self
- selector:@selector(playerItemDidReachEnd:)
- name:AVPlayerItemDidPlayToEndTimeNotification
- object:[player currentItem]];
+ addObserver:self
+ selector:@selector(playerItemDidReachEnd:)
+ name:AVPlayerItemDidPlayToEndTimeNotification
+ object:[player currentItem]];
NSLog(@"registered");
-
- // Do any additional setup after loading the view, typically from a nib.
- // http://mobileorchard.com/easy-audio-playback-with-avaudioplayer/
-
-// NSURL *url = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/airplane.m4v", [[NSBundle mainBundle] resourcePath]]];
- // http://developer.apple.com/library/ios/#DOCUMENTATION/AudioVideo/Conceptual/AVFoundationPG/Articles/02_Playback.html#//apple_ref/doc/uid/TP40010188-CH3-SW2
-
- // Create an asset using AVURLAsset and load its tracks using loadValuesAsynchronouslyForKeys:completionHandler:.
- // When the asset has loaded its tracks, create an instance of AVPlayerItem using the asset.
- // Associate the item with an instance of AVPlayer.
- // Wait until the item’s status indicates that it’s ready to play (typically you use key-value observing to receive a notification when the status changes).
-
- // Put video in supporting files
-
- // Get URL of video
-
- // Load video into player?
}
-- (void)viewDidUnload
-{
+- (void)viewDidUnload {
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
-- (void)viewWillAppear:(BOOL)animated
-{
+- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
}
-- (void)viewDidAppear:(BOOL)animated
-{
+- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
}
-- (void)viewWillDisappear:(BOOL)animated
-{
- [super viewWillDisappear:animated];
+- (void)viewWillDisappear:(BOOL)animated {
+ [super viewWillDisappear:animated];
}
-- (void)viewDidDisappear:(BOOL)animated
-{
- [super viewDidDisappear:animated];
+- (void)viewDidDisappear:(BOOL)animated {
+ [super viewDidDisappear:animated];
}
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
-{
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
diff --git a/Video Tuneup/en.lproj/ViewController_iPad.xib b/Video Tuneup/en.lproj/ViewController_iPad.xib
index 89c22e1..69a126d 100644
--- a/Video Tuneup/en.lproj/ViewController_iPad.xib
+++ b/Video Tuneup/en.lproj/ViewController_iPad.xib
@@ -11,8 +11,12 @@
<string key="NS.object.0">933</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
- <string>IBProxyObject</string>
<string>IBUIView</string>
+ <string>IBUIBarButtonItem</string>
+ <string>IBProxyObject</string>
+ <string>IBUIToolbar</string>
+ <string>IBUILabel</string>
+ <string>IBUISlider</string>
<string>IBUIButton</string>
</array>
<array key="IBDocument.PluginDependencies">
@@ -97,31 +101,78 @@
<object class="IBUIView" id="1061865793">
<reference key="NSNextResponder" ref="766721923"/>
<int key="NSvFlags">319</int>
- <string key="NSFrame">{{174, 217}, {395, 371}}</string>
- <reference key="NSSuperview" ref="766721923"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="440536013"/>
- <string key="NSReuseIdentifierKey">_NS:212</string>
- <object class="NSColor" key="IBUIBackgroundColor">
- <int key="NSColorSpace">1</int>
- <bytes key="NSRGB">MC44MDAwMDAwMTE5IDEgMC40MDAwMDAwMDYAA</bytes>
- </object>
- <object class="IBUIAccessibilityConfiguration" key="IBUIAccessibilityConfiguration">
- <integer value="512" key="IBUIAccessibilityTraits"/>
- </object>
- <string key="targetRuntimeIdentifier">IBIPadFramework</string>
- </object>
- <object class="IBUIView" id="440536013">
- <reference key="NSNextResponder" ref="766721923"/>
- <int key="NSvFlags">319</int>
- <string key="NSFrame">{{174, 613}, {395, 371}}</string>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="IBUIToolbar" id="812339394">
+ <reference key="NSNextResponder" ref="1061865793"/>
+ <int key="NSvFlags">266</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="IBUISlider" id="119532371">
+ <reference key="NSNextResponder" ref="812339394"/>
+ <int key="NSvFlags">290</int>
+ <string key="NSFrame">{{93, 11}, {564, 23}}</string>
+ <reference key="NSSuperview" ref="812339394"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="806269495"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <float key="IBUIValue">0.5</float>
+ </object>
+ </array>
+ <string key="NSFrame">{{0, 587}, {671, 44}}</string>
+ <reference key="NSSuperview" ref="1061865793"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="119532371"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <int key="IBUIBarStyle">2</int>
+ <array class="NSMutableArray" key="IBUIItems">
+ <object class="IBUIBarButtonItem" id="249320310">
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <float key="IBUIWidth">10</float>
+ <reference key="IBUIToolbar" ref="812339394"/>
+ <int key="IBUISystemItemIdentifier">6</int>
+ </object>
+ <object class="IBUIBarButtonItem" id="1047762524">
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <reference key="IBUIToolbar" ref="812339394"/>
+ <int key="IBUISystemItemIdentifier">19</int>
+ </object>
+ <object class="IBUIBarButtonItem" id="10350645">
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <float key="IBUIWidth">10</float>
+ <reference key="IBUIToolbar" ref="812339394"/>
+ <int key="IBUISystemItemIdentifier">6</int>
+ </object>
+ <object class="IBUIBarButtonItem" id="867192594">
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <reference key="IBUIToolbar" ref="812339394"/>
+ <int key="IBUISystemItemIdentifier">17</int>
+ </object>
+ <object class="IBUIBarButtonItem" id="742710540">
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <float key="IBUIWidth">5</float>
+ <reference key="IBUIToolbar" ref="812339394"/>
+ <int key="IBUISystemItemIdentifier">6</int>
+ </object>
+ <object class="IBUIBarButtonItem" id="454914398">
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <reference key="IBUICustomView" ref="119532371"/>
+ <reference key="IBUIToolbar" ref="812339394"/>
+ </object>
+ </array>
+ </object>
+ </array>
+ <string key="NSFrame">{{36, 217}, {671, 631}}</string>
<reference key="NSSuperview" ref="766721923"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
+ <reference key="NSNextKeyView" ref="812339394"/>
<string key="NSReuseIdentifierKey">_NS:212</string>
- <object class="NSColor" key="IBUIBackgroundColor">
+ <object class="NSColor" key="IBUIBackgroundColor" id="115774744">
<int key="NSColorSpace">1</int>
- <bytes key="NSRGB">MC44MDAwMDAwMTE5IDEgMC40MDAwMDAwMDYAA</bytes>
+ <bytes key="NSRGB">MCAwIDAAA</bytes>
</object>
<object class="IBUIAccessibilityConfiguration" key="IBUIAccessibilityConfiguration">
<integer value="512" key="IBUIAccessibilityTraits"/>
@@ -174,20 +225,20 @@
<reference key="IBUIFontDescription" ref="165390451"/>
<reference key="IBUIFont" ref="564959921"/>
</object>
- <object class="IBUIButton" id="739741806">
+ <object class="IBUIButton" id="806269495">
<reference key="NSNextResponder" ref="766721923"/>
<int key="NSvFlags">301</int>
- <string key="NSFrame">{{89, 580}, {72, 37}}</string>
+ <string key="NSFrame">{{315, 877}, {113, 37}}</string>
<reference key="NSSuperview" ref="766721923"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="1061865793"/>
+ <reference key="NSNextKeyView" ref="663713330"/>
<string key="NSReuseIdentifierKey">_NS:241</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<int key="IBUIButtonType">1</int>
- <string key="IBUINormalTitle">Edit</string>
+ <string key="IBUINormalTitle">Camera Roll</string>
<reference key="IBUIHighlightedTitleColor" ref="804940373"/>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
@@ -203,7 +254,7 @@
<string key="NSFrame">{{498, 148}, {78, 37}}</string>
<reference key="NSSuperview" ref="766721923"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="739741806"/>
+ <reference key="NSNextKeyView" ref="1061865793"/>
<string key="NSReuseIdentifierKey">_NS:241</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@@ -220,6 +271,35 @@
<reference key="IBUIFontDescription" ref="165390451"/>
<reference key="IBUIFont" ref="564959921"/>
</object>
+ <object class="IBUILabel" id="663713330">
+ <reference key="NSNextResponder" ref="766721923"/>
+ <int key="NSvFlags">271</int>
+ <string key="NSFrame">{{171, 942}, {400, 48}}</string>
+ <reference key="NSSuperview" ref="766721923"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
+ <string key="NSReuseIdentifierKey">_NS:345</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">7</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <string key="IBUIText"/>
+ <reference key="IBUITextColor" ref="115774744"/>
+ <nil key="IBUIHighlightedColor"/>
+ <int key="IBUIBaselineAdjustment">1</int>
+ <float key="IBUIMinimumFontSize">23</float>
+ <int key="IBUITextAlignment">1</int>
+ <object class="IBUIFontDescription" key="IBUIFontDescription">
+ <int key="type">1</int>
+ <double key="pointSize">46</double>
+ </object>
+ <object class="NSFont" key="IBUIFont">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">46</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ </object>
</array>
<string key="NSFrame">{{0, 20}, {768, 1004}}</string>
<reference key="NSSuperview"/>
@@ -293,6 +373,22 @@
<int key="connectionID">20</int>
</object>
<object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">videoNavBar</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="812339394"/>
+ </object>
+ <int key="connectionID">42</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">exportStatus</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="663713330"/>
+ </object>
+ <int key="connectionID">44</int>
+ </object>
+ <object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">loadAssetFromFile:</string>
<reference key="source" ref="1049445720"/>
@@ -339,12 +435,28 @@
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
- <string key="label">edit:</string>
- <reference key="source" ref="739741806"/>
+ <string key="label">rewind:</string>
+ <reference key="source" ref="1047762524"/>
+ <reference key="destination" ref="841351856"/>
+ </object>
+ <int key="connectionID">48</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">exportToCameraRoll:</string>
+ <reference key="source" ref="806269495"/>
<reference key="destination" ref="841351856"/>
<int key="IBEventType">7</int>
</object>
- <int key="connectionID">31</int>
+ <int key="connectionID">39</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">play:</string>
+ <reference key="source" ref="867192594"/>
+ <reference key="destination" ref="841351856"/>
+ </object>
+ <int key="connectionID">46</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -376,8 +488,8 @@
<reference ref="959867271"/>
<reference ref="913102771"/>
<reference ref="1061865793"/>
- <reference ref="440536013"/>
- <reference ref="739741806"/>
+ <reference ref="806269495"/>
+ <reference ref="663713330"/>
</array>
<reference key="parent" ref="0"/>
</object>
@@ -389,6 +501,9 @@
<object class="IBObjectRecord">
<int key="objectID">7</int>
<reference key="object" ref="1061865793"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="812339394"/>
+ </array>
<reference key="parent" ref="766721923"/>
</object>
<object class="IBObjectRecord">
@@ -417,15 +532,66 @@
<reference key="parent" ref="766721923"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">28</int>
- <reference key="object" ref="440536013"/>
+ <int key="objectID">38</int>
+ <reference key="object" ref="806269495"/>
<reference key="parent" ref="766721923"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">29</int>
- <reference key="object" ref="739741806"/>
+ <int key="objectID">32</int>
+ <reference key="object" ref="812339394"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="742710540"/>
+ <reference ref="249320310"/>
+ <reference ref="454914398"/>
+ <reference ref="1047762524"/>
+ <reference ref="867192594"/>
+ <reference ref="10350645"/>
+ </array>
+ <reference key="parent" ref="1061865793"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">33</int>
+ <reference key="object" ref="742710540"/>
+ <reference key="parent" ref="812339394"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">34</int>
+ <reference key="object" ref="249320310"/>
+ <reference key="parent" ref="812339394"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">35</int>
+ <reference key="object" ref="454914398"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="119532371"/>
+ </array>
+ <reference key="parent" ref="812339394"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">36</int>
+ <reference key="object" ref="1047762524"/>
+ <reference key="parent" ref="812339394"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">37</int>
+ <reference key="object" ref="119532371"/>
+ <reference key="parent" ref="454914398"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">43</int>
+ <reference key="object" ref="663713330"/>
<reference key="parent" ref="766721923"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">45</int>
+ <reference key="object" ref="867192594"/>
+ <reference key="parent" ref="812339394"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">47</int>
+ <reference key="object" ref="10350645"/>
+ <reference key="parent" ref="812339394"/>
+ </object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
@@ -439,10 +605,17 @@
<string key="14.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="25.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="28.CustomClassName">PlayerView</string>
- <string key="28.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="29.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="32.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="33.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="34.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="35.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="36.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="37.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="38.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="43.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="45.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="47.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="7.CustomClassName">PlayerView</string>
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</dictionary>
@@ -450,7 +623,7 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
- <int key="maxID">31</int>
+ <int key="maxID">48</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -466,7 +639,7 @@
<string key="className">ViewController</string>
<string key="superclassName">UIViewController</string>
<dictionary class="NSMutableDictionary" key="actions">
- <string key="edit:">id</string>
+ <string key="exportToCameraRoll:">id</string>
<string key="loadAssetFromFile:">id</string>
<string key="loadAudioFromFile:">id</string>
<string key="pause:">id</string>
@@ -474,8 +647,8 @@
<string key="rewind:">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
- <object class="IBActionInfo" key="edit:">
- <string key="name">edit:</string>
+ <object class="IBActionInfo" key="exportToCameraRoll:">
+ <string key="name">exportToCameraRoll:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="loadAssetFromFile:">
@@ -500,12 +673,18 @@
</object>
</dictionary>
<dictionary class="NSMutableDictionary" key="outlets">
+ <string key="exportStatus">UILabel</string>
<string key="pauseButton">UIButton</string>
<string key="playButton">UIButton</string>
<string key="playerView">PlayerView</string>
<string key="rewindButton">UIButton</string>
+ <string key="videoNavBar">UIToolbar</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <object class="IBToOneOutletInfo" key="exportStatus">
+ <string key="name">exportStatus</string>
+ <string key="candidateClassName">UILabel</string>
+ </object>
<object class="IBToOneOutletInfo" key="pauseButton">
<string key="name">pauseButton</string>
<string key="candidateClassName">UIButton</string>
@@ -522,6 +701,10 @@
<string key="name">rewindButton</string>
<string key="candidateClassName">UIButton</string>
</object>
+ <object class="IBToOneOutletInfo" key="videoNavBar">
+ <string key="name">videoNavBar</string>
+ <string key="candidateClassName">UIToolbar</string>
+ </object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>