diff --git a/.DS_Store b/.DS_Store index 8aeb8d7..df46f5a 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Ifish.xcodeproj/project.pbxproj b/Ifish.xcodeproj/project.pbxproj index 9380e56..38c3503 100644 --- a/Ifish.xcodeproj/project.pbxproj +++ b/Ifish.xcodeproj/project.pbxproj @@ -15777,7 +15777,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = WFX8GD5HFX; ENABLE_BITCODE = NO; ENABLE_TESTABILITY = YES; @@ -15895,7 +15895,7 @@ CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = WFX8GD5HFX; ENABLE_BITCODE = NO; ENABLE_TESTABILITY = YES; diff --git a/Ifish/Common/CommonUtils.m b/Ifish/Common/CommonUtils.m index ed4686d..e5a2e23 100644 --- a/Ifish/Common/CommonUtils.m +++ b/Ifish/Common/CommonUtils.m @@ -519,7 +519,7 @@ CGAffineTransform GetCGAffineTransformRotateAroundPoint(float centerX, float ce } + (BOOL)isIphoneX { if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { - return [[UIScreen mainScreen] bounds].size.height >= 812.0f; + return ([[UIApplication sharedApplication] statusBarFrame].size.height> 20); }else{ return NO; } diff --git a/Ifish/Utinitys/Define.h b/Ifish/Utinitys/Define.h index 3a532ab..484e7c1 100644 --- a/Ifish/Utinitys/Define.h +++ b/Ifish/Utinitys/Define.h @@ -81,6 +81,10 @@ alpha:1.0] #define MAINSCREEN_SCALE [[UIScreen mainScreen] scale] #define KWidth_Scale [UIScreen mainScreen].bounds.size.width/375.0f +#define IS_iPhoneX [CommonUtils isIphoneX] +#define TabbarHeight (IS_iPhoneX?83:49) +#define MyNavBarHeight (IS_iPhoneX?88:64) +#define StatusBarHeight (IS_iPhoneX?[[UIApplication sharedApplication] statusBarFrame].size.height:20) #import "MyControl.h" #import "DataCenter.h" #import "UserModel.h" diff --git a/Ifish/Utinitys/EGOCache/EGOCache.h b/Ifish/Utinitys/EGOCache/EGOCache.h index ab84607..6490587 100755 --- a/Ifish/Utinitys/EGOCache/EGOCache.h +++ b/Ifish/Utinitys/EGOCache/EGOCache.h @@ -66,6 +66,7 @@ FOUNDATION_EXPORT const unsigned char EGOCacheVersionString[]; - (NSString* __nullable)stringForKey:(NSString* __nonnull)key; - (void)setString:(NSString* __nonnull)aString forKey:(NSString* __nonnull)key; +- (void)setSynString:(NSString*)aString forKey:(NSString*)key; - (void)setString:(NSString* __nonnull)aString forKey:(NSString* __nonnull)key withTimeoutInterval:(NSTimeInterval)timeoutInterval; - (NSDate* __nullable)dateForKey:(NSString* __nonnull)key; diff --git a/Ifish/Utinitys/EGOCache/EGOCache.m b/Ifish/Utinitys/EGOCache/EGOCache.m index de8abda..262d966 100755 --- a/Ifish/Utinitys/EGOCache/EGOCache.m +++ b/Ifish/Utinitys/EGOCache/EGOCache.m @@ -274,6 +274,13 @@ static inline NSString* cachePathForKey(NSString* directory, NSString* key) { - (void)setString:(NSString*)aString forKey:(NSString*)key { [self setString:aString forKey:key withTimeoutInterval:self.defaultTimeoutInterval]; } +- (void)setSynString:(NSString*)aString forKey:(NSString*)key { + CHECK_FOR_EGOCACHE_PLIST(); + NSString* cachePath = cachePathForKey(_directory, key); + [[aString dataUsingEncoding:NSUTF8StringEncoding] writeToFile:cachePath atomically:YES]; + [self setCacheTimeoutInterval:self.defaultTimeoutInterval forKey:key]; +} + - (void)setString:(NSString*)aString forKey:(NSString*)key withTimeoutInterval:(NSTimeInterval)timeoutInterval { [self setData:[aString dataUsingEncoding:NSUTF8StringEncoding] forKey:key withTimeoutInterval:timeoutInterval]; diff --git a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PMonitorController.m b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PMonitorController.m index 19c6aad..66cbcf1 100644 --- a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PMonitorController.m +++ b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PMonitorController.m @@ -632,7 +632,7 @@ Strong UIImage *screenShotImage;//截图 //布防撤防、对讲、截图工具栏 ****** 云台 - CameraBottomHView *bottomToolHView = [[CameraBottomHView alloc] initWithFrame:CGRectMake(0.0, CGRectGetMaxY(self.segControl.frame) + 10, width, height-CGRectGetMaxY(self.segControl.frame))]; + CameraBottomHView *bottomToolHView = [[CameraBottomHView alloc] initWithFrame:CGRectMake(0.0, CGRectGetMaxY(self.segControl.frame) + 10, width, height-CGRectGetMaxY(self.segControl.frame)- MyNavBarHeight -10)]; bottomToolHView.cameraHViewDelegate = self; bottomToolHView.camera = self.contact; [self.view addSubview:bottomToolHView]; @@ -640,7 +640,7 @@ Strong UIImage *screenShotImage;//截图 self.bottomToolHView.hidden = NO; //底部view 水族箱view - UIView *bottomHView = [[UIView alloc] initWithFrame:CGRectMake(0.0, CGRectGetMaxY(self.segControl.frame) + 10, width, height-CGRectGetMaxY(self.segControl.frame)-10)]; + UIView *bottomHView = [[UIView alloc] initWithFrame:CGRectMake(0.0, CGRectGetMaxY(self.segControl.frame) + 10, width, height-CGRectGetMaxY(self.segControl.frame)-10-MyNavBarHeight)]; bottomHView.backgroundColor = JWUIColorFromRGB(0xdddddd); [self.view addSubview:bottomHView]; self.bottomFishHView = bottomHView; diff --git a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PPlayBack/CameraNoParyBackVideoView.m b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PPlayBack/CameraNoParyBackVideoView.m index b7b647d..9be5d95 100644 --- a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PPlayBack/CameraNoParyBackVideoView.m +++ b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PPlayBack/CameraNoParyBackVideoView.m @@ -22,7 +22,7 @@ if (self) { CGFloat viewH =200; - UIView *holdView = [[UIView alloc] initWithFrame:CGRectMake(0,frame.size.height/2 -viewH, kScreenSize.width, viewH)]; + UIView *holdView = [[UIView alloc] initWithFrame:self.bounds]; self.backgroundColor = TABLE_BACKGROUD_COLOR; holdView.backgroundColor = TABLE_BACKGROUD_COLOR; //self.backgroundColor = [UIColor redColor]; @@ -55,15 +55,15 @@ if (self.dataType == noDataViewTypeNOSDCard) { - CGFloat imgX = self.frame.size.width/2 - 110*KWidth_Scale/2; - self.backImg.frame =CGRectMake(imgX ,kScreenSize.height/4,110*KWidth_Scale, 110*KWidth_Scale*0.82); + CGFloat imgX = self.frame.size.width/2 - 110/2; + self.backImg.frame =CGRectMake(imgX,(self.frame.size.height-110*0.82)/2, 110, 110*0.82); self.title.frame =CGRectMake(0, CGRectGetMaxY(self.backImg.frame) + 20 , self.frame.size.width,20); self.subTitle.frame = CGRectMake(0, CGRectGetMaxY(self.title.frame) + 10, self.frame.size.width,20); }else{ - CGFloat imgX = self.frame.size.width/2 - 90*KWidth_Scale/2; - self.backImg.frame =CGRectMake(imgX ,kScreenSize.height/4,90*KWidth_Scale, 90*KWidth_Scale*0.86); + CGFloat imgX = self.frame.size.width/2 - 110/2; + self.backImg.frame =CGRectMake(imgX,(self.frame.size.height-110*0.82)/2, 110, 110*0.82); self.title.frame =CGRectMake(0, CGRectGetMaxY(self.backImg.frame) + 23 , self.frame.size.width,20); //self.backgroundColor = [UIColor blueColor]; } diff --git a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PPlayBack/IfishP2PPlayBackListViewController.m b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PPlayBack/IfishP2PPlayBackListViewController.m index 6e884c2..07ac4e4 100644 --- a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PPlayBack/IfishP2PPlayBackListViewController.m +++ b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PPlayBack/IfishP2PPlayBackListViewController.m @@ -73,6 +73,7 @@ if (success) { self.hasSDCard=YES; + [self initNoSDDataViewHidden:YES]; } else { @@ -164,8 +165,8 @@ NSString *string = [formatter stringFromDate:nowDate]; // [self.startBtn setTitle:[formatter stringFromDate:[nowDate dateByAddingTimeInterval:-60*60]] forState:UIControlStateNormal]; [self.endBtn setTitle:string forState:UIControlStateNormal]; - self.startDate=nowDate; - self.startDate=[nowDate dateByAddingTimeInterval:-60*60*2]; + self.startDate=[nowDate dateByAddingTimeInterval:-60*60]; + self.endDate=nowDate; } - (IBAction)startTimeClick:(UIButton *)sender { @@ -215,6 +216,10 @@ } - (IBAction)searchClick:(UIButton *)sender { + if ([self.startDate compare:self.endDate]==NSOrderedDescending) { + [self.view makeToast:@"开始时间必须小于结束时间"]; + return;; + } [MBProgressHUD showHUDAddedTo:self.view animated:YES]; [[GWP2PClient sharedClient] getDevicePlaybackFilesWithDeviceID:self.camera.cameraId devicePassword:self.camera.cameraPass startDate:self.startDate endDate:self.endDate completionBlock:^(GWP2PClient *client, BOOL success, NSDictionary *dataDictionary) { [MBProgressHUD hideHUDForView:self.view animated:YES]; @@ -226,6 +231,7 @@ NSArray*files=dataDictionary[@"files"]; if ([files isKindOfClass:[NSArray class]]&&files.count) { + [self initNoVideoDataViewHidden:YES]; [self.playbackFiles addObjectsFromArray:files]; [self.tableView reloadData]; @@ -238,6 +244,7 @@ else { [self initNoVideoDataViewHidden:NO]; + [self connectDevice]; } }]; } @@ -290,6 +297,7 @@ [self.navigationController pushViewController:play animated:YES]; + [tableView deselectRowAtIndexPath:indexPath animated:YES]; } diff --git a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PPlayBack/IfishP2PPlayBackListViewController.xib b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PPlayBack/IfishP2PPlayBackListViewController.xib index 985a991..d522aaa 100644 --- a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PPlayBack/IfishP2PPlayBackListViewController.xib +++ b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/IfishP2PPlayBack/IfishP2PPlayBackListViewController.xib @@ -48,15 +48,15 @@ - +