Skip to content

Commit 459358c

Browse files
committed
chore: rename Playback from Segments demo
1 parent 66854be commit 459358c

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

Example/Example.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
55A72B432E85362900AF68D1 /* PlayFromParagraphViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55A72B422E85362900AF68D1 /* PlayFromParagraphViewController.swift */; };
10+
55A72B432E85362900AF68D1 /* PlaybackFromSegmentsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55A72B422E85362900AF68D1 /* PlaybackFromSegmentsViewController.swift */; };
1111
F83AB1C32AA2165B00E7A2FE /* JVFloatLabeledText.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = F81223132A8A5627000BBBCB /* JVFloatLabeledText.xcframework */; };
1212
F83AB1C42AA2165B00E7A2FE /* JVFloatLabeledText.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F81223132A8A5627000BBBCB /* JVFloatLabeledText.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1313
F8A0E2352A56FF6400B6ACD3 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8A0E2342A56FF6400B6ACD3 /* AppDelegate.swift */; };
@@ -36,7 +36,7 @@
3636
/* End PBXCopyFilesBuildPhase section */
3737

3838
/* Begin PBXFileReference section */
39-
55A72B422E85362900AF68D1 /* PlayFromParagraphViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayFromParagraphViewController.swift; sourceTree = "<group>"; };
39+
55A72B422E85362900AF68D1 /* PlaybackFromSegmentsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaybackFromSegmentsViewController.swift; sourceTree = "<group>"; };
4040
F81223132A8A5627000BBBCB /* JVFloatLabeledText.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = JVFloatLabeledText.xcframework; sourceTree = "<group>"; };
4141
F8A0E2312A56FF6400B6ACD3 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
4242
F8A0E2342A56FF6400B6ACD3 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@@ -82,7 +82,7 @@
8282
F8A0E2332A56FF6400B6ACD3 /* Example */ = {
8383
isa = PBXGroup;
8484
children = (
85-
55A72B422E85362900AF68D1 /* PlayFromParagraphViewController.swift */,
85+
55A72B422E85362900AF68D1 /* PlaybackFromSegmentsViewController.swift */,
8686
F8A0E2342A56FF6400B6ACD3 /* AppDelegate.swift */,
8787
F8A0E2362A56FF6400B6ACD3 /* SceneDelegate.swift */,
8888
F8A0E2382A56FF6400B6ACD3 /* MainViewController.swift */,
@@ -178,7 +178,7 @@
178178
F8A0E2392A56FF6400B6ACD3 /* MainViewController.swift in Sources */,
179179
F8A0E2352A56FF6400B6ACD3 /* AppDelegate.swift in Sources */,
180180
F8A0E2372A56FF6400B6ACD3 /* SceneDelegate.swift in Sources */,
181-
55A72B432E85362900AF68D1 /* PlayFromParagraphViewController.swift in Sources */,
181+
55A72B432E85362900AF68D1 /* PlaybackFromSegmentsViewController.swift in Sources */,
182182
);
183183
runOnlyForDeploymentPostprocessing = 0;
184184
};

Example/Example/MainViewController.swift

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,16 @@ class MainViewController: UIViewController {
6363
button.translatesAutoresizingMaskIntoConstraints = false
6464
contentView.addArrangedSubview(button)
6565
button.addTarget(self, action: #selector(load), for: .touchUpInside)
66-
67-
let playFromParagraphButton = UIButton(type: .system)
68-
playFromParagraphButton.setTitle("Play from paragraph demo", for: .normal)
69-
playFromParagraphButton.setTitleColor(.black, for: .normal)
70-
playFromParagraphButton.layer.cornerRadius = 4
71-
playFromParagraphButton.layer.borderWidth = 1
72-
playFromParagraphButton.layer.borderColor = UIColor.lightGray.cgColor
73-
playFromParagraphButton.translatesAutoresizingMaskIntoConstraints = false
74-
contentView.addArrangedSubview(playFromParagraphButton)
75-
playFromParagraphButton.addTarget(self, action: #selector(goToPlayFromParagraphDemo), for: .touchUpInside)
66+
67+
let playbackFromSegmentsButton = UIButton(type: .system)
68+
playbackFromSegmentsButton.setTitle("Playback from segments demo", for: .normal)
69+
playbackFromSegmentsButton.setTitleColor(.black, for: .normal)
70+
playbackFromSegmentsButton.layer.cornerRadius = 4
71+
playbackFromSegmentsButton.layer.borderWidth = 1
72+
playbackFromSegmentsButton.layer.borderColor = UIColor.lightGray.cgColor
73+
playbackFromSegmentsButton.translatesAutoresizingMaskIntoConstraints = false
74+
contentView.addArrangedSubview(playbackFromSegmentsButton)
75+
playbackFromSegmentsButton.addTarget(self, action: #selector(goToPlaybackFromSegmentsDemo), for: .touchUpInside)
7676

7777
let playerViewContainer = UIStackView()
7878
playerViewContainer.distribution = .fill
@@ -156,12 +156,12 @@ class MainViewController: UIViewController {
156156
alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
157157
self.present(alert, animated: true, completion: nil)
158158
}
159-
160-
@objc func goToPlayFromParagraphDemo() {
161-
let playFromParagraphViewController = PlayFromParagraphViewController()
162-
playFromParagraphViewController.title = "Play from paragraph"
159+
160+
@objc func goToPlaybackFromSegmentsDemo() {
161+
let playbackFromSegmentsViewController = PlaybackFromSegmentsViewController()
162+
playbackFromSegmentsViewController.title = "Playback from segments"
163163
guard let navController = self.navigationController else { return }
164-
navController.pushViewController(playFromParagraphViewController, animated: true)
164+
navController.pushViewController(playbackFromSegmentsViewController, animated: true)
165165
}
166166

167167
@objc func load() {

Example/Example/PlayFromParagraphViewController.swift renamed to Example/Example/PlaybackFromSegmentsViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// PlayFromParagraphViewController.swift
2+
// PlaybackFromSegmentsViewController.swift
33
// Example
44
//
55
// Created by Nikola Hristov on 25.09.25.
@@ -8,7 +8,7 @@
88
import UIKit
99
import BeyondWordsPlayer
1010

11-
class PlayFromParagraphViewController: UIViewController {
11+
class PlaybackFromSegmentsViewController: UIViewController {
1212

1313
private weak var playerView: PlayerView!
1414
private weak var firstSegmentLabel: UILabel!
@@ -109,7 +109,7 @@ class PlayFromParagraphViewController: UIViewController {
109109
}
110110
}
111111

112-
extension PlayFromParagraphViewController : PlayerDelegate {
112+
extension PlaybackFromSegmentsViewController : PlayerDelegate {
113113
public func player(_ playerView: PlayerView, onEvent event: PlayerEvent, settings: PlayerSettings) {
114114
if (self.playerView !== playerView) { return }
115115

0 commit comments

Comments
 (0)