Skip to content

Commit 4d55199

Browse files
committed
- 适配 iOS 16 / iPadOS 16 / macOS Ventura
- 修复简记超过26条后闪退问题 - 优化应用细节和体验
1 parent 62c4e0f commit 4d55199

File tree

19 files changed

+650
-82
lines changed

19 files changed

+650
-82
lines changed

SecurityNote.xcodeproj/project.pbxproj

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
6D071E871999B14B003A9F8D /* TCMeController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D071E861999B14B003A9F8D /* TCMeController.m */; };
1717
6D09BA65199F0B1B009363FF /* TCAddMemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D09BA64199F0B1B009363FF /* TCAddMemoViewController.m */; };
1818
6D09E4B6199CB6F600CEA8B3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D09E4B4199CB6F600CEA8B3 /* Main.storyboard */; };
19+
6D0B412629837C5C006F8C18 /* UserFeedBack.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D0B412529837C5C006F8C18 /* UserFeedBack.framework */; };
1920
6D172EDB19DA4626004E0B96 /* TCEditMemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D172EDA19DA4626004E0B96 /* TCEditMemoViewController.m */; };
2021
6D172EDE19DA4640004E0B96 /* TCMemo.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D172EDD19DA4640004E0B96 /* TCMemo.m */; };
2122
6D172EE119DA464D004E0B96 /* TCMemoTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D172EE019DA464D004E0B96 /* TCMemoTool.m */; };
@@ -39,7 +40,6 @@
3940
6D2C0FAB2157F24C00C37783 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D2C0F972157F24C00C37783 /* MBProgressHUD.m */; };
4041
6D2C0FAC2157F24C00C37783 /* MBProgressHUD+MJ.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D2C0F9A2157F24C00C37783 /* MBProgressHUD+MJ.m */; };
4142
6D2C0FAD2157F24C00C37783 /* MBProgressHUD.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6D2C0F9B2157F24C00C37783 /* MBProgressHUD.bundle */; };
42-
6D2C0FAE2157F24C00C37783 /* libBaiduMobStat.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D2C0F9D2157F24C00C37783 /* libBaiduMobStat.a */; };
4343
6D2C0FAF2157F24C00C37783 /* FMDatabaseQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D2C0FA12157F24C00C37783 /* FMDatabaseQueue.m */; };
4444
6D2C0FB02157F24C00C37783 /* FMDatabaseAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D2C0FA42157F24C00C37783 /* FMDatabaseAdditions.m */; };
4545
6D2C0FB12157F24C00C37783 /* FMDatabase.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D2C0FA52157F24C00C37783 /* FMDatabase.m */; };
@@ -122,6 +122,7 @@
122122
6DC4A9CF1A43388E007CEC75 /* help@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6DC4A9CE1A43388E007CEC75 /* help@2x.png */; };
123123
6DEB8A7A19D19A04004D842A /* cluck@2x.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 6DEB8A7919D19A04004D842A /* cluck@2x.jpg */; };
124124
6DF62184199E1C780026026C /* TCAddSimpleNoteViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DF62183199E1C780026026C /* TCAddSimpleNoteViewController.m */; };
125+
6DF6A243296B03F700AB7052 /* libBaiduMobStat.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D2C0F9D2157F24C00C37783 /* libBaiduMobStat.a */; };
125126
/* End PBXBuildFile section */
126127

