Commit 87dd31b4 authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

bug fix

parent 6f7db351
......@@ -28,6 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
SHUserAccountManager.shared.logCollection(with: .appStart)
IQKeyboardManager.shared.enable = true
IQKeyboardManager.shared.enableAutoToolbar = false
self.window = UIWindow(frame: UIScreen.main.bounds)
......
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "设置@2x.png",
"filename" : "矩形@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "设置@3x.png",
"filename" : "矩形@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "头像 男孩 (1)@2x.png",
"filename" : "笔记列表编辑@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "头像 男孩 (1)@3x.png",
"filename" : "笔记列表编辑@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
This diff is collapsed.
......@@ -50,8 +50,12 @@ class SHGoodsViewController: SHBaseViewController {
yearStoreBtnBgView.layer.cornerRadius = yearStoreBtnBgView.frame.size.height/2
yearStoreBtn.layer.cornerRadius = yearStoreBtn.frame.size.height/2
if SHUserAccountManager.shared.autoButtonText.length != 0 {
yearStoreBtn.setTitle(SHUserAccountManager.shared.autoButtonText, for: .normal)
}
if SHUserAccountManager.shared.threeDayText.length != 0 {
yearStoreLab.text = SHUserAccountManager.shared.threeDayText
}
let animation = CABasicAnimation.init()
animation.duration = 0.66
......
......@@ -36,9 +36,11 @@
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pga-Oe-RdW">
<rect key="frame" x="310.5" y="46.5" width="58" height="29"/>
<rect key="frame" x="268.5" y="43" width="100" height="36"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" title="立即解锁"/>
<state key="normal" title="立即解锁" backgroundImage="mine_goods_btn_bg">
<color key="titleColor" red="0.17254901960784313" green="0.17254901960784313" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
</state>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="解除限制,使用速记大师高级版" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jRc-7Y-1Ab">
<rect key="frame" x="45.5" y="64.5" width="200" height="17"/>
......@@ -292,6 +294,7 @@
</scene>
</scenes>
<resources>
<image name="mine_goods_btn_bg" width="100" height="36"/>
<image name="mine_top_bg" width="335" height="100"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
......
......@@ -36,8 +36,6 @@ class SHMineViewController: SHBaseViewController {
self.navigationItem.title = "我的"
// self.navigationItem.rightBarButtonItem = UIBarButtonItem.init(image: UIImage.init(named: "mine_setting"), style: .plain, target: self, action: #selector(setting))
tableHeaderView.frame = CGRect.init(x: 0, y: 0, width: SCREEN_WIDTH, height: 118*kAutoWidth)
tableView.tableHeaderView = tableHeaderView
tableView.tableFooterView = UIView.init()
......
This diff is collapsed.
......@@ -335,7 +335,7 @@ extension SHRecordDetailsVC {
}
}else{
UIView.animate(withDuration: 0.25) {
self.bottomHeightConstraint?.constant = 120
self.bottomHeightConstraint?.constant = 128
self.view.layoutIfNeeded()
}
}
......@@ -344,6 +344,12 @@ extension SHRecordDetailsVC {
@IBAction func markAlertBtnClick(_ sender:UIButton){
self.markAlertViewShow(false)
bottomView?.cancel = true
if SHUserAccountManager.shared.isMember == false && self.currentModel.dataSources.count > 0{
self.goGoods("home_record")
return
}
switch sender.tag {
case 200:
let input = SHInputController.init()
......@@ -423,6 +429,5 @@ extension SHRecordDetailsVC: UITableViewDelegate, UITableViewDataSource{
self.currentModel = model
self.updateocloudUI()
}
}
}
......@@ -151,7 +151,7 @@ class SHRecordMoveFileVC: SHBaseViewController {
}
}
}
MBProgressHUD.show("正在转移中,请稍后...", view: nil)
MBProgressHUD.show("正在移动...", view: nil)
let list = CRUserDefaults.recordList
if var recordList = list{
//增
......@@ -171,7 +171,7 @@ class SHRecordMoveFileVC: SHBaseViewController {
for (index, subDict) in recordList.enumerated(){
let subFolderModel:SHRecordFolderModel = getDataDictWith(dict: subDict)
if subFolderModel.id == currentModel.id {
subFolderModel.modifyDate = nowDate
// subFolderModel.modifyDate = nowDate
subFolderModel.dataSources = currentModel.dataSources
let dic = getDictWith(obj: subFolderModel)
recordList[index] = dic
......
......@@ -53,6 +53,31 @@ class SHRecordDetailsCell: UITableViewCell {
}
}
var searchStr: String = "" {
didSet{
let titleAtt = NSMutableAttributedString.init(string: model.rename)
let ranges = self.rangeOfString(string: model.rename.lowercased() as NSString, andInString: searchStr.lowercased())
for range in ranges {
titleAtt.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.init(hexStr: "4183F2"), range: range)
}
titleName?.attributedText = titleAtt
let txtAtt = NSMutableAttributedString.init(string: model.txt)
let txtRanges = self.rangeOfString(string: model.txt.lowercased() as NSString, andInString: searchStr.lowercased())
for range in txtRanges {
txtAtt.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.init(hexStr: "4183F2"), range: range)
}
txtLab?.attributedText = txtAtt
}
}
private var _edit: Bool?
var edit: Bool {
set{
......@@ -76,6 +101,37 @@ class SHRecordDetailsCell: UITableViewCell {
}
}
/// 获取字符出现的位置信息(支持多次位置获取)
/// - Parameter string: 原始文本
/// - Parameter inString: 需要查找的字符
private func rangeOfString(string:NSString,
andInString inString:String) -> [NSRange] {
var arrRange = [NSRange]()
var _fullText = string
var rang:NSRange = _fullText.range(of: inString)
while rang.location != NSNotFound {
var location:Int = 0
if arrRange.count > 0 {
if arrRange.last!.location + arrRange.last!.length < string.length {
location = arrRange.last!.location + arrRange.last!.length
}
}
_fullText = NSString.init(string: _fullText.substring(from: rang.location + rang.length))
if arrRange.count > 0 {
rang.location += location
}
arrRange.append(rang)
rang = _fullText.range(of: inString)
}
return arrRange
}
override func layoutSubviews() {
super.layoutSubviews()
......
......@@ -21,7 +21,7 @@
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="export_alert" translatesAutoresizingMaskIntoConstraints="NO" id="zWB-vg-VZR">
<rect key="frame" x="74" y="44" width="200" height="98"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="会议记录成功" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TRx-zi-zxr">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="笔记保存成功" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TRx-zi-zxr">
<rect key="frame" x="107" y="164" width="134" height="26.5"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="22"/>
<color key="textColor" red="0.13333333333333333" green="0.13333333333333333" blue="0.13333333333333333" alpha="0.84705882352941175" colorSpace="calibratedRGB"/>
......
......@@ -35,7 +35,7 @@ class SHRecordGuideView: UIView {
holedView.addHoleRect(CGRect.init(x: SCREEN_WIDTH-44-10, y: kStatusBarHeight, width: 44, height: 44), cornerRadius: 4)
let hintLab = UILabel()
hintLab.text = "点击“✓”即可结束本次会议记录"
hintLab.text = "点击“✓”即可结束并保存录音"
hintLab.textColor = UIColor.white
hintLab.numberOfLines = 0
hintLab.textAlignment = .center
......
......@@ -15,7 +15,7 @@ class SHRecordListCell: UITableViewCell {
set{
_model = newValue
nameLab?.text = newValue.name
nameLab?.attributedText = NSAttributedString.init(string: newValue.name)
countLab?.text = "\(newValue.dataSources.count)"
// timeLab?.text = newValue.createDate.format("yyyy-MM-dd HH:mm")
......@@ -28,11 +28,57 @@ class SHRecordListCell: UITableViewCell {
}
}
var searchStr: String = "" {
didSet{
let titleAtt = NSMutableAttributedString.init(string: model.name)
let ranges = self.rangeOfString(string: model.name.lowercased() as NSString, andInString: searchStr.lowercased())
for range in ranges {
titleAtt.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.init(hexStr: "4183F2"), range: range)
}
nameLab?.attributedText = titleAtt
}
}
@IBOutlet weak var nameLab: UILabel?
@IBOutlet weak var timeLab: UILabel?
@IBOutlet weak var countLab: UILabel?
@IBOutlet weak var topImV: UIImageView?
/// 获取字符出现的位置信息(支持多次位置获取)
/// - Parameter string: 原始文本
/// - Parameter inString: 需要查找的字符
private func rangeOfString(string:NSString,
andInString inString:String) -> [NSRange] {
var arrRange = [NSRange]()
var _fullText = string
var rang:NSRange = _fullText.range(of: inString)
while rang.location != NSNotFound {
var location:Int = 0
if arrRange.count > 0 {
if arrRange.last!.location + arrRange.last!.length < string.length {
location = arrRange.last!.location + arrRange.last!.length
}
}
_fullText = NSString.init(string: _fullText.substring(from: rang.location + rang.length))
if arrRange.count > 0 {
rang.location += location
}
arrRange.append(rang)
rang = _fullText.range(of: inString)
}
return arrRange
}
@objc private func countSecond(_ during:NSInteger) -> String {
//小时计算
let hours = (during)%(24*3600)/3600;
......
......@@ -19,8 +19,8 @@ class SHCloudManager: NSObject {
let recordFolderName = "recordFolder"
lazy var container = CKContainer.default()
lazy var dateBase = container.publicCloudDatabase
// lazy var dateBase = container.privateCloudDatabase
// lazy var dateBase = container.publicCloudDatabase
lazy var dateBase = container.privateCloudDatabase
lazy var folderResults:[CKRecord] = []
lazy var recordResults:[CKRecord] = []
......
......@@ -13,7 +13,7 @@ class SHStoreManager: NSObject {
@objc class func purchaseWithProductId(productId: String, inView: UIView, success: @escaping(()->Void) ,faliure: @escaping((String)->Void)) {
MBProgressHUD.showMessage("支付中...", delayTime: 90, mode: .indeterminate, to: inView)
MBProgressHUD.showMessage("请稍等...", delayTime: 90, mode: .indeterminate, to: inView)
SwiftyStoreKit.purchaseProduct(productId, quantity: 1, atomically: true) { result in
MBProgressHUD.hide(for: inView)
switch result {
......@@ -93,7 +93,7 @@ class SHStoreManager: NSObject {
print("Unknown error. Please contact support")
MBProgressHUD.showError("无法连接到 iTunes Store, 请稍后再试")
case .paymentCancelled:
MBProgressHUD.showError("您已取消购买")
MBProgressHUD.showError("操作取消")
case .paymentInvalid:
MBProgressHUD.showError("无法购买, 请试试其他的")
print("The purchase identifier was invalid")
......
......@@ -34,7 +34,7 @@ import SwiftyJSON
@objc var isMember: Bool {
return true
// return true
let dateFormatter = DateFormatter()
dateFormatter.locale = Locale(identifier: "en_CN")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment