Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions iOS/Example/App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>10.8.0</string>
<string>11.2.0</string>
<key>CFBundleVersion</key>
<string>3035</string>
<string>3963</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMicrophoneUsageDescription</key>
Expand Down
17 changes: 11 additions & 6 deletions iOS/Example/Login/TRTCLoginRootView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class TRTCLoginRootView: UIView {
lazy var titleLabel: UILabel = {
let label = UILabel(frame: .zero)
label.font = UIFont.systemFont(ofSize: 32)
label.textColor = UIColor(hex: "333333") ?? .black
label.textColor = UIColor.tui_color(withHex: "333333") ?? .black
label.text = .titleText
label.numberOfLines = 2
label.adjustsFontSizeToFitWidth = true
Expand Down Expand Up @@ -58,9 +58,9 @@ class TRTCLoginRootView: UIView {
btn.setTitleColor(.white, for: .normal)
btn.setTitle(.loginText, for: .normal)
btn.adjustsImageWhenHighlighted = false
btn.setBackgroundImage(UIColor(hex: "006EFF")?.trans2Image(), for: .normal)
btn.setBackgroundImage(UIColor.tui_color(withHex: "006EFF").trans2Image(), for: .normal)
btn.titleLabel?.font = UIFont(name: "PingFangSC-Medium", size: 18)
btn.layer.shadowColor = UIColor(hex: "006EFF")?.cgColor ?? UIColor.blue.cgColor
btn.layer.shadowColor = UIColor.tui_color(withHex: "006EFF").cgColor
btn.layer.shadowOffset = CGSize(width: 0, height: 6)
btn.layer.shadowRadius = 16
btn.layer.shadowOpacity = 0.4
Expand All @@ -71,16 +71,21 @@ class TRTCLoginRootView: UIView {

private func createSpacingLine() -> UIView {
let view = UIView(frame: .zero)
view.backgroundColor = UIColor(hex: "EEEEEE")
view.backgroundColor = UIColor.tui_color(withHex: "EEEEEE")
return view
}

private func createTextField(_ placeholder: String) -> UITextField {
let textField = UITextField(frame: .zero)
textField.backgroundColor = .white
textField.font = UIFont(name: "PingFangSC-Regular", size: 16)
textField.textColor = UIColor(hex: "333333")
textField.attributedPlaceholder = NSAttributedString(string: placeholder, attributes: [NSAttributedString.Key.font : UIFont(name: "PingFangSC-Regular", size: 16) ?? UIFont.systemFont(ofSize: 16), NSAttributedString.Key.foregroundColor : UIColor(hex: "BBBBBB") ?? .gray])
textField.textColor = UIColor.tui_color(withHex: "333333")
textField.attributedPlaceholder = NSAttributedString(string: placeholder,
attributes:
[NSAttributedString.Key.font :
UIFont(name: "PingFangSC-Regular", size: 16) ?? UIFont.systemFont(ofSize: 16),
NSAttributedString.Key.foregroundColor :
UIColor.tui_color(withHex: "BBBBBB"),])
textField.delegate = self
return textField
}
Expand Down
3 changes: 1 addition & 2 deletions iOS/Example/Login/TRTCLoginViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//

import Foundation
import Toast_Swift
import WebKit
import TUICore

Expand All @@ -23,7 +22,7 @@ class TRTCLoginViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
navigationController?.navigationBar.barTintColor = .white
ToastManager.shared.position = .center
TUICSToastManager.setDefaultPosition(TUICSToastPositionBottom)
view.addSubview(loading)
loading.snp.makeConstraints { (make) in
make.width.height.equalTo(40)
Expand Down
20 changes: 12 additions & 8 deletions iOS/Example/Login/TRTCRegisterRootView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//

import UIKit
import Kingfisher

class TRTCRegisterRootView: UIView {

Expand Down Expand Up @@ -43,9 +42,9 @@ class TRTCRegisterRootView: UIView {
btn.setTitleColor(.white, for: .normal)
btn.setTitle(.registText, for: .normal)
btn.adjustsImageWhenHighlighted = false
btn.setBackgroundImage(UIColor(hex: "006EFF")?.trans2Image(), for: .normal)
btn.setBackgroundImage(UIColor.tui_color(withHex: "006EFF").trans2Image(), for: .normal)
btn.titleLabel?.font = UIFont(name: "PingFangSC-Medium", size: 18)
btn.layer.shadowColor = UIColor(hex: "006EFF")?.cgColor ?? UIColor.blue.cgColor
btn.layer.shadowColor = UIColor.tui_color(withHex: "006EFF").cgColor
btn.layer.shadowOffset = CGSize(width: 0, height: 6)
btn.layer.shadowRadius = 16
btn.layer.shadowOpacity = 0.4
Expand All @@ -58,15 +57,20 @@ class TRTCRegisterRootView: UIView {
let textField = UITextField(frame: .zero)
textField.backgroundColor = .white
textField.font = UIFont(name: "PingFangSC-Regular", size: 16)
textField.textColor = UIColor(hex: "333333")
textField.attributedPlaceholder = NSAttributedString(string: placeholder, attributes: [NSAttributedString.Key.font : UIFont(name: "PingFangSC-Regular", size: 16) ?? UIFont.systemFont(ofSize: 16), NSAttributedString.Key.foregroundColor : UIColor(hex: "BBBBBB") ?? .gray])
textField.textColor = UIColor.tui_color(withHex: "333333")
textField.attributedPlaceholder = NSAttributedString(string: placeholder,
attributes: [NSAttributedString.Key.font:
UIFont(name: "PingFangSC-Regular", size: 16) ??
UIFont.systemFont(ofSize: 16),
NSAttributedString.Key.foregroundColor :
UIColor.tui_color(withHex: "BBBBBB"),])
textField.delegate = self
return textField
}

private func createSpacingLine() -> UIView {
let view = UIView(frame: .zero)
view.backgroundColor = UIColor(hex: "EEEEEE")
view.backgroundColor = UIColor.tui_color(withHex: "EEEEEE")
return view
}

Expand Down Expand Up @@ -130,11 +134,11 @@ class TRTCRegisterRootView: UIView {
bindInteraction()

if let url = ProfileManager.shared.curUserModel?.avatar, url.count > 0 {
headImageView.kf.setImage(with: URL(string: url))
headImageView.sd_setImage(with: URL(string: url))
} else {
let url = "https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar1.png"
ProfileManager.shared.curUserModel?.avatar = url
headImageView.kf.setImage(with: URL(string: url))
headImageView.sd_setImage(with: URL(string: url))
}
}

Expand Down
9 changes: 6 additions & 3 deletions iOS/Example/Login/TRTCRegisterViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
//

import Foundation
import Toast_Swift
import TXAppBasic
import SnapKit
import UIKit
import ImSDK_Plus
import TUICore

class TRTCRegisterViewController: UIViewController {

Expand All @@ -20,8 +20,7 @@ class TRTCRegisterViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()

ToastManager.shared.position = .center
TUICSToastManager.setDefaultPosition(TUICSToastPositionBottom)
title = .titleText
view.addSubview(loading)
loading.snp.makeConstraints { (make) in
Expand All @@ -35,6 +34,10 @@ class TRTCRegisterViewController: UIViewController {
ProfileManager.shared.synchronizUserInfo()
ProfileManager.shared.setNickName(name: nickName) { [weak self] in
guard let `self` = self else { return }
let selector = NSSelectorFromString("getSelfUserInfo")
if TUILogin.responds(to: selector) {
TUILogin.perform(selector)
}
self.registSuccess()
} failed: { (err) in
self.loading.stopAnimating()
Expand Down
3 changes: 3 additions & 0 deletions iOS/Example/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
end
end
end
Loading