127128
/* Begin PBXContainerItemProxy section */
@@ -152,6 +153,7 @@
152153
6D09E4A5199C70DB00CEA8B3 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
153154
6D09E4A6199C70DB00CEA8B3 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
154155
6D09E4B5199CB6F600CEA8B3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
156+
6D0B412529837C5C006F8C18 /* UserFeedBack.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = UserFeedBack.framework; sourceTree = "<group>"; };
155157
6D172ED919DA4626004E0B96 /* TCEditMemoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TCEditMemoViewController.h; sourceTree = "<group>"; };
156158
6D172EDA19DA4626004E0B96 /* TCEditMemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TCEditMemoViewController.m; sourceTree = "<group>"; };
157159
6D172EDC19DA4640004E0B96 /* TCMemo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TCMemo.h; sourceTree = "<group>"; };
@@ -336,13 +338,14 @@
336338
buildActionMask = 2147483647;
337339
files = (
338340
6D06A3A3227C861A00606D2A /* SafariServices.framework in Frameworks */,
341+
6DF6A243296B03F700AB7052 /* libBaiduMobStat.a in Frameworks */,
339342
6DC36430199886B6008A9CDE /* CoreGraphics.framework in Frameworks */,
340343
6D195B531EBB7AF30081D227 /* StoreKit.framework in Frameworks */,
341344
6D195B511EBB7AED0081D227 /* WebKit.framework in Frameworks */,
342345
6D195B4F1EBB7AE20081D227 /* libc++.tbd in Frameworks */,
346+
6D0B412629837C5C006F8C18 /* UserFeedBack.framework in Frameworks */,
343347
6D195B4D1EBB7AD10081D227 /* libz.1.2.5.tbd in Frameworks */,
344348
6D195B4B1EBB7AC50081D227 /* SystemConfiguration.framework in Frameworks */,
345-
6D2C0FAE2157F24C00C37783 /* libBaiduMobStat.a in Frameworks */,
346349
6D195B491EBB7ABF0081D227 /* JavaScriptCore.framework in Frameworks */,
347350
6D195B471EBB7AB90081D227 /* CoreTelephony.framework in Frameworks */,
348351
6D195B451EBB7AB30081D227 /* CoreLocation.framework in Frameworks */,
@@ -511,6 +514,7 @@
511514
children = (
512515
6D2C0F9D2157F24C00C37783 /* libBaiduMobStat.a */,
513516
6D2C0F9E2157F24C00C37783 /* BaiduMobStat.h */,
517+
6D0B412529837C5C006F8C18 /* UserFeedBack.framework */,
514518
);
515519
path = baidu_ios_api;
516520
sourceTree = "<group>";
@@ -1327,9 +1331,12 @@
13271331
CLANG_ENABLE_MODULES = YES;
13281332
CODE_SIGN_IDENTITY = "iPhone Developer";
13291333
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1330-
CURRENT_PROJECT_VERSION = 2021.03.26;
1334+
CURRENT_PROJECT_VERSION = 2023.01.28;
13311335
ENABLE_BITCODE = NO;
1332-
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
1336+
FRAMEWORK_SEARCH_PATHS = (
1337+
"$(inherited)",
1338+
"$(PROJECT_DIR)/SecurityNote/Thirdparty/baidu_ios_api",
1339+
);
13331340
GCC_PRECOMPILE_PREFIX_HEADER = YES;
13341341
GCC_PREFIX_HEADER = "SecurityNote/SecurityNote-Prefix.pch";
13351342
INFOPLIST_FILE = "SecurityNote/SecurityNote-Info.plist";
@@ -1339,7 +1346,7 @@
13391346
"$(inherited)",
13401347
"$(PROJECT_DIR)/SecurityNote/Thirdparty/baidu_ios_api",
13411348
);
1342-
MARKETING_VERSION = 8.3.0;
1349+
MARKETING_VERSION = 9.0.0;
13431350
OTHER_LDFLAGS = "-ObjC";
13441351
PRODUCT_BUNDLE_IDENTIFIER = securitynote;
13451352
PRODUCT_MODULE_NAME = SecurityNote;
@@ -1360,9 +1367,12 @@
13601367
CLANG_ENABLE_MODULES = YES;
13611368
CODE_SIGN_IDENTITY = "iPhone Developer";
13621369
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1363-
CURRENT_PROJECT_VERSION = 2021.03.26;
1370+
CURRENT_PROJECT_VERSION = 2023.01.28;
13641371
ENABLE_BITCODE = NO;
1365-
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
1372+
FRAMEWORK_SEARCH_PATHS = (
1373+
"$(inherited)",
1374+
"$(PROJECT_DIR)/SecurityNote/Thirdparty/baidu_ios_api",
1375+
);
13661376
GCC_PRECOMPILE_PREFIX_HEADER = YES;
13671377
GCC_PREFIX_HEADER = "SecurityNote/SecurityNote-Prefix.pch";
13681378
INFOPLIST_FILE = "SecurityNote/SecurityNote-Info.plist";
@@ -1372,7 +1382,7 @@
13721382
"$(inherited)",
13731383
"$(PROJECT_DIR)/SecurityNote/Thirdparty/baidu_ios_api",
13741384
);
1375-
MARKETING_VERSION = 8.3.0;
1385+
MARKETING_VERSION = 9.0.0;
13761386
OTHER_LDFLAGS = "-ObjC";
13771387
PRODUCT_BUNDLE_IDENTIFIER = securitynote;
13781388
PRODUCT_MODULE_NAME = SecurityNote;

SecurityNote/Diary/C/TCDiaryViewController.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ - (void)viewDidLoad
4949
dairyTab.delegate = self;
5050
dairyTab.dataSource = self;
5151

52+
if (@available(iOS 15.0, *)) {
53+
dairyTab.sectionHeaderTopPadding = 0.0;
54+
}
55+
5256
self.diaryTable = dairyTab;
5357
[self.view addSubview:dairyTab];
5458

