diff --git a/GIGA.xcodeproj/project.pbxproj b/GIGA.xcodeproj/project.pbxproj index 62d8432..551473d 100644 --- a/GIGA.xcodeproj/project.pbxproj +++ b/GIGA.xcodeproj/project.pbxproj @@ -11,6 +11,7 @@ 83048481214F489000603CE7 /* GiGaUserJobViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 83048480214F488F00603CE7 /* GiGaUserJobViewCell.m */; }; 83048486214FACE700603CE7 /* JobMaskButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 83048485214FACE700603CE7 /* JobMaskButton.m */; }; 8314D2112133ABE500B458BF /* WeiIXinApiManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8314D2102133ABE500B458BF /* WeiIXinApiManager.m */; }; + 83276187216F29A800C6216C /* LXCustomActionSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = 83276185216F29A800C6216C /* LXCustomActionSheet.m */; }; 83346AC0212BB50A0054D597 /* PassWordResetVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 83346ABE212BB50A0054D597 /* PassWordResetVC.m */; }; 83346AC1212BB50A0054D597 /* PassWordResetVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 83346ABF212BB50A0054D597 /* PassWordResetVC.xib */; }; 83346AC5212BBC8C0054D597 /* GiGaRegistViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83346AC3212BBC8C0054D597 /* GiGaRegistViewController.m */; }; @@ -240,6 +241,7 @@ 83C78A15215873170083DDD9 /* MaskHistoryListViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 83C78A13215873170083DDD9 /* MaskHistoryListViewCell.xib */; }; 83C78A192159D74D0083DDD9 /* UIImage+LogoQrCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 83C78A182159D74D0083DDD9 /* UIImage+LogoQrCode.m */; }; 83C78A1C2159DD920083DDD9 /* UIImage+ShotImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 83C78A1B2159DD920083DDD9 /* UIImage+ShotImage.m */; }; + 83D0B92C216C5A80006B77DC /* ogg_btn.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 83D0B92B216C5A80006B77DC /* ogg_btn.mp3 */; }; 83D3832D215A2CF5009E8669 /* MaskHistryRecord.m in Sources */ = {isa = PBXBuildFile; fileRef = 83D3832C215A2CF5009E8669 /* MaskHistryRecord.m */; }; 83E40B2F21218BA0008149C4 /* GiGaUserViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83E40B2E21218BA0008149C4 /* GiGaUserViewController.m */; }; /* End PBXBuildFile section */ @@ -270,6 +272,8 @@ 8314D20F2133ABE500B458BF /* WeiIXinApiManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WeiIXinApiManager.h; sourceTree = ""; }; 8314D2102133ABE500B458BF /* WeiIXinApiManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WeiIXinApiManager.m; sourceTree = ""; }; 8314D2122133F44600B458BF /* MobClickList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MobClickList.h; sourceTree = ""; }; + 83276185216F29A800C6216C /* LXCustomActionSheet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LXCustomActionSheet.m; sourceTree = ""; }; + 83276186216F29A800C6216C /* LXCustomActionSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LXCustomActionSheet.h; sourceTree = ""; }; 83346ABD212BB50A0054D597 /* PassWordResetVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PassWordResetVC.h; sourceTree = ""; }; 83346ABE212BB50A0054D597 /* PassWordResetVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PassWordResetVC.m; sourceTree = ""; }; 83346ABF212BB50A0054D597 /* PassWordResetVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PassWordResetVC.xib; sourceTree = ""; }; @@ -677,6 +681,7 @@ 83C78A182159D74D0083DDD9 /* UIImage+LogoQrCode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIImage+LogoQrCode.m"; sourceTree = ""; }; 83C78A1A2159DD920083DDD9 /* UIImage+ShotImage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIImage+ShotImage.h"; sourceTree = ""; }; 83C78A1B2159DD920083DDD9 /* UIImage+ShotImage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ShotImage.m"; sourceTree = ""; }; + 83D0B92B216C5A80006B77DC /* ogg_btn.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = ogg_btn.mp3; sourceTree = ""; }; 83D3832B215A2CF5009E8669 /* MaskHistryRecord.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MaskHistryRecord.h; sourceTree = ""; }; 83D3832C215A2CF5009E8669 /* MaskHistryRecord.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MaskHistryRecord.m; sourceTree = ""; }; 83E40B2D21218BA0008149C4 /* GiGaUserViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaUserViewController.h; sourceTree = ""; }; @@ -734,9 +739,19 @@ name = Pods; sourceTree = ""; }; + 83276184216F29A800C6216C /* LXCustomActionsheet */ = { + isa = PBXGroup; + children = ( + 83276185216F29A800C6216C /* LXCustomActionSheet.m */, + 83276186216F29A800C6216C /* LXCustomActionSheet.h */, + ); + path = LXCustomActionsheet; + sourceTree = ""; + }; 83346AC8212BD4160054D597 /* Source */ = { isa = PBXGroup; children = ( + 83D0B92B216C5A80006B77DC /* ogg_btn.mp3 */, 8338F6B02142182100B4780B /* MaskTime.png */, 8342D9FC2131150200D16B1D /* 4481.wav */, 838388C3212F934400D14C53 /* pomodoSound.m4a */, @@ -786,6 +801,7 @@ 8340BFAC213E7374008F22E4 /* Views */ = { isa = PBXGroup; children = ( + 83276184216F29A800C6216C /* LXCustomActionsheet */, 8382DFC021564A1F00BBA5A5 /* SJPhotoPicker */, 833DE8E02150169F009D4329 /* JYAddressPicker */, 83901143214E20B1004CA790 /* LYSDatePickerController */, @@ -1826,6 +1842,7 @@ 83BFAE78213CDE91004EF801 /* GiGaSettingsViewCell.xib in Resources */, 8382DFA22155F68800BBA5A5 /* MaskActionSheetViewCell.xib in Resources */, 83346AC1212BB50A0054D597 /* PassWordResetVC.xib in Resources */, + 83D0B92C216C5A80006B77DC /* ogg_btn.mp3 in Resources */, 83BDC0592147B89900E74E0D /* GiGaAnswerViewCell.xib in Resources */, 8351473D215215C500B25A88 /* GiGAUserInfoCell.xib in Resources */, 8376B8332154A39200AB79F8 /* MaskTimeEndActionViewCell.xib in Resources */, @@ -2111,6 +2128,7 @@ 83A22712212A9EA900B3E75C /* UIView+Sizes.m in Sources */, 839290092134F4C40077D2E8 /* GiGaFlingCommitVC.m in Sources */, 834415EA215B4E6F00A6D906 /* HistoryNoDataViewCell.m in Sources */, + 83276187216F29A800C6216C /* LXCustomActionSheet.m in Sources */, 83BFAE70213CDB29004EF801 /* GiMaskTimeHistoryVC.m in Sources */, 8382DFEA21564A1F00BBA5A5 /* SJPhotoAlbumsController.m in Sources */, 83A22718212ABDFF00B3E75C /* GiGaBlockButton.m in Sources */, diff --git a/GIGA/AppDelegate+GiGaConfig.m b/GIGA/AppDelegate+GiGaConfig.m index d725daf..8171cb5 100644 --- a/GIGA/AppDelegate+GiGaConfig.m +++ b/GIGA/AppDelegate+GiGaConfig.m @@ -90,6 +90,7 @@ -(void)creatAdView{ + GiGaStartAdView *startadview = [[GiGaStartAdView alloc] initWithFrame:self.window.bounds]; [startadview show]; } diff --git a/GIGA/AppDelegate.m b/GIGA/AppDelegate.m index cd83dd5..5abdacc 100644 --- a/GIGA/AppDelegate.m +++ b/GIGA/AppDelegate.m @@ -27,7 +27,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. //[NSThread sleepForTimeInterval:1];//延迟启动 - + _isMasking = NO; [[UIApplication sharedApplication] beginReceivingRemoteControlEvents]; [self registLocalNotification]; @@ -52,7 +52,8 @@ } }]; } - + + return YES; } @@ -106,12 +107,14 @@ - (void)applicationWillTerminate:(UIApplication *)application { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - //app 挂起 面膜时间未结束 将发送本地通知提醒 + //app 挂起 面膜时间未结束 发送本地通知提醒 if (_isMasking) { // [[GiGaLocalNotificationManager localNotifiationCenter] sendLocalNotification:@"闹钟提醒!" fireTimeInterval:2 alertAction:@"面膜时间已添加闹钟提醒!" withIdentifier:kLOCALNotifiID_APPTERMINAL]; + //进程结束 长期保持后台前提下 用户主动挂起 取消本地推送。 + [[GiGaLocalNotificationManager localNotifiationCenter] cancelAllLocalNoitification]; } - + //[[GiGaLocalNotificationManager localNotifiationCenter] cancelAllLocalNoitification]; } -(void)remoteControlReceivedWithEvent:(UIEvent *)event diff --git a/GIGA/Common/GiGaLocalNotificationManager/GiGaLocalNotificationManager.h b/GIGA/Common/GiGaLocalNotificationManager/GiGaLocalNotificationManager.h index 77a377e..9609845 100644 --- a/GIGA/Common/GiGaLocalNotificationManager/GiGaLocalNotificationManager.h +++ b/GIGA/Common/GiGaLocalNotificationManager/GiGaLocalNotificationManager.h @@ -27,12 +27,12 @@ -(void)sendLocalNotification:(NSString *)alertBoday fireTimeInterval:(NSTimeInterval )timeInterval alertAction:(NSString *)alertAction withIdentifier:(NSString *)identifier; /** - 删除当前程序注册的所有通知 ios 8 后 iOS10 前 + 删除当前程序注册的所有通知 */ -(void)cancelAllLocalNoitification; /** - 删除指定的通知,一般用于取消重复的通知或者还没有被调用的通知,先获取通知,再遍历根据条件去删除(条件是 UserInfo 的值,是发送通知时所携带的参数) ios 8 后 iOS10 前 + 删除指定的通知,一般用于取消重复的通知或者还没有被调用的通知,先获取通知,再遍历根据条件去删除(条件是 UserInfo 的值,是发送通知时所携带的参数) */ -(void)cancelLocalNitificationByUserInfowithIdentifier:(NSString *)identifier; @@ -41,7 +41,6 @@ */ -(void)didResaveloaclNitification:(UILocalNotification *)localNitification; - //处理通知。。 diff --git a/GIGA/Common/GiGaLocalNotificationManager/GiGaLocalNotificationManager.m b/GIGA/Common/GiGaLocalNotificationManager/GiGaLocalNotificationManager.m index 7d4f65d..71fc8aa 100644 --- a/GIGA/Common/GiGaLocalNotificationManager/GiGaLocalNotificationManager.m +++ b/GIGA/Common/GiGaLocalNotificationManager/GiGaLocalNotificationManager.m @@ -74,7 +74,7 @@ if (@available(iOS 10.0, *)) { - [[UNUserNotificationCenter currentNotificationCenter] removeAllDeliveredNotifications]; + [[UNUserNotificationCenter currentNotificationCenter] removeAllPendingNotificationRequests]; } else { // Fallback on earlier versions @@ -87,7 +87,7 @@ -(void)cancelLocalNitificationByUserInfowithIdentifier:(NSString *)identifier{ if (@available(iOS 10.0, *)) { - [[UNUserNotificationCenter currentNotificationCenter] removeDeliveredNotificationsWithIdentifiers:@[identifier]]; + [[UNUserNotificationCenter currentNotificationCenter] removePendingNotificationRequestsWithIdentifiers:@[identifier]]; } else { // Fallback on earlier versions NSArray *notifiArray = [[UIApplication sharedApplication] scheduledLocalNotifications]; diff --git a/GIGA/Common/GiGaUserDB/GiGaUserDefault.m b/GIGA/Common/GiGaUserDB/GiGaUserDefault.m index e0a90a9..550fb41 100644 --- a/GIGA/Common/GiGaUserDB/GiGaUserDefault.m +++ b/GIGA/Common/GiGaUserDB/GiGaUserDefault.m @@ -149,7 +149,9 @@ NSString *const kShowUserTested = @"kShowUserTested"; time = 15 * 60; //time = MASKTIME_DEFAULT; } + time = 5; return time; + } +(void)saveUserTestFlag:(BOOL)tested{ diff --git a/GIGA/Common/Source/ogg_btn.mp3 b/GIGA/Common/Source/ogg_btn.mp3 new file mode 100755 index 0000000..50ca717 Binary files /dev/null and b/GIGA/Common/Source/ogg_btn.mp3 differ diff --git a/GIGA/Common/Views/LXCustomActionsheet/LXCustomActionSheet.h b/GIGA/Common/Views/LXCustomActionsheet/LXCustomActionSheet.h new file mode 100644 index 0000000..f1dcb73 --- /dev/null +++ b/GIGA/Common/Views/LXCustomActionsheet/LXCustomActionSheet.h @@ -0,0 +1,23 @@ +// +// LXCustomActionSheet.h +// CustomUISwitch +// +// Created by lianxiang on 2018/10/11. +// Copyright © 2018年 lian. All rights reserved. +// + +#import + + + +@interface LXCustomActionSheet : UIView +- (instancetype)initWithTitle:(NSString*)title + optionsArr:(NSArray*)optionsArr + cancelTitle:(NSString*)cancelTitle + selectedBlock:(void(^)(NSInteger))selectedBlock + cancelBlock:(void(^)(void))cancelBlock; +-(void)show; + +@end + + diff --git a/GIGA/Common/Views/LXCustomActionsheet/LXCustomActionSheet.m b/GIGA/Common/Views/LXCustomActionsheet/LXCustomActionSheet.m new file mode 100644 index 0000000..82082bc --- /dev/null +++ b/GIGA/Common/Views/LXCustomActionsheet/LXCustomActionSheet.m @@ -0,0 +1,192 @@ +// +// LXCustomActionSheet.m +// CustomUISwitch +// +// Created by lianxiang on 2018/10/11. +// Copyright © 2018年 lian. All rights reserved. +// + +#import "LXCustomActionSheet.h" +#define Screen_Width [UIScreen mainScreen].bounds.size.width +#define Screen_height [UIScreen mainScreen].bounds.size.height +#define SPACE 10 +@interface LXCustomActionSheet () +@property (nonatomic, strong) UIView *maskView; +@property (nonatomic, strong) UITableView *tableView; +@property (nonatomic, strong) NSArray *optionsArr; +@property (nonatomic, copy) NSString *title; +@property (nonatomic, copy) NSString *cancelTitle; +@property (nonatomic, strong) UIView *headView; +@property (nonatomic, copy) void(^selectedBlock)(NSInteger); +@property (nonatomic, copy) void(^cancelBlock)(void); + +@end + +@implementation LXCustomActionSheet + + +- (instancetype)initWithTitle:(NSString*)title + optionsArr:(NSArray*)optionsArr + cancelTitle:(NSString*)cancelTitle + selectedBlock:(void(^)(NSInteger))selectedBlock + cancelBlock:(void(^)(void))cancelBlock{ + if (self = [super init]) { + _title = title; + _optionsArr = optionsArr; + _cancelTitle = cancelTitle; + _selectedBlock = selectedBlock; + _cancelBlock = cancelBlock; + [self craetUI]; + } + return self; +} + +- (void)craetUI { + self.frame = [UIScreen mainScreen].bounds; + [self addSubview:self.maskView]; + [self addSubview:self.tableView]; +} + +- (UIView*)maskView { + if (!_maskView) { + _maskView = [[UIView alloc]initWithFrame:[UIScreen mainScreen].bounds]; + _maskView.backgroundColor = [UIColor blackColor]; + _maskView.alpha = .5; + _maskView.userInteractionEnabled = YES; + } + return _maskView; +} + +- (UITableView *)tableView { + if (!_tableView) { + _tableView = [[UITableView alloc]initWithFrame:CGRectZero style:UITableViewStylePlain]; + _tableView.delegate = self; + _tableView.dataSource = self; + _tableView.rowHeight = 44.0; + _tableView.bounces = NO; + _tableView.showsVerticalScrollIndicator = NO; + _tableView.backgroundColor = [UIColor clearColor]; + _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; + + UIView *tabHeader = [[UIView alloc] initWithFrame:CGRectMake(0, 0,Screen_Width, 50)]; + tabHeader.backgroundColor = [UIColor whiteColor]; + + UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect: + CGRectMake(0, 0, Screen_Width, 50) byRoundingCorners: + UIRectCornerTopLeft|UIRectCornerTopRight cornerRadii: + CGSizeMake(10, 10)]; + CAShapeLayer *maskLayer = [[CAShapeLayer alloc]init]; + maskLayer.frame = tabHeader.bounds; + maskLayer.path = maskPath.CGPath; + tabHeader.layer.mask = maskLayer; + + UILabel *titleLabe = [[UILabel alloc] init]; + titleLabe.frame = tabHeader.bounds; + titleLabe.textAlignment = NSTextAlignmentCenter; + titleLabe.text = self.title; + titleLabe.font = GIGA_TEXTFONTMEDIUM(12); + titleLabe.textColor = GIGA_MAIN_BGCOLOR; + [tabHeader addSubview:titleLabe]; + UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, tabHeader.frame.size.height -0.5, Screen_Width, 0.5)]; + lineView.backgroundColor = [UIColor colorWithRed:222/255.0f green:222/255.0f blue:222/255.0f alpha:1]; + [tabHeader addSubview:lineView]; + self.headView = tabHeader; + _tableView.tableHeaderView = self.headView; + + // _tableView.separatorInset = UIEdgeInsetsMake(0, -50, 0, 0); + [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"Navi_Cell"]; + } + return _tableView; +} + +#pragma mark TableView +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 2; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return (section == 0)?_optionsArr.count:1; +} + +- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Navi_Cell"]; + cell.textLabel.font = GIGA_TEXTFONTMEDIUM(15); + cell.textLabel.textColor = GIGA_MAIN_BGCOLOR; + if (indexPath.section == 0) { + cell.textLabel.text = _optionsArr[indexPath.row]; + UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0,cell.frame.size.height - 0.5, Screen_Width, 0.5)]; + lineView.backgroundColor = [UIColor colorWithRed:222/255.0f green:222/255.0f blue:222/255.0f alpha:1]; + [cell.contentView addSubview:lineView]; + + } else { + cell.textLabel.text = _cancelTitle; + } + cell.textLabel.textAlignment = NSTextAlignmentCenter; + cell.selectionStyle = UITableViewCellSelectionStyleNone; + return cell; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + if (indexPath.section == 0) { + if (self.selectedBlock) { + self.selectedBlock(indexPath.row); + } + }else{ + if (self.cancelBlock) { + self.cancelBlock(); + } + } + [self dismiss]; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { + if (section==0) { + return 3; + } + return 0; +} + +- (UIView*)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { + UIView *footerView = [[UIView alloc] init]; + footerView.backgroundColor = [UIColor colorWithRed:222/255.0f green:222/255.0f blue:222/255.0f alpha:1]; + return footerView; +} + +-(void)show{ + [[UIApplication sharedApplication].keyWindow addSubview:self]; +} + +- (void)layoutSubviews { + [super layoutSubviews]; + [self showTab]; +} + +- (void)showTab{ + + _tableView.frame = CGRectMake(0,Screen_height, Screen_Width, _tableView.rowHeight * (_optionsArr.count + 1) + 50 + 3); + [UIView animateWithDuration:.5 animations:^{ + CGRect rect = self->_tableView.frame; + rect.origin.y -= self->_tableView.bounds.size.height; + self->_tableView.frame = rect; + }]; +} + +- (void)dismiss { + + [UIView animateWithDuration:.5 animations:^{ + CGRect rect = self->_tableView.frame; + rect.origin.y += self->_tableView.bounds.size.height; + self->_tableView.frame = rect; + } completion:^(BOOL finished) { + [self removeFromSuperview]; + }]; +} + +- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { + if (self.cancelBlock) { + self.cancelBlock(); + } + [self dismiss]; +} + +@end diff --git a/GIGA/Config/GIGA.h b/GIGA/Config/GIGA.h index 76fe1f5..c164975 100644 --- a/GIGA/Config/GIGA.h +++ b/GIGA/Config/GIGA.h @@ -68,10 +68,9 @@ green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \ blue:((float)(rgbValue & 0xFF))/255.0 alpha:alphaValue] #define GIGAUIColorFromRGBA(rgbValue) [UIColor \ -colorWithRed:((float)((rgbValue & 0xFF000000) >> 24))/255.0 \ -green:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \ -blue:((float)((rgbValue & 0xFF00) >> 8))/255.0 \ -alpha:((float)(rgbValue & 0xFF))/255.0] +colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \ +green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \ +blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.f] #define GIGA_MAIN_BGCOLOR [UIColor colorWithRed:131/255.0f green:10/255.0f blue:10/255.0f alpha:1] #define SCREEN [UIScreen mainScreen] diff --git a/GIGA/Config/GiGaServerConfig.m b/GIGA/Config/GiGaServerConfig.m index 4574d6a..d29c0f7 100644 --- a/GIGA/Config/GiGaServerConfig.m +++ b/GIGA/Config/GiGaServerConfig.m @@ -18,10 +18,10 @@ switch (type) { case 0://测试环境 { - [[NSUserDefaults standardUserDefaults] setValue:@"http://apiyts.s1.natapp.cc/v1/" forKey:@"MainUrl"]; - [[NSUserDefaults standardUserDefaults] setValue:@"http://wsyts.s1.natapp.cc" forKey:@"gigasocketUrl"]; -// [[NSUserDefaults standardUserDefaults] setValue:@"https://api.mianmoshijian.com/v1/" forKey:@"MainUrl"]; -// [[NSUserDefaults standardUserDefaults] setValue:@"https://ws.mianmoshijian.com" forKey:@"gigasocketUrl"]; +// [[NSUserDefaults standardUserDefaults] setValue:@"http://apiyts.s1.natapp.cc/v1/" forKey:@"MainUrl"]; +// [[NSUserDefaults standardUserDefaults] setValue:@"http://wsyts.s1.natapp.cc" forKey:@"gigasocketUrl"]; + [[NSUserDefaults standardUserDefaults] setValue:@"https://api.mianmoshijian.com/v1/" forKey:@"MainUrl"]; + [[NSUserDefaults standardUserDefaults] setValue:@"https://ws.mianmoshijian.com" forKey:@"gigasocketUrl"]; } break; diff --git a/GIGA/Info.plist b/GIGA/Info.plist index 124096e..ec5d362 100644 --- a/GIGA/Info.plist +++ b/GIGA/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.8.0 + 0.9.0 CFBundleURLTypes @@ -34,7 +34,7 @@ CFBundleVersion - 1.6.0 + 1.6.1 LSApplicationQueriesSchemes weixin @@ -54,7 +54,7 @@ 是否允许此App使用您的相册? UIBackgroundModes - App plays audio + audio remote-notification UILaunchStoryboardName diff --git a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.h b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.h index 732e239..0aec380 100644 --- a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.h +++ b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.h @@ -9,5 +9,6 @@ #import #import "GiGaBaseViewController.h" @interface GiGaRegistViewController : GiGaBaseViewController +@property (weak, nonatomic) IBOutlet UIScrollView *backScrollView; @end diff --git a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m index 53664df..553ca0e 100644 --- a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m +++ b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m @@ -47,6 +47,13 @@ [self resetBackimg]; + if (@available(iOS 11.0, *)) { + self.backScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } else { + self.automaticallyAdjustsScrollViewInsets = NO; + // Fallback on earlier versions + } + } -(void)resetBackimg{ diff --git a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib index 5143108..eb52152 100644 --- a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib +++ b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib @@ -12,6 +12,7 @@ + @@ -28,17 +29,17 @@ - + - + - + @@ -47,14 +48,14 @@ - + - + @@ -63,7 +64,7 @@ - + - + - + @@ -114,7 +115,7 @@ - + - + @@ -150,11 +151,11 @@ - + - - + + @@ -172,7 +173,7 @@ - + diff --git a/GIGA/Modules/LogIn/Controller/PassWordResetVC.xib b/GIGA/Modules/LogIn/Controller/PassWordResetVC.xib index bb3a1f8..24a0807 100644 --- a/GIGA/Modules/LogIn/Controller/PassWordResetVC.xib +++ b/GIGA/Modules/LogIn/Controller/PassWordResetVC.xib @@ -1,11 +1,11 @@ - + - + @@ -65,7 +65,7 @@