Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
S
ShorthandMaster
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lmj
ShorthandMaster
Commits
87dd31b4
Commit
87dd31b4
authored
Sep 29, 2020
by
lmj_521aiau@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
6f7db351
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
406 additions
and
58 deletions
+406
-58
AppDelegate.swift
ShorthandMaster/AppDelegate.swift
+1
-0
Contents.json
...ts.xcassets/Mine/mine_goods_btn_bg.imageset/Contents.json
+2
-2
矩形@2x.png
...Assets.xcassets/Mine/mine_goods_btn_bg.imageset/矩形@2x.png
+0
-0
矩形@3x.png
...Assets.xcassets/Mine/mine_goods_btn_bg.imageset/矩形@3x.png
+0
-0
设置@2x.png
...ster/Assets.xcassets/Mine/mine_setting.imageset/设置@2x.png
+0
-0
设置@3x.png
...ster/Assets.xcassets/Mine/mine_setting.imageset/设置@3x.png
+0
-0
头像 男孩 (1)@2x.png
...s.xcassets/Mine/mine_top_header.imageset/头像 男孩 (1)@2x.png
+0
-0
头像 男孩 (1)@3x.png
...s.xcassets/Mine/mine_top_header.imageset/头像 男孩 (1)@3x.png
+0
-0
Contents.json
...dDetails/recordDetails_bottom_mask.imageset/Contents.json
+2
-2
笔记列表编辑@2x.png
...dDetails/recordDetails_bottom_mask.imageset/笔记列表编辑@2x.png
+0
-0
笔记列表编辑@3x.png
...dDetails/recordDetails_bottom_mask.imageset/笔记列表编辑@3x.png
+0
-0
Goods.storyboard
ShorthandMaster/Goods/Goods.storyboard
+20
-16
SHGoodsViewController.swift
ShorthandMaster/Goods/SHGoodsViewController.swift
+7
-3
Mine.storyboard
ShorthandMaster/Mine/Mine.storyboard
+5
-2
SHMineViewController.swift
ShorthandMaster/Mine/SHMineViewController.swift
+0
-2
Record.storyboard
ShorthandMaster/Record/Record.storyboard
+111
-2
SHRecordDetailsVC.swift
ShorthandMaster/Record/SHRecordDetailsVC.swift
+7
-2
SHRecordListViewController.swift
ShorthandMaster/Record/SHRecordListViewController.swift
+139
-17
SHRecordMoveFileVC.swift
ShorthandMaster/Record/SHRecordMoveFileVC.swift
+2
-2
SHRecordDetailsCell.swift
ShorthandMaster/Record/View/SHRecordDetailsCell.swift
+56
-0
SHRecordExportAlertView.xib
ShorthandMaster/Record/View/SHRecordExportAlertView.xib
+1
-1
SHRecordGuideView.swift
ShorthandMaster/Record/View/SHRecordGuideView.swift
+1
-1
SHRecordListCell.swift
ShorthandMaster/Record/View/SHRecordListCell.swift
+47
-1
SHCloudManager.swift
ShorthandMaster/Share/Managers/SHCloudManager.swift
+2
-2
SHStoreManager.swift
ShorthandMaster/Share/Managers/SHStoreManager.swift
+2
-2
SHUserAccountManager.swift
ShorthandMaster/Share/Managers/SHUserAccountManager.swift
+1
-1
No files found.
ShorthandMaster/AppDelegate.swift
View file @
87dd31b4
...
...
@@ -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
)
...
...
ShorthandMaster/Assets.xcassets/Mine/mine_
settin
g.imageset/Contents.json
→
ShorthandMaster/Assets.xcassets/Mine/mine_
goods_btn_b
g.imageset/Contents.json
View file @
87dd31b4
...
...
@@ -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"
}
...
...
ShorthandMaster/Assets.xcassets/Mine/mine_goods_btn_bg.imageset/矩形@2x.png
0 → 100644
View file @
87dd31b4
4.9 KB
ShorthandMaster/Assets.xcassets/Mine/mine_goods_btn_bg.imageset/矩形@3x.png
0 → 100644
View file @
87dd31b4
5.74 KB
ShorthandMaster/Assets.xcassets/Mine/mine_setting.imageset/设置@2x.png
deleted
100644 → 0
View file @
6f7db351
1.43 KB
ShorthandMaster/Assets.xcassets/Mine/mine_setting.imageset/设置@3x.png
deleted
100644 → 0
View file @
6f7db351
2.13 KB
ShorthandMaster/Assets.xcassets/Mine/mine_top_header.imageset/头像 男孩 (1)@2x.png
deleted
100644 → 0
View file @
6f7db351
6.82 KB
ShorthandMaster/Assets.xcassets/Mine/mine_top_header.imageset/头像 男孩 (1)@3x.png
deleted
100644 → 0
View file @
6f7db351
8.44 KB
ShorthandMaster/Assets.xcassets/
Mine/mine_top_header
.imageset/Contents.json
→
ShorthandMaster/Assets.xcassets/
RecordDetails/recordDetails_bottom_mask
.imageset/Contents.json
View file @
87dd31b4
...
...
@@ -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"
}
...
...
ShorthandMaster/Assets.xcassets/RecordDetails/recordDetails_bottom_mask.imageset/笔记列表编辑@2x.png
0 → 100644
View file @
87dd31b4
372 Bytes
ShorthandMaster/Assets.xcassets/RecordDetails/recordDetails_bottom_mask.imageset/笔记列表编辑@3x.png
0 → 100644
View file @
87dd31b4
473 Bytes
ShorthandMaster/Goods/Goods.storyboard
View file @
87dd31b4
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"1
6097.2
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"1
7156
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina5_9"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
6087
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
7125
"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"System colors in document resources"
minToolsVersion=
"11.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<scenes>
...
...
@@ -49,10 +50,10 @@
<rect
key=
"frame"
x=
"0.0"
y=
"510"
width=
"375"
height=
"268"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"7CA-md-1C7"
>
<rect
key=
"frame"
x=
"5
6"
y=
"34.666666666666636"
width=
"263.33333333333331"
height=
"64.666666666666686
"
/>
<rect
key=
"frame"
x=
"5
5"
y=
"34.333333333333364"
width=
"265.33333333333331"
height=
"65.333333333333314
"
/>
<subviews>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Soc-NE-Z9a"
>
<rect
key=
"frame"
x=
"4
.0000000000000142"
y=
"3.9999999999999964"
width=
"255.33333333333337"
height=
"56.666666666666657
"
/>
<rect
key=
"frame"
x=
"4
"
y=
"4.0000000000000036"
width=
"257.33333333333331"
height=
"57.333333333333343
"
/>
<color
key=
"backgroundColor"
red=
"0.20784313730000001"
green=
"0.48627450979999998"
blue=
"0.95686274510000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<constraints>
<constraint
firstAttribute=
"width"
secondItem=
"Soc-NE-Z9a"
secondAttribute=
"height"
multiplier=
"247:55"
id=
"lt7-vV-ua9"
/>
...
...
@@ -72,13 +73,13 @@
</constraints>
</view>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"3天免费试用,之后¥498/年,随时取消"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"bYQ-iK-LKQ"
>
<rect
key=
"frame"
x=
"63.
333333333333329"
y=
"117.33333333333337"
width=
"248.66666666666669
"
height=
"17"
/>
<rect
key=
"frame"
x=
"63.
666666666666657"
y=
"117.66666666666663"
width=
"247.99999999999997
"
height=
"17"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<color
key=
"textColor"
red=
"0.40000000000000002"
green=
"0.40000000000000002"
blue=
"0.40000000000000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<button
opaque=
"NO"
tag=
"100"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
hasAttributedTitle=
"YES"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"zdZ-po-8RK"
>
<rect
key=
"frame"
x=
"5
6"
y=
"201.66666666666663"
width=
"48"
height=
"25
.333333333333343"
/>
<rect
key=
"frame"
x=
"5
5"
y=
"201.33333333333337"
width=
"48"
height=
"26
.333333333333343"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"48"
id=
"Huy-Ey-M4D"
/>
</constraints>
...
...
@@ -87,7 +88,7 @@
<fragment
content=
"隐私政策"
>
<attributes>
<color
key=
"NSColor"
red=
"0.59999999999999998"
green=
"0.59999999999999998"
blue=
"0.59999999999999998"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<font
key=
"NSFont"
size=
"12"
name=
".PingFangSC-Regular
"
/>
<font
key=
"NSFont"
metaFont=
"cellTitle
"
/>
<paragraphStyle
key=
"NSParagraphStyle"
alignment=
"natural"
lineBreakMode=
"wordWrapping"
baseWritingDirection=
"natural"
tighteningFactorForTruncation=
"0.0"
/>
<integer
key=
"NSUnderline"
value=
"1"
/>
</attributes>
...
...
@@ -99,13 +100,13 @@
</connections>
</button>
<button
opaque=
"NO"
tag=
"101"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
hasAttributedTitle=
"YES"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"8CH-Xu-Rvt"
>
<rect
key=
"frame"
x=
"16
3.66666666666666"
y=
"201.66666666666663"
width=
"48"
height=
"25
.333333333333343"
/>
<rect
key=
"frame"
x=
"16
2.66666666666666"
y=
"201.33333333333337"
width=
"50"
height=
"26
.333333333333343"
/>
<state
key=
"normal"
>
<attributedString
key=
"attributedTitle"
>
<fragment
content=
"恢复购买"
>
<attributes>
<color
key=
"NSColor"
red=
"0.59999999999999998"
green=
"0.59999999999999998"
blue=
"0.59999999999999998"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<font
key=
"NSFont"
size=
"12"
name=
".PingFangSC-Regular
"
/>
<font
key=
"NSFont"
metaFont=
"cellTitle
"
/>
<paragraphStyle
key=
"NSParagraphStyle"
alignment=
"natural"
lineBreakMode=
"wordWrapping"
baseWritingDirection=
"natural"
tighteningFactorForTruncation=
"0.0"
/>
<integer
key=
"NSUnderline"
value=
"1"
/>
</attributes>
...
...
@@ -117,13 +118,13 @@
</connections>
</button>
<button
opaque=
"NO"
tag=
"102"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
hasAttributedTitle=
"YES"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"97G-xL-vUR"
>
<rect
key=
"frame"
x=
"27
1"
y=
"201.66666666666663"
width=
"48.333333333333314"
height=
"25
.333333333333343"
/>
<rect
key=
"frame"
x=
"27
2"
y=
"201.33333333333337"
width=
"48.333333333333314"
height=
"26
.333333333333343"
/>
<state
key=
"normal"
>
<attributedString
key=
"attributedTitle"
>
<fragment
content=
"使用条款"
>
<attributes>
<color
key=
"NSColor"
red=
"0.59999999999999998"
green=
"0.59999999999999998"
blue=
"0.59999999999999998"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<font
key=
"NSFont"
size=
"12"
name=
".PingFangSC-Regular
"
/>
<font
key=
"NSFont"
metaFont=
"cellTitle
"
/>
<paragraphStyle
key=
"NSParagraphStyle"
alignment=
"natural"
lineBreakMode=
"wordWrapping"
baseWritingDirection=
"natural"
tighteningFactorForTruncation=
"0.0"
/>
<integer
key=
"NSUnderline"
value=
"1"
/>
</attributes>
...
...
@@ -135,7 +136,7 @@
</connections>
</button>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
/>
<constraints>
<constraint
firstItem=
"zdZ-po-8RK"
firstAttribute=
"centerY"
secondItem=
"paw-ud-pJv"
secondAttribute=
"centerY"
multiplier=
"1.6"
id=
"5mv-Ms-Okb"
/>
<constraint
firstItem=
"8CH-Xu-Rvt"
firstAttribute=
"leading"
secondItem=
"zdZ-po-8RK"
secondAttribute=
"trailing"
constant=
"59.666666666666657"
id=
"9x4-zX-RjQ"
/>
...
...
@@ -191,7 +192,7 @@
</constraints>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"强大AI支持,准确率高达98%"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"YlN-ec-ALx"
>
<rect
key=
"frame"
x=
"30.000000000000014"
y=
"4"
width=
"23
6.33333333333337
"
height=
"21.666666666666668"
/>
<rect
key=
"frame"
x=
"30.000000000000014"
y=
"4"
width=
"23
7.66666666666669
"
height=
"21.666666666666668"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"18"
/>
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -321,7 +322,7 @@
</constraints>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"永久保存到iCloud"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"c3N-aa-suO"
>
<rect
key=
"frame"
x=
"30
.000000000000014"
y=
"4"
width=
"143.33333333333337
"
height=
"21.666666666666668"
/>
<rect
key=
"frame"
x=
"30
"
y=
"4"
width=
"143
"
height=
"21.666666666666668"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"18"
/>
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -343,7 +344,8 @@
</constraints>
</stackView>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<viewLayoutGuide
key=
"safeArea"
id=
"vu7-FC-44s"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
/>
<constraints>
<constraint
firstItem=
"vu7-FC-44s"
firstAttribute=
"trailing"
secondItem=
"paw-ud-pJv"
secondAttribute=
"trailing"
id=
"1FV-EK-IXz"
/>
<constraint
firstItem=
"vu7-FC-44s"
firstAttribute=
"trailing"
secondItem=
"rdF-tz-yuV"
secondAttribute=
"trailing"
constant=
"10"
id=
"1zJ-h7-e5L"
/>
...
...
@@ -362,7 +364,6 @@
<constraint
firstItem=
"rdF-tz-yuV"
firstAttribute=
"top"
secondItem=
"vu7-FC-44s"
secondAttribute=
"top"
id=
"sTT-lR-Cih"
/>
<constraint
firstItem=
"Da1-ng-YHc"
firstAttribute=
"centerY"
secondItem=
"iye-Iu-Z0h"
secondAttribute=
"centerY"
multiplier=
"1.3"
id=
"tAp-1A-Ixr"
/>
</constraints>
<viewLayoutGuide
key=
"safeArea"
id=
"vu7-FC-44s"
/>
</view>
<connections>
<outlet
property=
"bgImvConstaint"
destination=
"P6H-DC-o9o"
id=
"xdP-K4-4SM"
/>
...
...
@@ -380,5 +381,8 @@
<image
name=
"goods_bg"
width=
"375"
height=
"510"
/>
<image
name=
"goods_cancel"
width=
"20"
height=
"20"
/>
<image
name=
"goods_check"
width=
"20"
height=
"20"
/>
<systemColor
name=
"systemBackgroundColor"
>
<color
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
</systemColor>
</resources>
</document>
ShorthandMaster/Goods/SHGoodsViewController.swift
View file @
87dd31b4
...
...
@@ -50,9 +50,13 @@ class SHGoodsViewController: SHBaseViewController {
yearStoreBtnBgView
.
layer
.
cornerRadius
=
yearStoreBtnBgView
.
frame
.
size
.
height
/
2
yearStoreBtn
.
layer
.
cornerRadius
=
yearStoreBtn
.
frame
.
size
.
height
/
2
yearStoreBtn
.
setTitle
(
SHUserAccountManager
.
shared
.
autoButtonText
,
for
:
.
normal
)
yearStoreLab
.
text
=
SHUserAccountManager
.
shared
.
threeDayText
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
animation
.
beginTime
=
0
...
...
ShorthandMaster/Mine/Mine.storyboard
View file @
87dd31b4
...
...
@@ -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"
/>
...
...
ShorthandMaster/Mine/SHMineViewController.swift
View file @
87dd31b4
...
...
@@ -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
()
...
...
ShorthandMaster/Record/Record.storyboard
View file @
87dd31b4
...
...
@@ -104,8 +104,105 @@
<rect
key=
"frame"
x=
"0.0"
y=
"100"
width=
"414"
height=
"678"
/>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
/>
<prototypes>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"default"
indentationWidth=
"10"
reuseIdentifier=
"SHRecordDetailsCell"
rowHeight=
"230"
id=
"FuP-dQ-RqL"
customClass=
"SHRecordDetailsCell"
customModule=
"速记大师"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"28"
width=
"414"
height=
"230"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"FuP-dQ-RqL"
id=
"klG-KN-TVi"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"230"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"gUb-Id-PRL"
>
<rect
key=
"frame"
x=
"50"
y=
"5"
width=
"344"
height=
"220"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Label"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
numberOfLines=
"2"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"AEn-sK-b1J"
>
<rect
key=
"frame"
x=
"18"
y=
"18"
width=
"44"
height=
"21.5"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"18"
/>
<color
key=
"textColor"
red=
"0.0"
green=
"0.074509803920000006"
blue=
"0.23921568630000001"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Label"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
numberOfLines=
"3"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"cNh-iW-ZMM"
>
<rect
key=
"frame"
x=
"18"
y=
"80.5"
width=
"309"
height=
"17"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<nil
key=
"textColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"recordDetails_voice"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"ERh-59-xML"
>
<rect
key=
"frame"
x=
"18"
y=
"107.5"
width=
"16"
height=
"16"
/>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Label"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"oyF-JM-3zi"
>
<rect
key=
"frame"
x=
"39"
y=
"107"
width=
"36"
height=
"17"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<color
key=
"textColor"
red=
"0.58431372550000005"
green=
"0.62745098040000002"
blue=
"0.72156862749999995"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Label"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Vl0-Nu-rDx"
>
<rect
key=
"frame"
x=
"18"
y=
"49.5"
width=
"36"
height=
"17"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<color
key=
"textColor"
red=
"0.58431372550000005"
green=
"0.62745098040000002"
blue=
"0.72156862749999995"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"xQ0-xq-IV7"
>
<rect
key=
"frame"
x=
"296"
y=
"100.5"
width=
"30"
height=
"30"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"30"
id=
"Uao-zm-8yN"
/>
<constraint
firstAttribute=
"height"
constant=
"30"
id=
"hPD-1F-ZsN"
/>
</constraints>
<state
key=
"normal"
image=
"recordDetails_icloud"
/>
<state
key=
"selected"
image=
"recordDetails_icloud_selected"
/>
</button>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
/>
<constraints>
<constraint
firstItem=
"oyF-JM-3zi"
firstAttribute=
"centerY"
secondItem=
"ERh-59-xML"
secondAttribute=
"centerY"
id=
"05H-3q-1nA"
/>
<constraint
firstAttribute=
"trailing"
relation=
"greaterThanOrEqual"
secondItem=
"AEn-sK-b1J"
secondAttribute=
"trailing"
constant=
"17"
id=
"22e-iI-u93"
/>
<constraint
firstItem=
"oyF-JM-3zi"
firstAttribute=
"leading"
secondItem=
"ERh-59-xML"
secondAttribute=
"trailing"
constant=
"5"
id=
"P3A-75-ldz"
/>
<constraint
firstAttribute=
"bottom"
relation=
"greaterThanOrEqual"
secondItem=
"ERh-59-xML"
secondAttribute=
"bottom"
constant=
"10"
id=
"S07-iA-hSp"
/>
<constraint
firstItem=
"AEn-sK-b1J"
firstAttribute=
"top"
secondItem=
"gUb-Id-PRL"
secondAttribute=
"top"
constant=
"18"
id=
"Yt8-RS-W09"
/>
<constraint
firstItem=
"xQ0-xq-IV7"
firstAttribute=
"centerY"
secondItem=
"oyF-JM-3zi"
secondAttribute=
"centerY"
id=
"YvC-PY-wPA"
/>
<constraint
firstItem=
"Vl0-Nu-rDx"
firstAttribute=
"top"
secondItem=
"AEn-sK-b1J"
secondAttribute=
"bottom"
constant=
"10"
id=
"d0q-1V-4Rm"
/>
<constraint
firstItem=
"AEn-sK-b1J"
firstAttribute=
"leading"
secondItem=
"gUb-Id-PRL"
secondAttribute=
"leading"
constant=
"18"
id=
"e5b-Kl-eug"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"cNh-iW-ZMM"
secondAttribute=
"trailing"
constant=
"17"
id=
"hiS-EU-ac8"
/>
<constraint
firstItem=
"cNh-iW-ZMM"
firstAttribute=
"leading"
secondItem=
"AEn-sK-b1J"
secondAttribute=
"leading"
id=
"kEu-HK-jKa"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"xQ0-xq-IV7"
secondAttribute=
"trailing"
constant=
"18"
id=
"lpN-OU-eBz"
/>
<constraint
firstItem=
"ERh-59-xML"
firstAttribute=
"top"
secondItem=
"cNh-iW-ZMM"
secondAttribute=
"bottom"
constant=
"10"
id=
"tud-Zh-0Et"
/>
<constraint
firstItem=
"cNh-iW-ZMM"
firstAttribute=
"top"
secondItem=
"Vl0-Nu-rDx"
secondAttribute=
"bottom"
constant=
"14"
id=
"vPT-Td-plj"
/>
<constraint
firstItem=
"ERh-59-xML"
firstAttribute=
"leading"
secondItem=
"AEn-sK-b1J"
secondAttribute=
"leading"
id=
"yR0-Vr-Vx9"
/>
<constraint
firstItem=
"Vl0-Nu-rDx"
firstAttribute=
"leading"
secondItem=
"AEn-sK-b1J"
secondAttribute=
"leading"
id=
"ypp-04-pMb"
/>
</constraints>
</view>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"U72-QE-Wb0"
>
<rect
key=
"frame"
x=
"10"
y=
"95"
width=
"40"
height=
"40"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"40"
id=
"Tma-xD-IU1"
/>
<constraint
firstAttribute=
"height"
constant=
"40"
id=
"fmK-mh-HV7"
/>
</constraints>
<state
key=
"normal"
image=
"recordDetails_select"
/>
<state
key=
"selected"
image=
"recordDetails_selected"
/>
</button>
</subviews>
<constraints>
<constraint
firstAttribute=
"trailing"
secondItem=
"gUb-Id-PRL"
secondAttribute=
"trailing"
constant=
"20"
id=
"36L-ZE-0od"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"gUb-Id-PRL"
secondAttribute=
"bottom"
constant=
"5"
id=
"VSt-Rp-NNA"
/>
<constraint
firstItem=
"U72-QE-Wb0"
firstAttribute=
"leading"
secondItem=
"klG-KN-TVi"
secondAttribute=
"leading"
constant=
"10"
id=
"W5k-JY-cn3"
/>
<constraint
firstItem=
"U72-QE-Wb0"
firstAttribute=
"centerY"
secondItem=
"klG-KN-TVi"
secondAttribute=
"centerY"
id=
"WZJ-q5-h8Y"
/>
<constraint
firstItem=
"gUb-Id-PRL"
firstAttribute=
"leading"
secondItem=
"U72-QE-Wb0"
secondAttribute=
"trailing"
id=
"ibu-KE-cvF"
/>
<constraint
firstItem=
"gUb-Id-PRL"
firstAttribute=
"top"
secondItem=
"klG-KN-TVi"
secondAttribute=
"top"
constant=
"5"
id=
"o5W-ix-83K"
/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet
property=
"bgView"
destination=
"gUb-Id-PRL"
id=
"KKn-It-jxk"
/>
<outlet
property=
"duringLab"
destination=
"oyF-JM-3zi"
id=
"bun-jQ-9l1"
/>
<outlet
property=
"icloudBtn"
destination=
"xQ0-xq-IV7"
id=
"Q0y-TB-a1B"
/>
<outlet
property=
"intervalConstraint"
destination=
"Tma-xD-IU1"
id=
"bac-yZ-98J"
/>
<outlet
property=
"leftConstraint"
destination=
"W5k-JY-cn3"
id=
"k3v-Ez-efp"
/>
<outlet
property=
"selectedBtn"
destination=
"U72-QE-Wb0"
id=
"yXK-Gx-OYA"
/>
<outlet
property=
"timeLab"
destination=
"Vl0-Nu-rDx"
id=
"V6d-Av-NkK"
/>
<outlet
property=
"titleName"
destination=
"AEn-sK-b1J"
id=
"Sv4-Hg-dvW"
/>
<outlet
property=
"txtLab"
destination=
"cNh-iW-ZMM"
id=
"7RW-La-yA1"
/>
</connections>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
preservesSuperviewLayoutMargins=
"YES"
selectionStyle=
"default"
indentationWidth=
"10"
reuseIdentifier=
"SHRecordListCell"
rowHeight=
"95"
id=
"Y8c-0f-L8I"
customClass=
"SHRecordListCell"
customModule=
"速记大师"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"28"
width=
"414"
height=
"95"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"2
5
8"
width=
"414"
height=
"95"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
preservesSuperviewLayoutMargins=
"YES"
insetsLayoutMarginsFromSafeArea=
"NO"
tableViewCell=
"Y8c-0f-L8I"
id=
"7W5-bl-5Kb"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"95"
/>
...
...
@@ -168,7 +265,7 @@
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"d2Q-zE-Eh0"
>
<rect
key=
"frame"
x=
"70"
y=
"42"
width=
"274"
height=
"24"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<state
key=
"normal"
title=
" 去除广告和限制,使用高级版速
写
大师 "
backgroundImage=
"record_bottom_advert"
/>
<state
key=
"normal"
title=
" 去除广告和限制,使用高级版速
记
大师 "
backgroundImage=
"record_bottom_advert"
/>
<connections>
<action
selector=
"advertBtnClick"
destination=
"wHB-ed-c6Y"
eventType=
"touchUpInside"
id=
"NIZ-3J-ggE"
/>
</connections>
...
...
@@ -514,9 +611,20 @@
</view>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"maK-EO-jzl"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"414"
height=
"60"
/>
<subviews>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"recordDetails_bottom_mask"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"5pT-bZ-rta"
>
<rect
key=
"frame"
x=
"0.0"
y=
"-8"
width=
"414"
height=
"8"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"8"
id=
"8BV-im-gLG"
/>
</constraints>
</imageView>
</subviews>
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
/>
<constraints>
<constraint
firstItem=
"5pT-bZ-rta"
firstAttribute=
"bottom"
secondItem=
"maK-EO-jzl"
secondAttribute=
"top"
id=
"O4T-A6-3Dn"
/>
<constraint
firstItem=
"5pT-bZ-rta"
firstAttribute=
"leading"
secondItem=
"maK-EO-jzl"
secondAttribute=
"leading"
id=
"UEd-VE-ws4"
/>
<constraint
firstAttribute=
"height"
constant=
"60"
id=
"Y5S-Yj-Prn"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"5pT-bZ-rta"
secondAttribute=
"trailing"
id=
"rlJ-gx-ydD"
/>
</constraints>
</view>
</subviews>
...
...
@@ -689,6 +797,7 @@
</scene>
</scenes>
<resources>
<image
name=
"recordDetails_bottom_mask"
width=
"375"
height=
"8"
/>
<image
name=
"recordDetails_icloud"
width=
"16"
height=
"16"
/>
<image
name=
"recordDetails_icloud_selected"
width=
"16"
height=
"16"
/>
<image
name=
"recordDetails_select"
width=
"20"
height=
"20"
/>
...
...
ShorthandMaster/Record/SHRecordDetailsVC.swift
View file @
87dd31b4
...
...
@@ -335,7 +335,7 @@ extension SHRecordDetailsVC {
}
}
else
{
UIView
.
animate
(
withDuration
:
0.25
)
{
self
.
bottomHeightConstraint
?
.
constant
=
12
0
self
.
bottomHeightConstraint
?
.
constant
=
12
8
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
()
}
}
}
ShorthandMaster/Record/SHRecordListViewController.swift
View file @
87dd31b4
...
...
@@ -23,9 +23,10 @@ class SHRecordListViewController: SHBaseViewController {
let
keyValueStore
=
NSUbiquitousKeyValueStore
.
default
var
dataSources
:
Array
<
SHRecordFolderModel
>
=
[]
var
searchDataSource
:
Array
<
SHRecordFolderModel
>
=
[]
var
searchDataSource
:
Array
<
Array
<
AnyObject
>
>
=
[]
var
topDataSources
:
Array
<
SHRecordFolderModel
>
=
[]
var
recordsDataSource
:
Array
<
SHRecordModel
>
=
[]
var
searchView
:
UISearchBar
!
lazy
var
searchBarVC
:
UISearchController
=
{
let
searchBarVC
=
UISearchController
.
init
(
searchResultsController
:
nil
)
...
...
@@ -46,6 +47,8 @@ class SHRecordListViewController: SHBaseViewController {
super
.
viewDidAppear
(
animated
)
prepareDateSource
()
self
.
tableView
?
.
reloadData
()
advertBtn
?
.
isHidden
=
SHUserAccountManager
.
shared
.
isMember
}
override
func
viewDidDisappear
(
_
animated
:
Bool
)
{
...
...
@@ -105,6 +108,10 @@ class SHRecordListViewController: SHBaseViewController {
self
.
tableHeaderView
?
.
addSubview
(
searchView
)
tableView
?
.
tableFooterView
=
UIView
.
init
()
tableView
?
.
estimatedRowHeight
=
44
tableView
?
.
rowHeight
=
UITableView
.
automaticDimension
// tableView?.separatorStyle = .none
}
func
prepareDateSource
(){
...
...
@@ -176,6 +183,13 @@ class SHRecordListViewController: SHBaseViewController {
dataSources
=
topDataSources
+
dataSources
recordsDataSource
=
[]
for
folder
in
dataSources
{
for
model
in
folder
.
dataSources
{
recordsDataSource
.
append
(
model
)
}
}
tableView
?
.
reloadData
()
maskHintLab
?
.
text
=
"点击上面右上角添加笔记本"
...
...
@@ -195,6 +209,12 @@ class SHRecordListViewController: SHBaseViewController {
}
@objc
func
userCilck
(){
if
SHUserAccountManager
.
shared
.
isMember
==
false
&&
self
.
dataSources
.
count
>
0
{
self
.
goGoods
(
"home_record"
)
return
}
addModel
()
}
...
...
@@ -207,7 +227,10 @@ class SHRecordListViewController: SHBaseViewController {
}
@IBAction
func
advertBtnClick
(){
if
SHUserAccountManager
.
shared
.
isMember
==
false
{
self
.
goGoods
(
"home_record"
)
return
}
}
@IBAction
func
goRecord
(){
...
...
@@ -402,39 +425,128 @@ extension SHRecordListViewController {
//MARK: tableView delegate
extension
SHRecordListViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
if
self
.
searchBarVC
.
isActive
{
return
2
}
return
1
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
if
self
.
searchBarVC
.
isActive
{
return
searchDataSource
.
count
return
searchDataSource
[
section
]
.
count
}
return
dataSources
.
count
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
kAutoWidth
*
60
if
indexPath
.
section
==
0
{
return
kAutoWidth
*
60
}
else
{
return
UITableView
.
automaticDimension
}
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"SHRecordListCell"
,
for
:
indexPath
)
as!
SHRecordListCell
if
self
.
searchBarVC
.
isActive
{
cell
.
model
=
searchDataSource
[
indexPath
.
row
]
if
indexPath
.
section
==
0
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"SHRecordListCell"
,
for
:
indexPath
)
as!
SHRecordListCell
let
folders
:[
SHRecordFolderModel
]
=
searchDataSource
[
indexPath
.
section
]
as!
[
SHRecordFolderModel
]
cell
.
model
=
folders
[
indexPath
.
row
]
cell
.
searchStr
=
self
.
searchBarVC
.
searchBar
.
text
??
""
cell
.
selectionStyle
=
.
none
return
cell
}
else
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"SHRecordDetailsCell"
,
for
:
indexPath
)
as!
SHRecordDetailsCell
let
records
:[
SHRecordModel
]
=
searchDataSource
[
indexPath
.
section
]
as!
[
SHRecordModel
]
let
model
=
records
[
indexPath
.
row
]
cell
.
model
=
model
cell
.
edit
=
false
cell
.
icloudBtn
?
.
isHidden
=
true
cell
.
searchStr
=
self
.
searchBarVC
.
searchBar
.
text
??
""
cell
.
selectionStyle
=
.
none
cell
.
separatorInset
=
UIEdgeInsets
.
init
(
top
:
0
,
left
:
kScreenWidth
/
2
,
bottom
:
0
,
right
:
kScreenWidth
/
2
)
return
cell
}
}
else
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"SHRecordListCell"
,
for
:
indexPath
)
as!
SHRecordListCell
cell
.
model
=
dataSources
[
indexPath
.
row
]
cell
.
selectionStyle
=
.
none
return
cell
}
cell
.
selectionStyle
=
.
none
return
cell
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
let
details
=
UIStoryboard
.
init
(
name
:
"Record"
,
bundle
:
nil
)
.
instantiateViewController
(
withIdentifier
:
"SHRecordDetailsVC"
)
as!
SHRecordDetailsVC
if
self
.
searchBarVC
.
isActive
{
details
.
currentModel
=
searchDataSource
[
indexPath
.
row
]
if
indexPath
.
section
==
0
{
let
details
=
UIStoryboard
.
init
(
name
:
"Record"
,
bundle
:
nil
)
.
instantiateViewController
(
withIdentifier
:
"SHRecordDetailsVC"
)
as!
SHRecordDetailsVC
let
folders
:[
SHRecordFolderModel
]
=
searchDataSource
[
indexPath
.
section
]
as!
[
SHRecordFolderModel
]
details
.
currentModel
=
folders
[
indexPath
.
row
]
self
.
navigationController
?
.
pushViewController
(
details
,
animated
:
true
)
}
else
{
let
records
:[
SHRecordModel
]
=
searchDataSource
[
indexPath
.
section
]
as!
[
SHRecordModel
]
let
recordModel
=
records
[
indexPath
.
row
]
let
folderModel
=
self
.
dataSources
.
filter
({
let
record
=
$0
.
dataSources
.
filter
({
$0
.
pathFile
==
recordModel
.
pathFile
})
.
first
if
record
!=
nil
{
return
true
}
else
{
return
false
}
})
.
first
let
input
=
SHInputController
.
init
()
input
.
folderModel
=
folderModel
input
.
dataModel
=
recordModel
self
.
navigationController
?
.
pushViewController
(
input
,
animated
:
true
)
input
.
saveSuccessCallBack
=
{
model
in
self
.
searchBarVC
.
searchBar
.
text
=
""
self
.
prepareDateSource
()
self
.
tableView
?
.
reloadData
()
}
}
}
else
{
let
details
=
UIStoryboard
.
init
(
name
:
"Record"
,
bundle
:
nil
)
.
instantiateViewController
(
withIdentifier
:
"SHRecordDetailsVC"
)
as!
SHRecordDetailsVC
details
.
currentModel
=
dataSources
[
indexPath
.
row
]
self
.
navigationController
?
.
pushViewController
(
details
,
animated
:
true
)
}
}
func
tableView
(
_
tableView
:
UITableView
,
heightForHeaderInSection
section
:
Int
)
->
CGFloat
{
if
self
.
searchBarVC
.
isActive
{
return
50
}
return
0.001
}
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
if
self
.
searchBarVC
.
isActive
{
let
view
=
UIView
.
init
(
frame
:
CGRect
.
init
(
x
:
0
,
y
:
0
,
width
:
kScreenWidth
,
height
:
50
))
view
.
backgroundColor
=
UIColor
.
groupTableViewBackground
let
bottomView
=
UIView
.
init
(
frame
:
CGRect
.
init
(
x
:
0
,
y
:
10
,
width
:
kScreenWidth
,
height
:
40
))
bottomView
.
backgroundColor
=
UIColor
.
white
view
.
addSubview
(
bottomView
)
let
lab
=
UILabel
.
init
(
frame
:
CGRect
.
init
(
x
:
20
,
y
:
0
,
width
:
kScreenWidth
-
20
,
height
:
40
))
lab
.
text
=
section
==
0
?
"笔记本"
:
"笔记"
lab
.
font
=
UIFont
.
systemFont
(
ofSize
:
14
)
lab
.
textColor
=
UIColor
.
init
(
hexStr
:
"999999"
)
let
line
=
UIView
.
init
(
frame
:
CGRect
.
init
(
x
:
20
,
y
:
39
,
width
:
kScreenWidth
-
20
,
height
:
1
))
line
.
backgroundColor
=
UIColor
.
groupTableViewBackground
bottomView
.
addSubview
(
lab
)
bottomView
.
addSubview
(
line
)
return
view
}
else
{
return
UIView
()
}
self
.
navigationController
?
.
pushViewController
(
details
,
animated
:
true
)
}
func
tableView
(
_
tableView
:
UITableView
,
canEditRowAt
indexPath
:
IndexPath
)
->
Bool
{
...
...
@@ -509,13 +621,23 @@ extension SHRecordListViewController: UISearchResultsUpdating, UISearchBarDelega
func
updateSearchResults
(
for
searchController
:
UISearchController
)
{
searchDataSource
.
removeAll
()
var
searchArr
:
Array
<
SHRecordFolderModel
>
=
[]
searchArr
=
ZYPinYinSearch
.
search
(
withOriginalArray
:
dataSources
,
andSearchText
:
searchController
.
searchBar
.
text
,
andSearchByPropertyName
:
"name"
)
as!
Array
<
SHRecordFolderModel
>
var
folderSearchArr
:
Array
<
SHRecordFolderModel
>
=
[]
folderSearchArr
=
ZYPinYinSearch
.
search
(
withOriginalArray
:
dataSources
,
andSearchText
:
searchController
.
searchBar
.
text
,
andSearchByPropertyName
:
"name"
)
as!
Array
<
SHRecordFolderModel
>
var
recordSearchTitleArr
:
Array
<
SHRecordModel
>
=
[]
recordSearchTitleArr
=
ZYPinYinSearch
.
search
(
withOriginalArray
:
recordsDataSource
,
andSearchText
:
searchController
.
searchBar
.
text
,
andSearchByPropertyName
:
"rename"
)
as!
Array
<
SHRecordModel
>
var
recordSearchTxtArr
:
Array
<
SHRecordModel
>
=
[]
recordSearchTxtArr
=
ZYPinYinSearch
.
search
(
withOriginalArray
:
recordsDataSource
,
andSearchText
:
searchController
.
searchBar
.
text
,
andSearchByPropertyName
:
"txt"
)
as!
Array
<
SHRecordModel
>
let
recordSearchArr
:
Array
<
SHRecordModel
>
=
(
recordSearchTitleArr
+
recordSearchTxtArr
)
.
filterDuplicates
({
$0
.
pathFile
})
if
searchController
.
searchBar
.
text
?
.
length
==
0
{
searchDataSource
.
append
(
contentsOf
:
dataSources
)
searchDataSource
.
append
(
dataSources
)
searchDataSource
.
append
(
recordsDataSource
)
}
else
{
searchDataSource
.
append
(
contentsOf
:
searchArr
)
searchDataSource
.
append
(
folderSearchArr
)
searchDataSource
.
append
(
recordSearchArr
)
}
self
.
tableView
?
.
reloadData
()
...
...
ShorthandMaster/Record/SHRecordMoveFileVC.swift
View file @
87dd31b4
...
...
@@ -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
...
...
ShorthandMaster/Record/View/SHRecordDetailsCell.swift
View file @
87dd31b4
...
...
@@ -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
()
...
...
ShorthandMaster/Record/View/SHRecordExportAlertView.xib
View file @
87dd31b4
...
...
@@ -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"
/>
...
...
ShorthandMaster/Record/View/SHRecordGuideView.swift
View file @
87dd31b4
...
...
@@ -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
...
...
ShorthandMaster/Record/View/SHRecordListCell.swift
View file @
87dd31b4
...
...
@@ -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
;
...
...
ShorthandMaster/Share/Managers/SHCloudManager.swift
View file @
87dd31b4
...
...
@@ -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
]
=
[]
...
...
ShorthandMaster/Share/Managers/SHStoreManager.swift
View file @
87dd31b4
...
...
@@ -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"
)
...
...
ShorthandMaster/Share/Managers/SHUserAccountManager.swift
View file @
87dd31b4
...
...
@@ -34,7 +34,7 @@ import SwiftyJSON
@objc
var
isMember
:
Bool
{
return
true
//
return true
let
dateFormatter
=
DateFormatter
()
dateFormatter
.
locale
=
Locale
(
identifier
:
"en_CN"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment