Skip to content

Commit dd3b139

Browse files
committed
bugfix
1 parent 6e4e84c commit dd3b139

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Coding_iOS/Ease_2FA/Controllers/ZXScanCodeViewController.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ - (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputMetadataObjects:
185185
}
186186

187187
- (void)analyseResult:(AVMetadataMachineReadableCodeObject *)result{
188+
if (![result isKindOfClass:[AVMetadataMachineReadableCodeObject class]]) {
189+
return;
190+
}
188191
NSString *resultStr = result.stringValue;
189192
if (resultStr.length <= 0) {
190193
return;

Coding_iOS/Views/ActivityMonScrollView.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ - (void)setStartMon:(NSInteger)startMon {
9898

9999
NSArray *monArray = @[@"Dec", @"Jan", @"Feb", @"Mar", @"Apr", @"May", @"Jun", @"Jul", @"Aug", @"Sep", @"Oct", @"Nov"];
100100
for (NSInteger i = _startMon; i < _startMon + KMon; i++) {
101-
NSString *mon = monArray[i % KMon];
101+
NSString *mon = monArray[(i + 1) % KMon];//UI 元素的位置是下个月开始的位置,所以月份也显示成下个月
102102
UILabel *label = _monLabelArray[i - _startMon];
103103
label.text = mon;
104104
}

0 commit comments

Comments
 (0)