@@ -131,7 +135,7 @@ - (void)panView:(UIPanGestureRecognizer *)pan
131135
//点击增加按钮,进入添加简记
132136
-(void)addNew:(UIImageView* )add
133137
{
134-
[UIImageView animateWithDuration:0.3 animations:^{
138+
[UIImageView animateWithDuration:0.15 animations:^{
135139

136140
add.layer.transform = CATransform3DMakeScale(2, 2, 0);
137141
add.alpha = 0;

SecurityNote/Me/TCRewardTableViewController.m

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
6060
}
6161

6262
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
63-
return 3;
63+
return 4;
6464
}
6565

6666
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
@@ -96,6 +96,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
9696
case 2:
9797
cell.textLabel.text = @"打赏1杯咖啡☕";
9898
break;
99+
case 3:
100+
cell.textLabel.text = @"高级VIP月卡🧑‍💻";
101+
break;
99102
default:
100103
break;
101104
}
@@ -118,6 +121,9 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
118121
case 2:
119122
goodsID = @"com.iHTCboy.iNote.coffee";
120123
break;
124+
case 3:
125+
goodsID = @"com.iHTCboy.iNote.month";
126+
break;
121127
default:
122128
break;
123129
}
@@ -166,6 +172,10 @@ - (void) paymentQueue:(SKPaymentQueue*)queue updatedTransactions:(NSArray*)trans
166172

167173
break;
168174
case SKPaymentTransactionStatePurchased:{
175+
NSURL *receiptUrl=[[NSBundle mainBundle] appStoreReceiptURL];
176+
NSData *receiptData=[NSData dataWithContentsOfURL:receiptUrl];
177+
NSString *receiptString=[receiptData base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed];//交易凭证转化为base64字符串
178+
NSLog(@"receiptString: %@", receiptString);
169179
// demo 可以这样完成交易,但实际还是要真的发货成功才调用
170180
[[SKPaymentQueue defaultQueue] finishTransaction:transaction];
171181

SecurityNote/Memo/C/TCMeMoViewController.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ - (void)viewDidLoad
4747
memoTable.delegate = self;
4848
memoTable.dataSource = self;
4949

50+
if (@available(iOS 15.0, *)) {
51+
memoTable.sectionHeaderTopPadding = 0.0;
52+
}
53+
5054
self.memoTable = memoTable;
5155
[self.view addSubview:memoTable];
5256

@@ -131,7 +135,7 @@ -(void)viewWillAppear:(BOOL)animated
131135
//点击增加按钮,进入添加简记
132136
-(void)addNew:(UIImageView* )add
133137
{
134-
[UIImageView animateWithDuration:0.3 animations:^{
138+
[UIImageView animateWithDuration:0.15 animations:^{
135139

136140
add.layer.transform = CATransform3DMakeScale(2, 2, 0);
137141
add.alpha = 0;

SecurityNote/SimpleNote/C/TCSimpleNoteViewController.m

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ - (void)viewDidLoad
6161
simpleTable.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
6262
simpleTable.delegate = self;
6363
simpleTable.dataSource = self;
64+
if (@available(iOS 15.0, *)) {
65+
simpleTable.sectionHeaderTopPadding = 0.0;
66+
}
67+
6468
self.simpleTable = simpleTable;
6569
[self.view addSubview:simpleTable];
6670

@@ -184,7 +188,7 @@ -(void)viewDidAppear:(BOOL)animated
184188
-(void)addNew:(UIImageView* )add
185189
{
186190

187-
[UIView animateWithDuration:0.3 animations:^{
191+
[UIView animateWithDuration:0.15 animations:^{
188192

189193
add.layer.transform = CATransform3DMakeScale(2, 2, 0);
190194
add.alpha = 0;
@@ -336,6 +340,13 @@ -(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEdi
336340
//拿到当前要删除的列表的所在分区
337341
self.TCnote = self.noteDatas[[indexPath section]];
338342

343+
// overlength
344+
if (self.TCnote.count > 26) {
345+
UIAlertView * alter = [[UIAlertView alloc] initWithTitle:@"提示" message:@"最多26条简记项~" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil];
346+
[alter show];
347+
return;
348+
}
349+
339350
//更改列表文字
340351
[[self.TCnote.datas objectAtIndex:0] insertObject:@"新简记" atIndex:[indexPath row] + 1 ];
341352

SecurityNote/SimpleNote/M/TCSimpleNoteTool.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ +(NSMutableArray *)queryWithSql
8989
for (int i = 0; i < datanote.count; i++)
9090
{
9191

92-
[oneData addObject:[rs stringForColumnIndex:i+2]];
93-
92+
id result = [rs stringForColumnIndex:i+2];
93+
[oneData addObject:result ? result : @"--- overlength"];
9494
}
9595

9696
[datanote.datas addObject:oneData];

SecurityNote/SimpleNote/V/TCAddSimpleNoteViewController.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ -(void)addButten
121121

122122
-(void)addRow:(UIImageView* )add
123123
{
124+
// overlength
125+
if (self.noteArray.count > 26) {
126+
UIAlertView * alter = [[UIAlertView alloc] initWithTitle:@"提示" message:@"最多26条简记项~" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil];
127+
[alter show];
128+
return;
129+
}
130+
124131
[UIView animateWithDuration:0.1 animations:^{
125132

126133
add.layer.transform = CATransform3DMakeScale(1.3, 1.3, 0);

0 commit comments

Comments
 (0)