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
be186d53
Commit
be186d53
authored
Sep 30, 2020
by
lmj_521aiau@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
638d81ba
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
139 additions
and
17 deletions
+139
-17
project.pbxproj
ShorthandMaster.xcodeproj/project.pbxproj
+7
-1
AppDelegate.swift
ShorthandMaster/AppDelegate.swift
+0
-4
NSString+Extensions.h
ShorthandMaster/Extensions/OC/NSString+Extensions.h
+19
-0
NSString+Extensions.m
ShorthandMaster/Extensions/OC/NSString+Extensions.m
+67
-0
Mine.storyboard
ShorthandMaster/Mine/Mine.storyboard
+5
-1
SHMineViewController.swift
ShorthandMaster/Mine/SHMineViewController.swift
+0
-1
SHRecordDetailsVC.swift
ShorthandMaster/Record/SHRecordDetailsVC.swift
+8
-0
SHRecordListViewController.swift
ShorthandMaster/Record/SHRecordListViewController.swift
+27
-5
SHRecordMoveFileVC.swift
ShorthandMaster/Record/SHRecordMoveFileVC.swift
+1
-1
SHCloudManager.swift
ShorthandMaster/Share/Managers/SHCloudManager.swift
+3
-2
SHUserAccountManager.swift
ShorthandMaster/Share/Managers/SHUserAccountManager.swift
+1
-1
ShorthandMaster-Bridging-Header.h
ShorthandMaster/ShorthandMaster-Bridging-Header.h
+1
-1
No files found.
ShorthandMaster.xcodeproj/project.pbxproj
View file @
be186d53
...
...
@@ -52,6 +52,7 @@
A950F5AF24F4E06E007AB63E
/* SHMineViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A950F5AE24F4E06E007AB63E
/* SHMineViewController.swift */
;
};
A950F5B124F4E080007AB63E
/* Mine.storyboard in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A950F5B024F4E080007AB63E
/* Mine.storyboard */
;
};
A950F5B624F4E64A007AB63E
/* UIView+CornerRadii.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A950F5B524F4E64A007AB63E
/* UIView+CornerRadii.m */
;
};
A959322F25245F4800968A92
/* NSString+Extensions.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A959322E25245F4800968A92
/* NSString+Extensions.m */
;
};
A95A76872521D70F003B4E1C
/* UIView+LayoutMethods.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A95A76842521D70F003B4E1C
/* UIView+LayoutMethods.m */
;
};
A95A76882521D70F003B4E1C
/* DDSoundWaveView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A95A76852521D70F003B4E1C
/* DDSoundWaveView.m */
;
};
A95B3FCB24F507A900FABDD1
/* SHDeleteDetailsViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A95B3FCA24F507A900FABDD1
/* SHDeleteDetailsViewController.swift */
;
};
...
...
@@ -234,6 +235,8 @@
A950F5B524F4E64A007AB63E
/* UIView+CornerRadii.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"UIView+CornerRadii.m"
;
sourceTree
=
"<group>"
;
};
A954DD9125222C4600C2DDB6
/* zh-Hans */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.plist.strings
;
name
=
"zh-Hans"
;
path
=
"zh-Hans.lproj/Main.strings"
;
sourceTree
=
"<group>"
;
};
A954DD9225222C4600C2DDB6
/* zh-Hans */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.plist.strings
;
name
=
"zh-Hans"
;
path
=
"zh-Hans.lproj/LaunchScreen.strings"
;
sourceTree
=
"<group>"
;
};
A959322D25245F4800968A92
/* NSString+Extensions.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"NSString+Extensions.h"
;
sourceTree
=
"<group>"
;
};
A959322E25245F4800968A92
/* NSString+Extensions.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"NSString+Extensions.m"
;
sourceTree
=
"<group>"
;
};
A95A76832521D70F003B4E1C
/* DDSoundWaveView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
DDSoundWaveView.h
;
sourceTree
=
"<group>"
;
};
A95A76842521D70F003B4E1C
/* UIView+LayoutMethods.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"UIView+LayoutMethods.m"
;
sourceTree
=
"<group>"
;
};
A95A76852521D70F003B4E1C
/* DDSoundWaveView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
DDSoundWaveView.m
;
sourceTree
=
"<group>"
;
};
...
...
@@ -757,8 +760,10 @@
A94DD57F24FE37DF00B1B5A2
/* UITextField+LimitLength.m */
,
A950F5B424F4E64A007AB63E
/* UIView+CornerRadii.h */
,
A950F5B524F4E64A007AB63E
/* UIView+CornerRadii.m */
,
A95CE02D24E151340066DAE6
/* UIButton+Category.m */
,
A95CE02E24E151340066DAE6
/* UIButton+Category.h */
,
A95CE02D24E151340066DAE6
/* UIButton+Category.m */
,
A959322D25245F4800968A92
/* NSString+Extensions.h */
,
A959322E25245F4800968A92
/* NSString+Extensions.m */
,
);
path
=
OC
;
sourceTree
=
"<group>"
;
...
...
@@ -1147,6 +1152,7 @@
A95CDFE724E0EE7A0066DAE6
/* SHGuideViewController.swift in Sources */
,
A950F5AC24F39EC1007AB63E
/* SHRecordShowViewController.swift in Sources */
,
A9A16C6A2519DD6900DE0FEE
/* ChineseInclude.m in Sources */
,
A959322F25245F4800968A92
/* NSString+Extensions.m in Sources */
,
CC29A709251C71AC0059BD5C
/* SHSwift.swift in Sources */
,
A94DD57024FDF29700B1B5A2
/* XBAudioDataBuffer.m in Sources */
,
A95CDFC824E0EBF10066DAE6
/* UITabBar+Extension.swift in Sources */
,
...
...
ShorthandMaster/AppDelegate.swift
View file @
be186d53
...
...
@@ -20,10 +20,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
SHStoreManager
.
launchWithSwiftyStoreKit
()
UMConfigure
.
initWithAppkey
(
"5f4f1164636b2b13182afc13"
,
channel
:
"App Store"
)
SHUserAccountManager
.
shared
.
getUserInfo
({
(
model
)
in
},
failure
:
{
})
MobClick
.
event
(
"app_start"
)
SHUserAccountManager
.
shared
.
logCollection
(
with
:
.
appStart
)
...
...
ShorthandMaster/Extensions/OC/NSString+Extensions.h
0 → 100644
View file @
be186d53
//
// NSString+Extensions.h
// ShorthandMaster
//
// Created by 明津李 on 2020/9/30.
// Copyright © 2020 明津李. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface
NSString
(
Extensions
)
-
(
BOOL
)
isContainEmoji
;
@end
NS_ASSUME_NONNULL_END
ShorthandMaster/Extensions/OC/NSString+Extensions.m
0 → 100644
View file @
be186d53
//
// NSString+Extensions.m
// ShorthandMaster
//
// Created by 明津李 on 2020/9/30.
// Copyright © 2020 明津李. All rights reserved.
//
#import "NSString+Extensions.h"
@implementation
NSString
(
Extensions
)
-
(
BOOL
)
isContainEmoji
{
__block
BOOL
containsEmoji
=
NO
;
[
self
enumerateSubstringsInRange
:
NSMakeRange
(
0
,[
self
length
])
options
:
NSStringEnumerationByComposedCharacterSequences
usingBlock
:^
(
NSString
*
substring
,
NSRange
substringRange
,
NSRange
enclosingRange
,
BOOL
*
stop
)
{
const
unichar
hs
=
[
substring
characterAtIndex
:
0
];
// surrogate pair
if
(
0xd800
<=
hs
&&
hs
<=
0xdbff
)
{
if
(
substring
.
length
>
1
)
{
const
unichar
ls
=
[
substring
characterAtIndex
:
1
];
const
int
uc
=
((
hs
-
0xd800
)
*
0x400
)
+
(
ls
-
0xdc00
)
+
0x10000
;
if
(
0x1d000
<=
uc
&&
uc
<=
0x1fa95
)
{
containsEmoji
=
YES
;
}
}
}
else
if
(
substring
.
length
>
1
)
{
const
unichar
ls
=
[
substring
characterAtIndex
:
1
];
if
(
ls
==
0x20e3
||
ls
==
0xfe0f
||
ls
==
0xd83c
)
{
containsEmoji
=
YES
;
}
}
else
{
// non surrogate
if
(
0x2100
<=
hs
&&
hs
<=
0x27ff
)
{
containsEmoji
=
YES
;
}
else
if
(
0x2B05
<=
hs
&&
hs
<=
0x2b07
)
{
containsEmoji
=
YES
;
}
else
if
(
0x2934
<=
hs
&&
hs
<=
0x2935
)
{
containsEmoji
=
YES
;
}
else
if
(
0x3297
<=
hs
&&
hs
<=
0x3299
)
{
containsEmoji
=
YES
;
}
else
if
(
hs
==
0xa9
||
hs
==
0xae
||
hs
==
0x303d
||
hs
==
0x3030
||
hs
==
0x2b55
||
hs
==
0x2b1c
||
hs
==
0x2b1b
||
hs
==
0x2b50
)
{
containsEmoji
=
YES
;
}
}
if
(
containsEmoji
)
{
*
stop
=
YES
;
}
}];
return
containsEmoji
;
}
@end
ShorthandMaster/Mine/Mine.storyboard
View file @
be186d53
...
...
@@ -37,12 +37,15 @@
</label>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"pga-Oe-RdW"
>
<rect
key=
"frame"
x=
"268.5"
y=
"43"
width=
"100"
height=
"36"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"100"
id=
"eGT-PR-dcF"
/>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<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"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"解除限制,使用速记大师高级版"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
numberOfLines=
"0"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"jRc-7Y-1Ab"
>
<rect
key=
"frame"
x=
"45.5"
y=
"64.5"
width=
"200"
height=
"17"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<color
key=
"textColor"
red=
"0.70588235294117641"
green=
"0.72549019607843135"
blue=
"0.76078431372549016"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
...
...
@@ -57,6 +60,7 @@
<constraint
firstItem=
"pga-Oe-RdW"
firstAttribute=
"centerY"
secondItem=
"Dlc-aa-4II"
secondAttribute=
"centerY"
id=
"XOz-EB-0Yp"
/>
<constraint
firstItem=
"jRc-7Y-1Ab"
firstAttribute=
"leading"
secondItem=
"OKo-oR-OPp"
secondAttribute=
"leading"
id=
"YBo-cb-F6X"
/>
<constraint
firstItem=
"Dlc-aa-4II"
firstAttribute=
"width"
secondItem=
"q9z-Kj-BbN"
secondAttribute=
"width"
multiplier=
"365:375"
id=
"YxQ-qE-Yby"
/>
<constraint
firstItem=
"pga-Oe-RdW"
firstAttribute=
"leading"
relation=
"greaterThanOrEqual"
secondItem=
"jRc-7Y-1Ab"
secondAttribute=
"trailing"
constant=
"10"
id=
"f9x-tl-f5t"
/>
<constraint
firstItem=
"Dlc-aa-4II"
firstAttribute=
"centerX"
secondItem=
"q9z-Kj-BbN"
secondAttribute=
"centerX"
id=
"hMY-yy-w8p"
/>
<constraint
firstItem=
"pga-Oe-RdW"
firstAttribute=
"trailing"
secondItem=
"Dlc-aa-4II"
secondAttribute=
"trailing"
constant=
"-40"
id=
"voQ-wo-cl9"
/>
<constraint
firstItem=
"OKo-oR-OPp"
firstAttribute=
"centerY"
secondItem=
"Dlc-aa-4II"
secondAttribute=
"centerY"
multiplier=
"0.66"
id=
"yFN-6A-wS5"
/>
...
...
ShorthandMaster/Mine/SHMineViewController.swift
View file @
be186d53
...
...
@@ -160,7 +160,6 @@ extension SHMineViewController:UITableViewDelegate, UITableViewDataSource{
switch
indexPath
.
row
{
case
0
:
let
webView
=
SHWebViewController
()
print
(
SHUserAccountManager
.
shared
.
h5_urlDic
[
"user"
]
as?
String
)
webView
.
url
=
SHUserAccountManager
.
shared
.
h5_urlDic
[
"user"
]
as?
String
webView
.
title
=
"用户协议"
self
.
navigationController
?
.
pushViewController
(
webView
,
animated
:
true
)
...
...
ShorthandMaster/Record/SHRecordDetailsVC.swift
View file @
be186d53
...
...
@@ -128,6 +128,14 @@ class SHRecordDetailsVC: SHBaseViewController {
self
.
tableView
?
.
reloadData
()
}
}
DispatchQueue
.
main
.
async
{
if
self
.
currentModel
.
dataSources
.
count
==
0
{
self
.
navigationItem
.
rightBarButtonItem
?
.
tintColor
=
UIColor
.
init
(
hexStr
:
"999999"
)
}
else
{
self
.
navigationItem
.
rightBarButtonItem
?
.
tintColor
=
UIColor
.
init
(
hexStr
:
"4183F4"
)
}
}
}
@objc
func
editClick
(
_
restore
:
Bool
){
...
...
ShorthandMaster/Record/SHRecordListViewController.swift
View file @
be186d53
...
...
@@ -62,6 +62,8 @@ class SHRecordListViewController: SHBaseViewController {
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
let
s
:
Bool
=
"asdasdas🐂aadsasddadas"
.
isContainEmoji
()
SHCloudManager
.
shared
.
getAllFolderDataSource
{
(
result
,
models
)
in
if
result
{
...
...
@@ -284,11 +286,20 @@ class SHRecordListViewController: SHBaseViewController {
}
@objc
func
preposeMember
(){
SHUserAccountManager
.
shared
.
getNovelInfo
{
(
json
)
in
if
SHUserAccountManager
.
shared
.
isMember
==
false
&&
SHUserAccountManager
.
shared
.
isStartFront
==
true
{
self
.
goGoods
(
"home_pop"
)
SHUserAccountManager
.
shared
.
getUserInfo
({
(
model
)
in
SHUserAccountManager
.
shared
.
getNovelInfo
{
(
json
)
in
if
SHUserAccountManager
.
shared
.
isMember
==
false
&&
SHUserAccountManager
.
shared
.
isStartFront
==
true
{
self
.
goGoods
(
"home_pop"
)
}
}
}
self
.
advertBtn
?
.
isHidden
=
SHUserAccountManager
.
shared
.
isMember
self
.
bottomHeight
?
.
constant
=
SHUserAccountManager
.
shared
.
isMember
?
44
:
84
},
failure
:
{
})
}
@IBAction
func
advertBtnClick
(){
...
...
@@ -317,6 +328,12 @@ extension SHRecordListViewController {
}
CRUserDefaults
.
recordList
=
list
}
if
deleteModel
.
dataSources
.
count
==
0
{
SHCloudManager
.
shared
.
deleteFolder
(
deleteModel
)
{
(
result
,
models
)
in
}
}
self
.
dataSources
.
remove
(
at
:
indexPath
.
row
)
self
.
tableView
?
.
beginUpdates
()
...
...
@@ -351,12 +368,17 @@ extension SHRecordListViewController {
var
subDic
=
dic
subDic
[
"name"
]
=
renameStr
list
[
index
]
=
subDic
selectModel
.
name
=
renameStr
break
}
}
CRUserDefaults
.
recordList
=
list
}
SHCloudManager
.
shared
.
modifyFolder
(
selectModel
)
{
(
result
,
models
)
in
}
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
.
milliseconds
(
333
))
{
self
.
prepareDateSource
()
}
...
...
ShorthandMaster/Record/SHRecordMoveFileVC.swift
View file @
be186d53
...
...
@@ -116,7 +116,7 @@ class SHRecordMoveFileVC: SHBaseViewController {
}
}
*/
if
SHUserAccountManager
.
shared
.
isMember
==
false
&&
self
.
dataSources
.
count
>
0
{
if
SHUserAccountManager
.
shared
.
isMember
==
false
&&
self
.
dataSources
.
count
>
=
0
{
self
.
goGoods
(
"new_notebook_add"
)
return
}
...
...
ShorthandMaster/Share/Managers/SHCloudManager.swift
View file @
be186d53
...
...
@@ -85,7 +85,7 @@ class SHCloudManager: NSObject {
}
else
{
self
.
folderResults
=
records
??
[]
self
.
getAllRecordDataSource
(
handler
)
//
self.cleanAllFolder()
//
self.cleanAllFolder()
}
}
}
else
{
...
...
@@ -115,7 +115,7 @@ class SHCloudManager: NSObject {
self
.
recordResults
=
records
??
[]
self
.
mapDataSource
()
self
.
completionHandler
?(
true
,
self
.
icloudFolderModels
)
//
self.cleanAllRecord()
//
self.cleanAllRecord()
}
}
}
else
{
...
...
@@ -343,6 +343,7 @@ class SHCloudManager: NSObject {
let
nowDate
=
Date
()
record
?[
"recordPaths"
]
=
recordPaths
record
?[
"modifyDate"
]
=
nowDate
record
?[
"name"
]
=
folderModel
.
name
self
.
dateBase
.
save
(
record
!
)
{
(
saveRecord
,
saveError
)
in
if
let
error
=
saveError
{
...
...
ShorthandMaster/Share/Managers/SHUserAccountManager.swift
View file @
be186d53
...
...
@@ -34,7 +34,7 @@ import SwiftyJSON
@objc
var
isMember
:
Bool
{
return
true
//
return true
let
dateFormatter
=
DateFormatter
()
dateFormatter
.
locale
=
Locale
(
identifier
:
"en_CN"
)
...
...
ShorthandMaster/ShorthandMaster-Bridging-Header.h
View file @
be186d53
...
...
@@ -5,7 +5,7 @@
#import "MBProgressHUD+MJ.h"
#import "AESCipher.h"
#import "UIView+CornerRadii.h"
#import "NSString+Extensions.h"
#import "SHMp3RecordManager.h"
#import "SHMemberUpgradeAlertView.h"
...
...
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