aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Jordan2012-03-28 13:30:16 -0400
committerBrian Jordan2012-03-28 13:30:16 -0400
commitec944d9869a74f11f565d8aacc4d822cd8e7a8fd (patch)
tree730b29f2803c068671d9567cf0273b70564435cf
parent6276c3004552d250d0fc22df975b9c29ea1f6884 (diff)
downloadVideo-Tuneup-ec944d9869a74f11f565d8aacc4d822cd8e7a8fd.tar.bz2
add open song button. Closes #5
-rw-r--r--Video Tuneup.xcodeproj/project.pbxproj6
-rw-r--r--Video Tuneup/ViewController.h2
-rw-r--r--Video Tuneup/ViewController.m6
-rw-r--r--Video Tuneup/en.lproj/ViewController_iPad.xib147
4 files changed, 118 insertions, 43 deletions
diff --git a/Video Tuneup.xcodeproj/project.pbxproj b/Video Tuneup.xcodeproj/project.pbxproj
index 19d8695..decab7a 100644
--- a/Video Tuneup.xcodeproj/project.pbxproj
+++ b/Video Tuneup.xcodeproj/project.pbxproj
@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
+ D3531C94152380D800E286B8 /* song.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = D3531C93152380D800E286B8 /* song.mp3 */; };
D36CCD3615227D06003CCAFC /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36CCD3515227D06003CCAFC /* UIKit.framework */; };
D36CCD3815227D06003CCAFC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36CCD3715227D06003CCAFC /* Foundation.framework */; };
D36CCD3A15227D06003CCAFC /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36CCD3915227D06003CCAFC /* CoreGraphics.framework */; };
@@ -38,6 +39,7 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
+ D3531C93152380D800E286B8 /* song.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = song.mp3; path = ../../../../code_others/python/remix/examples/music/song.mp3; sourceTree = "<group>"; };
D36CCD3115227D05003CCAFC /* Video Tuneup.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Video Tuneup.app"; sourceTree = BUILT_PRODUCTS_DIR; };
D36CCD3515227D06003CCAFC /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
D36CCD3715227D06003CCAFC /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -171,6 +173,7 @@
D36CCD6F1522893F003CCAFC /* Resources */ = {
isa = PBXGroup;
children = (
+ D3531C93152380D800E286B8 /* song.mp3 */,
D36CCD7015228952003CCAFC /* airplane.m4v */,
);
name = Resources;
@@ -268,6 +271,7 @@
D36CCD4C15227D06003CCAFC /* ViewController_iPhone.xib in Resources */,
D36CCD4F15227D06003CCAFC /* ViewController_iPad.xib in Resources */,
D36CCD7115228952003CCAFC /* airplane.m4v in Resources */,
+ D3531C94152380D800E286B8 /* song.mp3 in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -485,6 +489,7 @@
D36CCD6915227D06003CCAFC /* Release */,
);
defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
};
D36CCD6A15227D06003CCAFC /* Build configuration list for PBXNativeTarget "Video TuneupTests" */ = {
isa = XCConfigurationList;
@@ -493,6 +498,7 @@
D36CCD6C15227D06003CCAFC /* Release */,
);
defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
diff --git a/Video Tuneup/ViewController.h b/Video Tuneup/ViewController.h
index 247e770..9ad27d8 100644
--- a/Video Tuneup/ViewController.h
+++ b/Video Tuneup/ViewController.h
@@ -19,8 +19,10 @@
@property (nonatomic, retain) IBOutlet PlayerView *playerView;
@property (nonatomic, retain) IBOutlet UIButton *playButton;
@property (nonatomic, retain) IBOutlet UIButton *pauseButton;
+@property (nonatomic, retain) IBOutlet UIButton *rewindButton;
- (IBAction)loadAssetFromFile:sender;
+- (IBAction)loadAudioFromFile:sender;
- (IBAction)play:sender;
- (IBAction)pause:sender;
- (IBAction)rewind:sender;
diff --git a/Video Tuneup/ViewController.m b/Video Tuneup/ViewController.m
index b88a8f8..bd2a3b5 100644
--- a/Video Tuneup/ViewController.m
+++ b/Video Tuneup/ViewController.m
@@ -14,7 +14,7 @@ static const NSString *ItemStatusContext;
@implementation ViewController
-@synthesize player, playerItem, playerView, playButton, pauseButton;
+@synthesize player, playerItem, playerView, playButton, pauseButton, rewindButton;
#pragma mark - Video playback
@@ -78,6 +78,10 @@ static const NSString *ItemStatusContext;
}];
}
+- (IBAction)loadAudioFromFile:(id)sender {
+ NSLog(@"Loading audio from file");
+}
+
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object
change:(NSDictionary *)change context:(void *)context {
diff --git a/Video Tuneup/en.lproj/ViewController_iPad.xib b/Video Tuneup/en.lproj/ViewController_iPad.xib
index 897fb98..4617cb0 100644
--- a/Video Tuneup/en.lproj/ViewController_iPad.xib
+++ b/Video Tuneup/en.lproj/ViewController_iPad.xib
@@ -38,10 +38,10 @@
<object class="IBUIButton" id="1049445720">
<reference key="NSNextResponder" ref="766721923"/>
<int key="NSvFlags">319</int>
- <string key="NSFrame">{{172, 191}, {403, 84}}</string>
+ <string key="NSFrame">{{172, 191}, {194, 84}}</string>
<reference key="NSSuperview" ref="766721923"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="958752162"/>
+ <reference key="NSNextKeyView" ref="761978491"/>
<string key="NSReuseIdentifierKey">_NS:241</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@@ -49,7 +49,7 @@
<int key="IBUIContentVerticalAlignment">0</int>
<int key="IBUIButtonType">1</int>
<string key="IBUINormalTitle">Open Movie</string>
- <object class="NSColor" key="IBUIHighlightedTitleColor" id="950055607">
+ <object class="NSColor" key="IBUIHighlightedTitleColor" id="804940373">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
@@ -57,27 +57,49 @@
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
</object>
- <object class="NSColor" key="IBUINormalTitleShadowColor" id="484429581">
+ <object class="NSColor" key="IBUINormalTitleShadowColor" id="752673392">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC41AA</bytes>
</object>
- <object class="IBUIFontDescription" key="IBUIFontDescription" id="245349657">
+ <object class="IBUIFontDescription" key="IBUIFontDescription" id="165390451">
<int key="type">2</int>
<double key="pointSize">15</double>
</object>
- <object class="NSFont" key="IBUIFont" id="1064047706">
+ <object class="NSFont" key="IBUIFont" id="564959921">
<string key="NSName">Helvetica-Bold</string>
<double key="NSSize">15</double>
<int key="NSfFlags">16</int>
</object>
</object>
+ <object class="IBUIButton" id="761978491">
+ <reference key="NSNextResponder" ref="766721923"/>
+ <int key="NSvFlags">319</int>
+ <string key="NSFrame">{{384, 191}, {194, 84}}</string>
+ <reference key="NSSuperview" ref="766721923"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="380079406"/>
+ <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">Open Song</string>
+ <reference key="IBUIHighlightedTitleColor" ref="804940373"/>
+ <object class="NSColor" key="IBUINormalTitleColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+ </object>
+ <reference key="IBUINormalTitleShadowColor" ref="752673392"/>
+ <reference key="IBUIFontDescription" ref="165390451"/>
+ <reference key="IBUIFont" ref="564959921"/>
+ </object>
<object class="IBUIView" id="1061865793">
<reference key="NSNextResponder" ref="766721923"/>
<int key="NSvFlags">319</int>
<string key="NSFrame">{{181, 369}, {384, 502}}</string>
<reference key="NSSuperview" ref="766721923"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:212</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
@@ -88,13 +110,13 @@
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
- <object class="IBUIButton" id="958752162">
+ <object class="IBUIButton" id="380079406">
<reference key="NSNextResponder" ref="766721923"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{172, 302}, {72, 37}}</string>
<reference key="NSSuperview" ref="766721923"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="540429936"/>
+ <reference key="NSNextKeyView" ref="959867271"/>
<string key="NSReuseIdentifierKey">_NS:241</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@@ -102,22 +124,22 @@
<int key="IBUIContentVerticalAlignment">0</int>
<int key="IBUIButtonType">1</int>
<string key="IBUINormalTitle">Play</string>
- <reference key="IBUIHighlightedTitleColor" ref="950055607"/>
+ <reference key="IBUIHighlightedTitleColor" ref="804940373"/>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
</object>
- <reference key="IBUINormalTitleShadowColor" ref="484429581"/>
- <reference key="IBUIFontDescription" ref="245349657"/>
- <reference key="IBUIFont" ref="1064047706"/>
+ <reference key="IBUINormalTitleShadowColor" ref="752673392"/>
+ <reference key="IBUIFontDescription" ref="165390451"/>
+ <reference key="IBUIFont" ref="564959921"/>
</object>
- <object class="IBUIButton" id="540429936">
+ <object class="IBUIButton" id="959867271">
<reference key="NSNextResponder" ref="766721923"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{337, 302}, {72, 37}}</string>
<reference key="NSSuperview" ref="766721923"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="454189542"/>
+ <reference key="NSNextKeyView" ref="913102771"/>
<string key="NSReuseIdentifierKey">_NS:241</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@@ -125,16 +147,16 @@
<int key="IBUIContentVerticalAlignment">0</int>
<int key="IBUIButtonType">1</int>
<string key="IBUINormalTitle">Pause</string>
- <reference key="IBUIHighlightedTitleColor" ref="950055607"/>
+ <reference key="IBUIHighlightedTitleColor" ref="804940373"/>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
</object>
- <reference key="IBUINormalTitleShadowColor" ref="484429581"/>
- <reference key="IBUIFontDescription" ref="245349657"/>
- <reference key="IBUIFont" ref="1064047706"/>
+ <reference key="IBUINormalTitleShadowColor" ref="752673392"/>
+ <reference key="IBUIFontDescription" ref="165390451"/>
+ <reference key="IBUIFont" ref="564959921"/>
</object>
- <object class="IBUIButton" id="454189542">
+ <object class="IBUIButton" id="913102771">
<reference key="NSNextResponder" ref="766721923"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{500, 302}, {78, 37}}</string>
@@ -148,14 +170,14 @@
<int key="IBUIContentVerticalAlignment">0</int>
<int key="IBUIButtonType">1</int>
<string key="IBUINormalTitle">Rewind</string>
- <reference key="IBUIHighlightedTitleColor" ref="950055607"/>
+ <reference key="IBUIHighlightedTitleColor" ref="804940373"/>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
</object>
- <reference key="IBUINormalTitleShadowColor" ref="484429581"/>
- <reference key="IBUIFontDescription" ref="245349657"/>
- <reference key="IBUIFont" ref="1064047706"/>
+ <reference key="IBUINormalTitleShadowColor" ref="752673392"/>
+ <reference key="IBUIFontDescription" ref="165390451"/>
+ <reference key="IBUIFont" ref="564959921"/>
</object>
</array>
<string key="NSFrame">{{0, 20}, {768, 1004}}</string>
@@ -174,11 +196,10 @@
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
- <object class="IBUIButton" id="588124301">
- <reference key="NSNextResponder"/>
+ <object class="IBUIButton" id="6672133">
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<string key="NSFrameSize">{72, 37}</string>
- <reference key="NSSuperview"/>
<string key="NSReuseIdentifierKey">_NS:241</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@@ -186,14 +207,14 @@
<int key="IBUIContentVerticalAlignment">0</int>
<int key="IBUIButtonType">1</int>
<string key="IBUINormalTitle">Play</string>
- <reference key="IBUIHighlightedTitleColor" ref="950055607"/>
+ <reference key="IBUIHighlightedTitleColor" ref="804940373"/>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
</object>
- <reference key="IBUINormalTitleShadowColor" ref="484429581"/>
- <reference key="IBUIFontDescription" ref="245349657"/>
- <reference key="IBUIFont" ref="1064047706"/>
+ <reference key="IBUINormalTitleShadowColor" ref="752673392"/>
+ <reference key="IBUIFontDescription" ref="165390451"/>
+ <reference key="IBUIFont" ref="564959921"/>
</object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
@@ -215,6 +236,22 @@
<int key="connectionID">10</int>
</object>
<object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">playButton</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="380079406"/>
+ </object>
+ <int key="connectionID">19</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">pauseButton</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="959867271"/>
+ </object>
+ <int key="connectionID">20</int>
+ </object>
+ <object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">loadAssetFromFile:</string>
<reference key="source" ref="1049445720"/>
@@ -226,7 +263,7 @@
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">play:</string>
- <reference key="source" ref="958752162"/>
+ <reference key="source" ref="380079406"/>
<reference key="destination" ref="841351856"/>
<int key="IBEventType">7</int>
</object>
@@ -235,7 +272,7 @@
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">pause:</string>
- <reference key="source" ref="540429936"/>
+ <reference key="source" ref="959867271"/>
<reference key="destination" ref="841351856"/>
<int key="IBEventType">7</int>
</object>
@@ -244,12 +281,21 @@
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">rewind:</string>
- <reference key="source" ref="454189542"/>
+ <reference key="source" ref="913102771"/>
<reference key="destination" ref="841351856"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">18</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">loadAudioFromFile:</string>
+ <reference key="source" ref="761978491"/>
+ <reference key="destination" ref="841351856"/>
+ <int key="IBEventType">7</int>
+ </object>
+ <int key="connectionID">27</int>
+ </object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
@@ -276,9 +322,10 @@
<array class="NSMutableArray" key="children">
<reference ref="1049445720"/>
<reference ref="1061865793"/>
- <reference ref="958752162"/>
- <reference ref="540429936"/>
- <reference ref="454189542"/>
+ <reference ref="380079406"/>
+ <reference ref="959867271"/>
+ <reference ref="913102771"/>
+ <reference ref="761978491"/>
</array>
<reference key="parent" ref="0"/>
</object>
@@ -294,22 +341,27 @@
</object>
<object class="IBObjectRecord">
<int key="objectID">11</int>
- <reference key="object" ref="958752162"/>
+ <reference key="object" ref="380079406"/>
<reference key="parent" ref="766721923"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">12</int>
- <reference key="object" ref="540429936"/>
+ <reference key="object" ref="959867271"/>
<reference key="parent" ref="766721923"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">13</int>
- <reference key="object" ref="588124301"/>
+ <reference key="object" ref="6672133"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">14</int>
- <reference key="object" ref="454189542"/>
+ <reference key="object" ref="913102771"/>
+ <reference key="parent" ref="766721923"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">25</int>
+ <reference key="object" ref="761978491"/>
<reference key="parent" ref="766721923"/>
</object>
</array>
@@ -324,6 +376,7 @@
<string key="13.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<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="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="7.CustomClassName">PlayerView</string>
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -332,7 +385,7 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
- <int key="maxID">18</int>
+ <int key="maxID">27</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -349,6 +402,7 @@
<string key="superclassName">UIViewController</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="loadAssetFromFile:">id</string>
+ <string key="loadAudioFromFile:">id</string>
<string key="pause:">id</string>
<string key="play:">id</string>
<string key="rewind:">id</string>
@@ -358,6 +412,10 @@
<string key="name">loadAssetFromFile:</string>
<string key="candidateClassName">id</string>
</object>
+ <object class="IBActionInfo" key="loadAudioFromFile:">
+ <string key="name">loadAudioFromFile:</string>
+ <string key="candidateClassName">id</string>
+ </object>
<object class="IBActionInfo" key="pause:">
<string key="name">pause:</string>
<string key="candidateClassName">id</string>
@@ -375,6 +433,7 @@
<string key="pauseButton">UIButton</string>
<string key="playButton">UIButton</string>
<string key="playerView">PlayerView</string>
+ <string key="rewindButton">UIButton</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="pauseButton">
@@ -389,6 +448,10 @@
<string key="name">playerView</string>
<string key="candidateClassName">PlayerView</string>
</object>
+ <object class="IBToOneOutletInfo" key="rewindButton">
+ <string key="name">rewindButton</string>
+ <string key="candidateClassName">UIButton</string>
+ </object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>