v1.3版本
This commit is contained in:
parent
f5c7278a92
commit
af1d9644a7
@ -1005,7 +1005,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.2;
|
MARKETING_VERSION = 1.3;
|
||||||
OTHER_CFLAGS = "";
|
OTHER_CFLAGS = "";
|
||||||
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS";
|
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.nsk.tdvideo;
|
PRODUCT_BUNDLE_IDENTIFIER = com.nsk.tdvideo;
|
||||||
@ -1057,7 +1057,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.2;
|
MARKETING_VERSION = 1.3;
|
||||||
OTHER_CFLAGS = "";
|
OTHER_CFLAGS = "";
|
||||||
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS";
|
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.nsk.tdvideo;
|
PRODUCT_BUNDLE_IDENTIFIER = com.nsk.tdvideo;
|
||||||
|
|||||||
Binary file not shown.
@ -14,8 +14,8 @@
|
|||||||
filePath = "SwiftProject/Project/Controller/CCHomeController.swift"
|
filePath = "SwiftProject/Project/Controller/CCHomeController.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "525"
|
startingLineNumber = "547"
|
||||||
endingLineNumber = "525"
|
endingLineNumber = "547"
|
||||||
landmarkName = "imagePickerController(_:didFinishPickingMediaWithInfo:)"
|
landmarkName = "imagePickerController(_:didFinishPickingMediaWithInfo:)"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -30,8 +30,8 @@
|
|||||||
filePath = "SwiftProject/Project/Controller/CCHomeController.swift"
|
filePath = "SwiftProject/Project/Controller/CCHomeController.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "517"
|
startingLineNumber = "539"
|
||||||
endingLineNumber = "517"
|
endingLineNumber = "539"
|
||||||
landmarkName = "CCHomeController"
|
landmarkName = "CCHomeController"
|
||||||
landmarkType = "21">
|
landmarkType = "21">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -94,8 +94,8 @@
|
|||||||
filePath = "SwiftProject/Project/Controller/CCHomeController.swift"
|
filePath = "SwiftProject/Project/Controller/CCHomeController.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "481"
|
startingLineNumber = "503"
|
||||||
endingLineNumber = "481"
|
endingLineNumber = "503"
|
||||||
landmarkName = "gotoVideoTransformVC(url:asset:)"
|
landmarkName = "gotoVideoTransformVC(url:asset:)"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -387,8 +387,8 @@
|
|||||||
filePath = "SwiftProject/Project/Controller/RecordingVideo/CCSpatialShootController.swift"
|
filePath = "SwiftProject/Project/Controller/RecordingVideo/CCSpatialShootController.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "1156"
|
startingLineNumber = "1166"
|
||||||
endingLineNumber = "1156"
|
endingLineNumber = "1166"
|
||||||
landmarkName = "compositeSpatialPhoto()"
|
landmarkName = "compositeSpatialPhoto()"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -649,5 +649,53 @@
|
|||||||
</Locations>
|
</Locations>
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
uuid = "A75FADE4-2597-4B33-9B75-E45F1621CEBA"
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "SwiftProject/CCKit/SKUPay/SKUPay.swift"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "182"
|
||||||
|
endingLineNumber = "182"
|
||||||
|
landmarkName = "paymentQueueRestoreCompletedTransactionsFinished(_:)"
|
||||||
|
landmarkType = "7">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
uuid = "93862009-B264-419C-BC59-393559A7F11A"
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "SwiftProject/CCKit/SKUPay/SKUPay.swift"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "149"
|
||||||
|
endingLineNumber = "149"
|
||||||
|
landmarkName = "paymentQueue(_:updatedTransactions:)"
|
||||||
|
landmarkType = "7">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
uuid = "E345D42C-5AC2-4E3C-8244-EF0708B3645F"
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "SwiftProject/Project/View/Album/CCSpaceAlbumFliterPopView/CCSpaceAlbumFilterPopView2.swift"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "458"
|
||||||
|
endingLineNumber = "458"
|
||||||
|
landmarkName = "collectionView(_:cellForItemAt:)"
|
||||||
|
landmarkType = "7">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
</Breakpoints>
|
</Breakpoints>
|
||||||
</Bucket>
|
</Bucket>
|
||||||
|
|||||||
@ -46,9 +46,13 @@ class BaseVirtualController: UIViewController {
|
|||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
NotificationCenter.default.addObserver(self, selector: #selector(userVipStateChangeNotification(noti:)), name: Notification.Name(rawValue: "kUserVipStateChangeNotification"), object: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//用户vip身份改变
|
||||||
|
@objc func userVipStateChangeNotification(noti:Notification) {
|
||||||
|
print("父类收到的vip通知...")
|
||||||
|
}
|
||||||
|
|
||||||
//=========================================
|
//=========================================
|
||||||
//设置导航栏部分
|
//设置导航栏部分
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import StoreKit
|
import StoreKit
|
||||||
|
import SVProgressHUD
|
||||||
//MARK: - 将货币信息格式化为本地信息
|
//MARK: - 将货币信息格式化为本地信息
|
||||||
extension SKProduct {
|
extension SKProduct {
|
||||||
var regularPrice: String? {
|
var regularPrice: String? {
|
||||||
@ -43,10 +43,15 @@ class SKUPay:NSObject, SKRequestDelegate,SKProductsRequestDelegate,SKPaymentTran
|
|||||||
|
|
||||||
UserDefaults.standard.setValue(arr, forKey: "kHistoryTransaction")
|
UserDefaults.standard.setValue(arr, forKey: "kHistoryTransaction")
|
||||||
UserDefaults.standard.synchronize()
|
UserDefaults.standard.synchronize()
|
||||||
|
setUpUserInfo()
|
||||||
}
|
}
|
||||||
|
|
||||||
//此处初始化用户信息
|
//此处初始化用户信息
|
||||||
func setUpUserInfo() {
|
func setUpUserInfo() {
|
||||||
|
//test ----
|
||||||
|
// UserDefaults.standard.setValue(nil, forKey: "kHistoryTransaction")
|
||||||
|
// UserDefaults.standard.synchronize()
|
||||||
|
//test+++++
|
||||||
let arr:[Any]? = UserDefaults.standard.value(forKey: "kHistoryTransaction") as? [Any] ?? nil
|
let arr:[Any]? = UserDefaults.standard.value(forKey: "kHistoryTransaction") as? [Any] ?? nil
|
||||||
guard let arr else {
|
guard let arr else {
|
||||||
return
|
return
|
||||||
@ -92,6 +97,7 @@ class SKUPay:NSObject, SKRequestDelegate,SKProductsRequestDelegate,SKPaymentTran
|
|||||||
if let pd = product {
|
if let pd = product {
|
||||||
let payment = SKPayment(product: pd)
|
let payment = SKPayment(product: pd)
|
||||||
SKPaymentQueue.default().add(payment)
|
SKPaymentQueue.default().add(payment)
|
||||||
|
showToast(value: true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -99,7 +105,17 @@ class SKUPay:NSObject, SKRequestDelegate,SKProductsRequestDelegate,SKPaymentTran
|
|||||||
//MARK: - 恢复购买
|
//MARK: - 恢复购买
|
||||||
func restoreProducts() {
|
func restoreProducts() {
|
||||||
SKPaymentQueue.default().restoreCompletedTransactions()
|
SKPaymentQueue.default().restoreCompletedTransactions()
|
||||||
|
showToast(value: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
//是否显示加载信息...
|
||||||
|
func showToast(value:Bool) {
|
||||||
|
if value {
|
||||||
|
SVProgressHUD.show(withStatus: NSLocalizedString("支付中...", comment: ""))
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
SVProgressHUD.dismiss()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -135,9 +151,14 @@ class SKUPay:NSObject, SKRequestDelegate,SKProductsRequestDelegate,SKPaymentTran
|
|||||||
self.setTransactionDic(transactions: transactions)
|
self.setTransactionDic(transactions: transactions)
|
||||||
|
|
||||||
transactions.forEach { spt in
|
transactions.forEach { spt in
|
||||||
|
if spt.transactionState == .purchased || spt.transactionState == .restored {
|
||||||
|
queue.finishTransaction(spt)
|
||||||
|
}
|
||||||
|
print("updatedTransactions ..\(spt)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print("updatedTransactions ..")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -149,30 +170,33 @@ class SKUPay:NSObject, SKRequestDelegate,SKProductsRequestDelegate,SKPaymentTran
|
|||||||
|
|
||||||
// Sent when an error is encountered while adding transactions from the user's purchase history back to the queue.
|
// Sent when an error is encountered while adding transactions from the user's purchase history back to the queue.
|
||||||
func paymentQueue(_ queue: SKPaymentQueue, restoreCompletedTransactionsFailedWithError error: Error){
|
func paymentQueue(_ queue: SKPaymentQueue, restoreCompletedTransactionsFailedWithError error: Error){
|
||||||
|
print("restoreCompletedTransactionsFailedWithError...")
|
||||||
|
showToast(value: false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Sent when all transactions from the user's purchase history have successfully been added back to the queue.
|
// Sent when all transactions from the user's purchase history have successfully been added back to the queue.
|
||||||
func paymentQueueRestoreCompletedTransactionsFinished(_ queue: SKPaymentQueue){
|
func paymentQueueRestoreCompletedTransactionsFinished(_ queue: SKPaymentQueue){
|
||||||
// queue.transactions
|
// queue.transactions
|
||||||
|
print("paymentQueueRestoreCompletedTransactionsFinished...")
|
||||||
|
showToast(value: false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sent when a user initiates an IAP buy from the App Store
|
// Sent when a user initiates an IAP buy from the App Store
|
||||||
func paymentQueue(_ queue: SKPaymentQueue, shouldAddStorePayment payment: SKPayment, for product: SKProduct) -> Bool{
|
// func paymentQueue(_ queue: SKPaymentQueue, shouldAddStorePayment payment: SKPayment, for product: SKProduct) -> Bool{
|
||||||
return true
|
// return true
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
func paymentQueueDidChangeStorefront(_ queue: SKPaymentQueue){
|
func paymentQueueDidChangeStorefront(_ queue: SKPaymentQueue){
|
||||||
|
print("paymentQueueDidChangeStorefront..")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Sent when entitlements for a user have changed and access to the specified IAPs has been revoked.
|
// Sent when entitlements for a user have changed and access to the specified IAPs has been revoked.
|
||||||
|
|
||||||
func paymentQueue(_ queue: SKPaymentQueue, didRevokeEntitlementsForProductIdentifiers productIdentifiers: [String]){
|
func paymentQueue(_ queue: SKPaymentQueue, didRevokeEntitlementsForProductIdentifiers productIdentifiers: [String]){
|
||||||
|
print("didRevokeEntitlementsForProductIdentifiers..")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,11 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
class UserInfo: NSObject {
|
class UserInfo: NSObject {
|
||||||
static let sharedInstance = UserInfo()
|
static let sharedInstance = UserInfo()
|
||||||
var paymentState:Bool = false
|
var paymentState:Bool = false {
|
||||||
|
didSet{
|
||||||
|
NotificationCenter.default.post(name: Notification.Name(rawValue: "kUserVipStateChangeNotification"), object: self, userInfo:nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
var paymentProductIdentifier:String? //表示已购买的产品id
|
var paymentProductIdentifier:String? //表示已购买的产品id
|
||||||
var isMemberShip:Bool {
|
var isMemberShip:Bool {
|
||||||
get {
|
get {
|
||||||
|
|||||||
@ -346,6 +346,17 @@ class CCHomeController: BaseController, LLCycleScrollViewDelegate,MFMailComposeV
|
|||||||
}
|
}
|
||||||
//选择视频
|
//选择视频
|
||||||
view.selectedVideoHandler = {[weak self] url,asset in
|
view.selectedVideoHandler = {[weak self] url,asset in
|
||||||
|
if (asset.duration > 60 ) {
|
||||||
|
if !UserInfo.sharedInstance.isMemberShip {
|
||||||
|
let vc:MembershipVC = MembershipVC()
|
||||||
|
let nav = UINavigationController(rootViewController: vc)
|
||||||
|
nav.modalTransitionStyle = UIModalTransitionStyle.coverVertical
|
||||||
|
nav.modalPresentationStyle = .fullScreen
|
||||||
|
self?.present(nav, animated: true)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let vc = CCSpatialVideoDisplayController()
|
let vc = CCSpatialVideoDisplayController()
|
||||||
vc.sourceVideoURL = url
|
vc.sourceVideoURL = url
|
||||||
vc.videoOriginalPHAsset = asset
|
vc.videoOriginalPHAsset = asset
|
||||||
@ -460,8 +471,19 @@ extension CCHomeController: TZImagePickerControllerDelegate,UINavigationControll
|
|||||||
gotoPhotoTransformVC(data: data, url: nil,asset: asset)
|
gotoPhotoTransformVC(data: data, url: nil,asset: asset)
|
||||||
}
|
}
|
||||||
//选择视频
|
//选择视频
|
||||||
spaceAlbumPopView.selectedVideoHandler = { [self] url,asset in
|
spaceAlbumPopView.selectedVideoHandler = { [weak self] url,asset in
|
||||||
gotoVideoTransformVC(url: url,asset: asset)
|
if (asset.duration > 60 ) {
|
||||||
|
if !UserInfo.sharedInstance.isMemberShip {
|
||||||
|
let vc:MembershipVC = MembershipVC()
|
||||||
|
let nav = UINavigationController(rootViewController: vc)
|
||||||
|
nav.modalTransitionStyle = UIModalTransitionStyle.coverVertical
|
||||||
|
nav.modalPresentationStyle = .fullScreen
|
||||||
|
self?.present(nav, animated: true)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
self?.gotoVideoTransformVC(url: url,asset: asset)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,8 @@ import Foundation
|
|||||||
import UIKit
|
import UIKit
|
||||||
class MembershipVC: BaseController {
|
class MembershipVC: BaseController {
|
||||||
var pvView:MembershipProductView?
|
var pvView:MembershipProductView?
|
||||||
|
var pcenterView:UIView?
|
||||||
|
var psubscribeBtn:UIButton?
|
||||||
var selectedItem:MemberShipModelItem?
|
var selectedItem:MemberShipModelItem?
|
||||||
lazy var mTopImgView:UIImageView = {
|
lazy var mTopImgView:UIImageView = {
|
||||||
//393*236
|
//393*236
|
||||||
@ -24,8 +26,25 @@ class MembershipVC: BaseController {
|
|||||||
self.configureData()
|
self.configureData()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//用户vip身份改变
|
||||||
|
@objc override func userVipStateChangeNotification(noti:Notification) {
|
||||||
|
print("子类收到通知收到的vip通知...")
|
||||||
|
if UserInfo.sharedInstance.isMemberShip {
|
||||||
|
if let h = pcenterView?.isHidden, h == false {
|
||||||
|
pcenterView?.snp.updateConstraints({ make in
|
||||||
|
make.height.equalTo(0)
|
||||||
|
})
|
||||||
|
pcenterView?.superview?.layoutIfNeeded()
|
||||||
|
pcenterView?.isHidden = true
|
||||||
|
rightBtn1?.isHidden = true
|
||||||
|
psubscribeBtn?.setBackgroundImage(UIImage(named: NSLocalizedString("vip_alreadybuybtn", comment: "")), for: .normal)
|
||||||
|
psubscribeBtn?.isEnabled = false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override func viewDidDisappear(_ animated: Bool) {
|
override func viewDidDisappear(_ animated: Bool) {
|
||||||
super.viewDidDisappear(animated)
|
super.viewDidDisappear(animated)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,16 +16,30 @@ extension MembershipVC {
|
|||||||
self.setLeftOneBtnImg(imgStr: "membership_close")
|
self.setLeftOneBtnImg(imgStr: "membership_close")
|
||||||
self.leftBtn1?.addTarget(self, action: #selector(dismissVC(sender: )), for: .touchUpInside)
|
self.leftBtn1?.addTarget(self, action: #selector(dismissVC(sender: )), for: .touchUpInside)
|
||||||
// self.setRightOneBtnImg(imgStr: "Icon_PopUp_Icon_Folder")
|
// self.setRightOneBtnImg(imgStr: "Icon_PopUp_Icon_Folder")
|
||||||
self.rightBtn1?.addTarget(self, action: #selector(rebuyMembership(sender: )), for: .touchUpInside)
|
// self.rightBtn1?.addTarget(self, action: #selector(rebuyMembership(sender: )), for: .touchUpInside)
|
||||||
self.setRightOneBtnTitle(string: NSLocalizedString("restorevip", comment: "") as NSString)
|
self.setRightOneBtnTitle(string: NSLocalizedString("restorevip", comment: "") as NSString)
|
||||||
self.rightBtn1?.isHidden = UserInfo.sharedInstance.isMemberShip
|
// self.rightBtn1?.isHidden = UserInfo.sharedInstance.isMemberShip
|
||||||
|
// self.rightBtn1?.isEnabled = true
|
||||||
|
|
||||||
|
rightBtn1 = UIButton.init(type: UIButton.ButtonType.custom)
|
||||||
|
rightBtn1?.isHidden = UserInfo.sharedInstance.isMemberShip
|
||||||
|
navtionBar?.addSubview(rightBtn1!)
|
||||||
|
rightBtn1?.tag = 10
|
||||||
|
rightBtn1?.isSelected = false
|
||||||
|
rightBtn1?.addTarget(self, action: #selector(rebuyMembership(sender: )), for: .touchUpInside)
|
||||||
|
rightBtn1?.setTitle(NSLocalizedString("restorevip", comment: ""), for: .normal)
|
||||||
|
rightBtn1?.frame = CGRect(x: 2, y: 10, width: 76, height: 56)
|
||||||
|
rightBtn1!.centerY = StatuBar_Height + NavBar_Height * 0.5
|
||||||
|
rightBtn1!.right = SCREEN_Width - 6
|
||||||
|
|
||||||
|
|
||||||
self.view.addSubview(mTopImgView)
|
self.view.addSubview(mTopImgView)
|
||||||
|
|
||||||
let topView = self.topView()
|
let topView = self.topView()
|
||||||
self.view.addSubview(topView)
|
self.view.addSubview(topView)
|
||||||
topView.snp.makeConstraints { make in
|
topView.snp.makeConstraints { make in
|
||||||
make.left.right.equalTo(0)
|
make.left.right.equalTo(0)
|
||||||
make.top.equalToSuperview().offset(80)
|
make.top.equalToSuperview().offset(120)
|
||||||
make.height.equalTo(254)
|
make.height.equalTo(254)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,6 +71,8 @@ extension MembershipVC {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@objc func dismissVC(sender:UIButton) {
|
@objc func dismissVC(sender:UIButton) {
|
||||||
self.dismiss(animated: true)
|
self.dismiss(animated: true)
|
||||||
|
|
||||||
@ -69,7 +85,8 @@ extension MembershipVC {
|
|||||||
|
|
||||||
//恢复购买
|
//恢复购买
|
||||||
@objc func rebuyMembership(sender:UIButton) {
|
@objc func rebuyMembership(sender:UIButton) {
|
||||||
|
print("......click 恢复购买")
|
||||||
|
SKUPay.sharedInstance.restoreProducts()
|
||||||
}
|
}
|
||||||
|
|
||||||
func topView() -> UIView {
|
func topView() -> UIView {
|
||||||
@ -161,6 +178,7 @@ extension MembershipVC {
|
|||||||
|
|
||||||
func centerView() -> UIView {
|
func centerView() -> UIView {
|
||||||
let bgView = UIView()
|
let bgView = UIView()
|
||||||
|
pcenterView = bgView
|
||||||
bgView.backgroundColor = .clear
|
bgView.backgroundColor = .clear
|
||||||
pvView = MembershipProductView(frame: .zero)
|
pvView = MembershipProductView(frame: .zero)
|
||||||
bgView.addSubview(pvView!)
|
bgView.addSubview(pvView!)
|
||||||
@ -207,6 +225,7 @@ extension MembershipVC {
|
|||||||
bgView.backgroundColor = .clear
|
bgView.backgroundColor = .clear
|
||||||
|
|
||||||
let subscribeBtn = UIButton()
|
let subscribeBtn = UIButton()
|
||||||
|
psubscribeBtn = subscribeBtn
|
||||||
bgView.addSubview(subscribeBtn)
|
bgView.addSubview(subscribeBtn)
|
||||||
subscribeBtn.addTarget(self, action: #selector(subscribeAction(sender: )), for: .touchUpInside)
|
subscribeBtn.addTarget(self, action: #selector(subscribeAction(sender: )), for: .touchUpInside)
|
||||||
subscribeBtn.titleLabel?.font = UIFont.boldSystemFont(ofSize: 16)
|
subscribeBtn.titleLabel?.font = UIFont.boldSystemFont(ofSize: 16)
|
||||||
|
|||||||
@ -565,6 +565,16 @@ class CCSpatialShootController: BaseController {
|
|||||||
}
|
}
|
||||||
//选择视频
|
//选择视频
|
||||||
spaceAlbumPopView.selectedVideoHandler = { url,asset in
|
spaceAlbumPopView.selectedVideoHandler = { url,asset in
|
||||||
|
if (asset.duration > 60 ) {
|
||||||
|
if !UserInfo.sharedInstance.isMemberShip {
|
||||||
|
let vc:MembershipVC = MembershipVC()
|
||||||
|
let nav = UINavigationController(rootViewController: vc)
|
||||||
|
nav.modalTransitionStyle = UIModalTransitionStyle.coverVertical
|
||||||
|
nav.modalPresentationStyle = .fullScreen
|
||||||
|
self.present(nav, animated: true)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
let vc = CCSpatialVideoDisplayController()
|
let vc = CCSpatialVideoDisplayController()
|
||||||
vc.sourceVideoURL = url
|
vc.sourceVideoURL = url
|
||||||
vc.videoOriginalPHAsset = asset
|
vc.videoOriginalPHAsset = asset
|
||||||
|
|||||||
@ -104,4 +104,4 @@
|
|||||||
"用户协议" = "Terms of Service";
|
"用户协议" = "Terms of Service";
|
||||||
"Membership activated" = "Membership activated";
|
"Membership activated" = "Membership activated";
|
||||||
"restorevip" = "Restore";
|
"restorevip" = "Restore";
|
||||||
|
"支付中..." = "Paying...";
|
||||||
|
|||||||
@ -104,4 +104,4 @@
|
|||||||
"用户协议" = "用户协议";
|
"用户协议" = "用户协议";
|
||||||
"Membership activated" = "Membership activated";
|
"Membership activated" = "Membership activated";
|
||||||
"restorevip" = "恢复购买";
|
"restorevip" = "恢复购买";
|
||||||
|
"支付中..." = "支付中...";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user