Skip to content

Commit 04cc7b5

Browse files
committed
Make ViewController Customizable
1 parent 57f5265 commit 04cc7b5

7 files changed

Lines changed: 24 additions & 3 deletions

File tree

JDAVKit/JDVideoKit/JDPresentingViewController.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,20 @@ public class JDPresentingViewController:UIViewController
5151
@IBOutlet weak var BoomButton: UIButton!
5252
@IBOutlet weak var RecerseButton: UIButton!
5353
@IBOutlet weak var BoomProgressView: UIProgressView!
54+
@IBOutlet weak var TopTitleLabel: UILabel!
55+
@IBOutlet weak var SaveButton: UIButton!
56+
@IBOutlet weak var DismissButton: UIButton!
5457
//
5558
var timeLineView:UIView = UIView()
5659
var LeadingConstraint:NSLayoutConstraint!
5760
var indicatorView:UIActivityIndicatorView?
61+
//UI Setting
62+
var topTitle:String = "Share"
63+
var CloseIconColor:UIColor = UIColor.white
64+
var saveButtonTitle:String = "Save"
65+
var savaButtonColor:UIColor = UIColor.white
66+
67+
5868

5969
func videoHasBeenChoose(url:URL)
6070
{
@@ -125,6 +135,10 @@ public class JDPresentingViewController:UIViewController
125135

126136
override public func viewDidLoad()
127137
{
138+
TopTitleLabel.text = topTitle
139+
SaveButton.setTitle(saveButtonTitle, for: .normal)
140+
SaveButton.setTitleColor(savaButtonColor, for: .normal)
141+
//
128142
assetitem.addObserver(self,
129143
forKeyPath: #keyPath(AVPlayerItem.status),
130144
options: [.old, .new],

JDAVKit/JDVideoKit/JDProcessingViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public class JDProcessingViewController:UIViewController
4242
//
4343
public var enableFlashLight:Bool = true
4444
public var FlashLightIconColor:UIColor = UIColor.black
45-
public var SwitchIconColor:UIColor = UIColor.black
46-
public var CaptureIconColor:UIColor = UIColor.black
45+
public var SwitchIconColor:UIColor = UIColor.white
46+
public var CaptureIconColor:UIColor = UIColor.white
4747
public var allowChooseFromLibrary:Bool = true
4848
public var BackgroundViewBarColor:UIColor?
4949
//

JDAVKit/JDVideoKit/Xib/JDPresentingViewController.xib

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@
1515
<connections>
1616
<outlet property="BoomButton" destination="4Zf-eN-3sV" id="nxc-ff-bgX"/>
1717
<outlet property="BoomProgressView" destination="1jk-0P-uvj" id="0YS-rP-xi3"/>
18+
<outlet property="DismissButton" destination="8fq-jF-ya9" id="rnr-YD-5py"/>
1819
<outlet property="PlayerViewContainer" destination="29g-BQ-91L" id="Sg9-z4-u3c"/>
1920
<outlet property="RecerseButton" destination="EGU-T8-m4E" id="o9c-Fl-Nke"/>
21+
<outlet property="SaveButton" destination="6jf-Fv-rnN" id="3nQ-rb-RHT"/>
2022
<outlet property="SpeedUpButton" destination="HB6-JS-LO8" id="Mxs-JP-uVD"/>
23+
<outlet property="TopTitleLabel" destination="vg9-lO-uk2" id="vRn-ag-nE6"/>
2124
<outlet property="trimViewContainer" destination="KoV-0C-0mQ" id="D0C-z2-anf"/>
2225
<outlet property="view" destination="iN0-l3-epB" id="aIv-BP-shp"/>
2326
</connections>

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
# Introduction
1111

12+
13+
1214
# USAGE
1315

1416
### 1.[Use My Two Layout](#use-my-two-layout)
@@ -171,4 +173,6 @@ extension ViewController:JDVideoKitDelegate
171173

172174
```
173175

174-
##
176+
---
177+
178+
### ProcessingViewController

Readme_img/presentingVC.png

195 KB
Loading

Readme_img/processingVC.png

1.83 MB
Loading

0 commit comments

Comments
 (0)