Skip to content

Commit

Permalink
Merge pull request #93 from mobileplayer/fix/default-elements
Browse files Browse the repository at this point in the history
[PlayerControls] Fix default bar elements
  • Loading branch information
isair committed Nov 25, 2015
2 parents f70cc2b + 528f6db commit 4a224d6
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 215 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
language: objective-c
osx_image: xcode7.1

script: xctool -workspace MobilePlayer.xcworkspace -scheme MobilePlayer build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
55 changes: 0 additions & 55 deletions MobilePlayer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
C361643D1B6725C2000CE00E /* Hulu.json in Resources */ = {isa = PBXBuildFile; fileRef = C361643C1B6725C2000CE00E /* Hulu.json */; };
C36164411B673D04000CE00E /* Netflix.json in Resources */ = {isa = PBXBuildFile; fileRef = C36164401B673D04000CE00E /* Netflix.json */; };
C38833C91B266C2500918C94 /* Skin.json in Resources */ = {isa = PBXBuildFile; fileRef = C38833C81B266C2500918C94 /* Skin.json */; };
C38BEEA61B72DBD1009E4F64 /* PlayerStateTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C38BEEA51B72DBD1009E4F64 /* PlayerStateTest.swift */; };
C38FA6511B33279600BE17E8 /* ADBannerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C38FA6501B33279600BE17E8 /* ADBannerViewController.swift */; };
C38FA6531B33530C00BE17E8 /* PreRollViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C38FA6521B33530C00BE17E8 /* PreRollViewController.swift */; };
C39C749F1B75400700E6CD21 /* KIF.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C39C749E1B75400700E6CD21 /* KIF.framework */; };
Expand Down Expand Up @@ -176,7 +175,6 @@
C361643C1B6725C2000CE00E /* Hulu.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Hulu.json; sourceTree = "<group>"; };
C36164401B673D04000CE00E /* Netflix.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Netflix.json; sourceTree = "<group>"; };
C38833C81B266C2500918C94 /* Skin.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Skin.json; sourceTree = "<group>"; };
C38BEEA51B72DBD1009E4F64 /* PlayerStateTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PlayerStateTest.swift; sourceTree = "<group>"; };
C38FA6501B33279600BE17E8 /* ADBannerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ADBannerViewController.swift; sourceTree = "<group>"; };
C38FA6521B33530C00BE17E8 /* PreRollViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PreRollViewController.swift; sourceTree = "<group>"; };
C39C749E1B75400700E6CD21 /* KIF.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = KIF.framework; path = "Pods/../build/Debug-iphoneos/KIF.framework"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -431,7 +429,6 @@
children = (
C3A406AC1B27A8DE00D1833D /* YoutubeTests.swift */,
C35497A21B70007500FDDBFF /* SkinTests.swift */,
C38BEEA51B72DBD1009E4F64 /* PlayerStateTest.swift */,
CE554D5F1AFE6CCD00DAC7E9 /* Supporting Files */,
);
path = MobilePlayerTests;
Expand Down Expand Up @@ -544,12 +541,9 @@
isa = PBXNativeTarget;
buildConfigurationList = CE554D681AFE6CCD00DAC7E9 /* Build configuration list for PBXNativeTarget "MobilePlayerTests" */;
buildPhases = (
39BE5A6F582542962733FA2B /* Check Pods Manifest.lock */,
CE554D561AFE6CCD00DAC7E9 /* Sources */,
CE554D571AFE6CCD00DAC7E9 /* Frameworks */,
CE554D581AFE6CCD00DAC7E9 /* Resources */,
F40C37578BF721D3E7447872 /* Embed Pods Frameworks */,
34FBA218D2E9EFA476A8CB14 /* Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -668,54 +662,6 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
34FBA218D2E9EFA476A8CB14 /* Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-MobilePlayerTests/Pods-MobilePlayerTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
39BE5A6F582542962733FA2B /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
F40C37578BF721D3E7447872 /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-MobilePlayerTests/Pods-MobilePlayerTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
C3A9AED51B048B5600D0C842 /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down Expand Up @@ -774,7 +720,6 @@
files = (
C3A406B01B27AA9500D1833D /* UIColor+Hex.swift in Sources */,
C35497A31B70007500FDDBFF /* SkinTests.swift in Sources */,
C38BEEA61B72DBD1009E4F64 /* PlayerStateTest.swift in Sources */,
C3A406AD1B27A8DE00D1833D /* YoutubeTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
10 changes: 0 additions & 10 deletions MobilePlayer.xcworkspace/contents.xcworkspacedata

This file was deleted.

4 changes: 3 additions & 1 deletion MobilePlayer/Extensions/UIImage+CocoaPods.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import UIKit
extension UIImage {

convenience init?(podResourceNamed name: String) {
let bundleUrl = NSBundle(forClass: MobilePlayerViewController.self).URLForResource("MobilePlayer", withExtension: "bundle")!
let bundleUrl =
NSBundle(forClass: MobilePlayerViewController.self).URLForResource("MobilePlayer", withExtension: "bundle") ??
NSBundle(forClass: MobilePlayerViewController.self).bundleURL
let bundle = NSBundle(URL: bundleUrl)
self.init(named: name, inBundle: bundle, compatibleWithTraitCollection:nil)
}
Expand Down
14 changes: 7 additions & 7 deletions MobilePlayer/Views/MobilePlayerControlsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ final class MobilePlayerControlsView: UIView {
addSubview(activityIndicatorView)
addSubview(overlayContainerView)
if topBar.elements.count == 0 {
topBar.addElementUsingConfig(ElementConfig(dictionary: ["type": "button", "identifier": "close"]))
topBar.addElementUsingConfig(ElementConfig(dictionary: ["type": "label", "identifier": "title"]))
topBar.addElementUsingConfig(ElementConfig(dictionary: ["type": "button", "identifier": "action"]))
topBar.addElementUsingConfig(ButtonConfig(dictionary: ["type": "button", "identifier": "close"]))
topBar.addElementUsingConfig(LabelConfig(dictionary: ["type": "label", "identifier": "title"]))
topBar.addElementUsingConfig(ButtonConfig(dictionary: ["type": "button", "identifier": "action"]))
}
addSubview(topBar)
if bottomBar.elements.count == 0 {
bottomBar.addElementUsingConfig(ElementConfig(dictionary: ["type": "toggleButton", "identifier": "play"]))
bottomBar.addElementUsingConfig(ElementConfig(dictionary: ["type": "label", "identifier": "currentTime"]))
bottomBar.addElementUsingConfig(ElementConfig(dictionary: ["type": "slider", "identifier": "playback"]))
bottomBar.addElementUsingConfig(ElementConfig(dictionary: ["type": "label", "identifier": "duration"]))
bottomBar.addElementUsingConfig(ToggleButtonConfig(dictionary: ["type": "toggleButton", "identifier": "play"]))
bottomBar.addElementUsingConfig(LabelConfig(dictionary: ["type": "label", "identifier": "currentTime"]))
bottomBar.addElementUsingConfig(SliderConfig(dictionary: ["type": "slider", "identifier": "playback"]))
bottomBar.addElementUsingConfig(LabelConfig(dictionary: ["type": "label", "identifier": "duration"]))
}
addSubview(bottomBar)
}
Expand Down
121 changes: 0 additions & 121 deletions MobilePlayerTests/PlayerStateTest.swift

This file was deleted.

7 changes: 0 additions & 7 deletions Podfile

This file was deleted.

12 changes: 0 additions & 12 deletions Podfile.lock

This file was deleted.

0 comments on commit 4a224d6

Please sign in to comment.