add
This commit is contained in:
parent
dc1b1e330f
commit
97af177b88
|
|
@ -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 = "<group>"; };
|
||||
8314D2102133ABE500B458BF /* WeiIXinApiManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WeiIXinApiManager.m; sourceTree = "<group>"; };
|
||||
8314D2122133F44600B458BF /* MobClickList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MobClickList.h; sourceTree = "<group>"; };
|
||||
83276185216F29A800C6216C /* LXCustomActionSheet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LXCustomActionSheet.m; sourceTree = "<group>"; };
|
||||
83276186216F29A800C6216C /* LXCustomActionSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LXCustomActionSheet.h; sourceTree = "<group>"; };
|
||||
83346ABD212BB50A0054D597 /* PassWordResetVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PassWordResetVC.h; sourceTree = "<group>"; };
|
||||
83346ABE212BB50A0054D597 /* PassWordResetVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PassWordResetVC.m; sourceTree = "<group>"; };
|
||||
83346ABF212BB50A0054D597 /* PassWordResetVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PassWordResetVC.xib; sourceTree = "<group>"; };
|
||||
|
|
@ -677,6 +681,7 @@
|
|||
83C78A182159D74D0083DDD9 /* UIImage+LogoQrCode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIImage+LogoQrCode.m"; sourceTree = "<group>"; };
|
||||
83C78A1A2159DD920083DDD9 /* UIImage+ShotImage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIImage+ShotImage.h"; sourceTree = "<group>"; };
|
||||
83C78A1B2159DD920083DDD9 /* UIImage+ShotImage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ShotImage.m"; sourceTree = "<group>"; };
|
||||
83D0B92B216C5A80006B77DC /* ogg_btn.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = ogg_btn.mp3; sourceTree = "<group>"; };
|
||||
83D3832B215A2CF5009E8669 /* MaskHistryRecord.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MaskHistryRecord.h; sourceTree = "<group>"; };
|
||||
83D3832C215A2CF5009E8669 /* MaskHistryRecord.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MaskHistryRecord.m; sourceTree = "<group>"; };
|
||||
83E40B2D21218BA0008149C4 /* GiGaUserViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaUserViewController.h; sourceTree = "<group>"; };
|
||||
|
|
@ -734,9 +739,19 @@
|
|||
name = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
83276184216F29A800C6216C /* LXCustomActionsheet */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
83276185216F29A800C6216C /* LXCustomActionSheet.m */,
|
||||
83276186216F29A800C6216C /* LXCustomActionSheet.h */,
|
||||
);
|
||||
path = LXCustomActionsheet;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
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 */,
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@
|
|||
|
||||
-(void)creatAdView{
|
||||
|
||||
|
||||
GiGaStartAdView *startadview = [[GiGaStartAdView alloc] initWithFrame:self.window.bounds];
|
||||
[startadview show];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
||||
//处理通知。。
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -149,7 +149,9 @@ NSString *const kShowUserTested = @"kShowUserTested";
|
|||
time = 15 * 60;
|
||||
//time = MASKTIME_DEFAULT;
|
||||
}
|
||||
time = 5;
|
||||
return time;
|
||||
|
||||
}
|
||||
|
||||
+(void)saveUserTestFlag:(BOOL)tested{
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -0,0 +1,23 @@
|
|||
//
|
||||
// LXCustomActionSheet.h
|
||||
// CustomUISwitch
|
||||
//
|
||||
// Created by lianxiang on 2018/10/11.
|
||||
// Copyright © 2018年 lian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
|
||||
|
||||
@interface LXCustomActionSheet : UIView
|
||||
- (instancetype)initWithTitle:(NSString*)title
|
||||
optionsArr:(NSArray*)optionsArr
|
||||
cancelTitle:(NSString*)cancelTitle
|
||||
selectedBlock:(void(^)(NSInteger))selectedBlock
|
||||
cancelBlock:(void(^)(void))cancelBlock;
|
||||
-(void)show;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
|
@ -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 ()<UITableViewDelegate,UITableViewDataSource>
|
||||
@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<UITouch *> *)touches withEvent:(UIEvent *)event {
|
||||
if (self.cancelBlock) {
|
||||
self.cancelBlock();
|
||||
}
|
||||
[self dismiss];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.8.0</string>
|
||||
<string>0.9.0</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.6.0</string>
|
||||
<string>1.6.1</string>
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>weixin</string>
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
<string>是否允许此App使用您的相册?</string>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>App plays audio</string>
|
||||
<string>audio</string>
|
||||
<string>remote-notification</string>
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
|
|
|
|||
|
|
@ -9,5 +9,6 @@
|
|||
#import <UIKit/UIKit.h>
|
||||
#import "GiGaBaseViewController.h"
|
||||
@interface GiGaRegistViewController : GiGaBaseViewController
|
||||
@property (weak, nonatomic) IBOutlet UIScrollView *backScrollView;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -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{
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="GiGaRegistViewController">
|
||||
<connections>
|
||||
<outlet property="backScrollView" destination="piO-PU-j8g" id="3ii-Sx-qXY"/>
|
||||
<outlet property="checkBtn" destination="b06-w9-r2g" id="Cv8-zo-QoL"/>
|
||||
<outlet property="codeTextField" destination="dR7-iu-Eup" id="wNt-AE-gpM"/>
|
||||
<outlet property="passTexFied" destination="UUC-74-fsa" id="4hR-y9-jDa"/>
|
||||
|
|
@ -28,17 +29,17 @@
|
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="piO-PU-j8g">
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_circle_avatar" translatesAutoresizingMaskIntoConstraints="NO" id="SEO-0F-Irb">
|
||||
<rect key="frame" x="130.5" y="87" width="114" height="114"/>
|
||||
<rect key="frame" x="130.5" y="43" width="114" height="114"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="114" id="GOs-M2-rAk"/>
|
||||
<constraint firstAttribute="height" constant="114" id="af0-Mm-2fL"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入手机号" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="uJG-KF-a91">
|
||||
<rect key="frame" x="66" y="230" width="243" height="48"/>
|
||||
<rect key="frame" x="66" y="186" width="243" height="48"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="48" id="pzi-4C-7s8"/>
|
||||
</constraints>
|
||||
|
|
@ -47,14 +48,14 @@
|
|||
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
|
||||
</textField>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ubQ-Za-dV7">
|
||||
<rect key="frame" x="65" y="280" width="244" height="1"/>
|
||||
<rect key="frame" x="65" y="236" width="244" height="1"/>
|
||||
<color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="Gbv-lr-zmA"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="短信验证码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="dR7-iu-Eup">
|
||||
<rect key="frame" x="66" y="286" width="130" height="48"/>
|
||||
<rect key="frame" x="66" y="242" width="130" height="48"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="48" id="Iqo-gI-2Z3"/>
|
||||
</constraints>
|
||||
|
|
@ -63,7 +64,7 @@
|
|||
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
|
||||
</textField>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qAH-Fa-AmF">
|
||||
<rect key="frame" x="221" y="286" width="88" height="48"/>
|
||||
<rect key="frame" x="221" y="242" width="88" height="48"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="88" id="kZw-pm-n5p"/>
|
||||
<constraint firstAttribute="height" constant="48" id="oB6-lP-x7P"/>
|
||||
|
|
@ -76,21 +77,21 @@
|
|||
</state>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Trq-bz-kQT">
|
||||
<rect key="frame" x="65" y="336" width="244" height="1"/>
|
||||
<rect key="frame" x="65" y="292" width="244" height="1"/>
|
||||
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="BYZ-mC-rOK"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Pb5-1e-TXp">
|
||||
<rect key="frame" x="65.5" y="395" width="244" height="1"/>
|
||||
<rect key="frame" x="65.5" y="351" width="244" height="1"/>
|
||||
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="SYH-LK-7FR"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hZA-nj-Wmu">
|
||||
<rect key="frame" x="84" y="437" width="207" height="41"/>
|
||||
<rect key="frame" x="84" y="393" width="207" height="41"/>
|
||||
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="41" id="IZZ-Wn-zMh"/>
|
||||
|
|
@ -99,13 +100,13 @@
|
|||
<state key="normal" title="注 册"/>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="已阅读并同意《用户服务协议》" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vxb-TL-wDd" customClass="GiGaAttributedLabel">
|
||||
<rect key="frame" x="117.5" y="550" width="140" height="15"/>
|
||||
<rect key="frame" x="117.5" y="506" width="140" height="15"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="10"/>
|
||||
<color key="textColor" red="0.56862745098039214" green="0.56862745098039214" blue="0.56862745098039214" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="highlightedColor" red="0.56862745100000001" green="0.56862745100000001" blue="0.56862745100000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</label>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="设置登录密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="UUC-74-fsa">
|
||||
<rect key="frame" x="65.5" y="345" width="244" height="48"/>
|
||||
<rect key="frame" x="65.5" y="301" width="244" height="48"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="48" id="o8f-Xh-HGs"/>
|
||||
</constraints>
|
||||
|
|
@ -114,7 +115,7 @@
|
|||
<textInputTraits key="textInputTraits" keyboardType="numbersAndPunctuation"/>
|
||||
</textField>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="b06-w9-r2g">
|
||||
<rect key="frame" x="75" y="539" width="39" height="37"/>
|
||||
<rect key="frame" x="75" y="495" width="39" height="37"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="39" id="FeL-ci-mXv"/>
|
||||
<constraint firstAttribute="height" constant="37" id="sLA-cD-5zI"/>
|
||||
|
|
@ -128,7 +129,7 @@
|
|||
<constraint firstItem="hZA-nj-Wmu" firstAttribute="centerX" secondItem="piO-PU-j8g" secondAttribute="centerX" id="7gX-TX-GAa"/>
|
||||
<constraint firstItem="Vxb-TL-wDd" firstAttribute="centerX" secondItem="piO-PU-j8g" secondAttribute="centerX" id="Bz2-Js-CTt"/>
|
||||
<constraint firstItem="ubQ-Za-dV7" firstAttribute="leading" secondItem="piO-PU-j8g" secondAttribute="leading" constant="65" id="CGf-BO-qJR"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Trq-bz-kQT" secondAttribute="bottom" constant="310" id="CnD-h1-kaA"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Trq-bz-kQT" secondAttribute="bottom" constant="354" id="CnD-h1-kaA"/>
|
||||
<constraint firstItem="SEO-0F-Irb" firstAttribute="centerX" secondItem="piO-PU-j8g" secondAttribute="centerX" id="E3K-GK-vYR"/>
|
||||
<constraint firstItem="uJG-KF-a91" firstAttribute="top" secondItem="SEO-0F-Irb" secondAttribute="bottom" constant="29" id="ECP-qY-1cd"/>
|
||||
<constraint firstItem="UUC-74-fsa" firstAttribute="top" secondItem="Trq-bz-kQT" secondAttribute="bottom" constant="8" id="Gtf-ex-Tqo"/>
|
||||
|
|
@ -145,7 +146,7 @@
|
|||
<constraint firstItem="hZA-nj-Wmu" firstAttribute="leading" relation="lessThanOrEqual" secondItem="piO-PU-j8g" secondAttribute="leading" constant="84" id="fcO-XF-ODc"/>
|
||||
<constraint firstItem="uJG-KF-a91" firstAttribute="centerX" secondItem="piO-PU-j8g" secondAttribute="centerX" id="flh-N1-FvK"/>
|
||||
<constraint firstItem="qAH-Fa-AmF" firstAttribute="trailing" secondItem="uJG-KF-a91" secondAttribute="trailing" id="fsZ-rC-rlA"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ubQ-Za-dV7" secondAttribute="trailing" constant="65" id="j6B-5X-ymb"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ubQ-Za-dV7" secondAttribute="trailing" constant="66" id="j6B-5X-ymb"/>
|
||||
<constraint firstItem="dR7-iu-Eup" firstAttribute="top" secondItem="ubQ-Za-dV7" secondAttribute="bottom" constant="5" id="jKd-do-Qv6"/>
|
||||
<constraint firstItem="Pb5-1e-TXp" firstAttribute="width" secondItem="Trq-bz-kQT" secondAttribute="width" id="kqU-bv-fGy"/>
|
||||
<constraint firstItem="Pb5-1e-TXp" firstAttribute="centerX" secondItem="piO-PU-j8g" secondAttribute="centerX" id="mX6-oT-Oeq"/>
|
||||
|
|
@ -154,19 +155,19 @@
|
|||
<constraint firstItem="hZA-nj-Wmu" firstAttribute="top" secondItem="Pb5-1e-TXp" secondAttribute="bottom" constant="41" id="xYx-Fr-OyO"/>
|
||||
<constraint firstItem="b06-w9-r2g" firstAttribute="centerY" secondItem="Vxb-TL-wDd" secondAttribute="centerY" id="y5u-W9-HjP"/>
|
||||
<constraint firstItem="UUC-74-fsa" firstAttribute="centerX" secondItem="piO-PU-j8g" secondAttribute="centerX" id="yQJ-WR-KVx"/>
|
||||
<constraint firstItem="SEO-0F-Irb" firstAttribute="top" secondItem="piO-PU-j8g" secondAttribute="top" constant="87" id="ylx-4z-k36"/>
|
||||
<constraint firstItem="SEO-0F-Irb" firstAttribute="top" secondItem="piO-PU-j8g" secondAttribute="top" constant="43" id="ylx-4z-k36"/>
|
||||
</constraints>
|
||||
</scrollView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="piO-PU-j8g" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="20" id="FeS-pw-yBz"/>
|
||||
<constraint firstItem="piO-PU-j8g" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="FeS-pw-yBz"/>
|
||||
<constraint firstAttribute="bottom" secondItem="piO-PU-j8g" secondAttribute="bottom" id="LJj-gu-XvO"/>
|
||||
<constraint firstItem="piO-PU-j8g" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="TBf-ZS-9tS"/>
|
||||
<constraint firstAttribute="trailing" secondItem="piO-PU-j8g" secondAttribute="trailing" id="wPj-4k-nEv"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="7gZ-WS-Wjh"/>
|
||||
<point key="canvasLocation" x="33.5" y="53.5"/>
|
||||
<point key="canvasLocation" x="32.799999999999997" y="52.623688155922046"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
|
|
|
|||
|
|
@ -10,5 +10,6 @@
|
|||
#import "GiGaBaseViewController.h"
|
||||
|
||||
@interface GiGaUserLoginVC : GiGaBaseViewController
|
||||
@property (weak, nonatomic) IBOutlet UIScrollView *backScrollView;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -38,7 +38,13 @@
|
|||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.automaticallyAdjustsScrollViewInsets = NO;
|
||||
|
||||
if (@available(iOS 11.0, *)) {
|
||||
self.backScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
} else {
|
||||
self.automaticallyAdjustsScrollViewInsets = NO;
|
||||
// Fallback on earlier versions
|
||||
}
|
||||
// Do any additional setup after loading the view from its nib.
|
||||
[self setUpX];
|
||||
[self textFieldUI];
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="GiGaUserLoginVC">
|
||||
<connections>
|
||||
<outlet property="acountTextField" destination="Yiv-h8-4V1" id="bT2-8W-ab2"/>
|
||||
<outlet property="backScrollView" destination="Z8i-yN-1Cd" id="H0w-vJ-GHh"/>
|
||||
<outlet property="loginBtn" destination="8Of-JP-gMR" id="uRE-2y-IZt"/>
|
||||
<outlet property="passwordTextField" destination="Y1I-OE-6t1" id="Jgj-sC-7MX"/>
|
||||
<outlet property="registBtn" destination="F5p-cf-frr" id="eHE-mU-8Xf"/>
|
||||
|
|
@ -28,10 +29,10 @@
|
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Z8i-yN-1Cd">
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="手机号码" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="Yiv-h8-4V1">
|
||||
<rect key="frame" x="65" y="225" width="245" height="48"/>
|
||||
<rect key="frame" x="65" y="257" width="245" height="48"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="48" id="vg0-nn-MyL"/>
|
||||
</constraints>
|
||||
|
|
@ -40,30 +41,30 @@
|
|||
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
|
||||
</textField>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qzA-vE-CGR">
|
||||
<rect key="frame" x="65" y="275" width="245" height="2"/>
|
||||
<rect key="frame" x="65" y="307" width="245" height="2"/>
|
||||
<color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="2" id="4IT-CI-Nj4"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Y1I-OE-6t1">
|
||||
<rect key="frame" x="65" y="279" width="161" height="48"/>
|
||||
<rect key="frame" x="65" y="311" width="161" height="48"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="48" id="rw6-Ax-vah"/>
|
||||
</constraints>
|
||||
<nil key="textColor"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
|
||||
<textInputTraits key="textInputTraits" keyboardType="numbersAndPunctuation" secureTextEntry="YES"/>
|
||||
<textInputTraits key="textInputTraits" keyboardType="numbersAndPunctuation"/>
|
||||
</textField>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZJU-Uo-5TM">
|
||||
<rect key="frame" x="65" y="331" width="245" height="2"/>
|
||||
<rect key="frame" x="65" y="363" width="245" height="2"/>
|
||||
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="2" id="kqB-Hm-kqr"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="chq-bd-6sQ">
|
||||
<rect key="frame" x="234" y="341" width="76" height="37"/>
|
||||
<rect key="frame" x="234" y="373" width="76" height="37"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="76" id="7Tc-Zf-bbN"/>
|
||||
<constraint firstAttribute="height" constant="37" id="xjD-it-bBa"/>
|
||||
|
|
@ -77,7 +78,7 @@
|
|||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8Of-JP-gMR">
|
||||
<rect key="frame" x="65" y="386" width="245" height="42"/>
|
||||
<rect key="frame" x="65" y="418" width="245" height="42"/>
|
||||
<color key="backgroundColor" red="0.70980392156862748" green="0.054901960784313725" blue="0.054901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="42" id="apM-nh-gox"/>
|
||||
|
|
@ -88,7 +89,7 @@
|
|||
</state>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Szo-8C-Zin">
|
||||
<rect key="frame" x="234" y="282" width="76" height="42"/>
|
||||
<rect key="frame" x="234" y="314" width="76" height="42"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="42" id="HyY-eo-8yw"/>
|
||||
<constraint firstAttribute="width" constant="76" id="pz1-th-22o"/>
|
||||
|
|
@ -96,14 +97,14 @@
|
|||
<state key="normal" image="btn_tab_desplay"/>
|
||||
</button>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_circle_avatar" translatesAutoresizingMaskIntoConstraints="NO" id="RIl-8E-GcR">
|
||||
<rect key="frame" x="130.5" y="82" width="114" height="114"/>
|
||||
<rect key="frame" x="130.5" y="58" width="114" height="114"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="114" id="JgO-PU-ypI"/>
|
||||
<constraint firstAttribute="width" constant="114" id="mG0-1p-gP7"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dnL-WV-spY">
|
||||
<rect key="frame" x="115.5" y="523" width="144" height="38"/>
|
||||
<rect key="frame" x="115.5" y="536" width="144" height="38"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="38" id="l1O-3i-Plv"/>
|
||||
<constraint firstAttribute="width" constant="144" id="zzO-p2-ENu"/>
|
||||
|
|
@ -122,7 +123,7 @@
|
|||
</state>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="F5p-cf-frr">
|
||||
<rect key="frame" x="80" y="341" width="55" height="36"/>
|
||||
<rect key="frame" x="80" y="373" width="55" height="36"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="55" id="E7Z-DH-nia"/>
|
||||
<constraint firstAttribute="height" constant="36" id="n0h-RT-Hkh"/>
|
||||
|
|
@ -134,7 +135,7 @@
|
|||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="RIl-8E-GcR" firstAttribute="top" secondItem="Z8i-yN-1Cd" secondAttribute="top" constant="82" id="4Ud-t0-vg5"/>
|
||||
<constraint firstItem="RIl-8E-GcR" firstAttribute="top" secondItem="Z8i-yN-1Cd" secondAttribute="top" constant="58" id="4Ud-t0-vg5"/>
|
||||
<constraint firstItem="chq-bd-6sQ" firstAttribute="top" secondItem="ZJU-Uo-5TM" secondAttribute="bottom" constant="8" id="4uH-Hy-3Ai"/>
|
||||
<constraint firstItem="RIl-8E-GcR" firstAttribute="centerX" secondItem="Yiv-h8-4V1" secondAttribute="centerX" id="7Xu-ux-Onh"/>
|
||||
<constraint firstItem="chq-bd-6sQ" firstAttribute="trailing" secondItem="ZJU-Uo-5TM" secondAttribute="trailing" id="AYA-eD-1K2"/>
|
||||
|
|
@ -150,11 +151,11 @@
|
|||
<constraint firstItem="chq-bd-6sQ" firstAttribute="trailing" secondItem="8Of-JP-gMR" secondAttribute="trailing" id="XtD-fx-sr4"/>
|
||||
<constraint firstItem="Y1I-OE-6t1" firstAttribute="leading" secondItem="ZJU-Uo-5TM" secondAttribute="leading" id="Y9N-XV-3ir"/>
|
||||
<constraint firstItem="Yiv-h8-4V1" firstAttribute="leading" secondItem="Z8i-yN-1Cd" secondAttribute="leading" constant="65" id="Yd4-bz-xUn"/>
|
||||
<constraint firstItem="dnL-WV-spY" firstAttribute="top" secondItem="8Of-JP-gMR" secondAttribute="bottom" constant="95" id="Ziq-Ha-5FS"/>
|
||||
<constraint firstItem="dnL-WV-spY" firstAttribute="top" secondItem="8Of-JP-gMR" secondAttribute="bottom" constant="76" id="Ziq-Ha-5FS"/>
|
||||
<constraint firstItem="F5p-cf-frr" firstAttribute="leading" secondItem="ZJU-Uo-5TM" secondAttribute="leading" constant="15" id="ddi-4p-s0s"/>
|
||||
<constraint firstItem="Szo-8C-Zin" firstAttribute="leading" secondItem="Y1I-OE-6t1" secondAttribute="trailing" constant="8" id="lp1-dg-UCs"/>
|
||||
<constraint firstAttribute="bottom" secondItem="dnL-WV-spY" secondAttribute="bottom" constant="86" id="ooQ-OL-P5e"/>
|
||||
<constraint firstItem="Yiv-h8-4V1" firstAttribute="top" secondItem="RIl-8E-GcR" secondAttribute="bottom" constant="29" id="p63-hU-APq"/>
|
||||
<constraint firstAttribute="bottom" secondItem="dnL-WV-spY" secondAttribute="bottom" constant="29" id="ooQ-OL-P5e"/>
|
||||
<constraint firstItem="Yiv-h8-4V1" firstAttribute="top" secondItem="RIl-8E-GcR" secondAttribute="bottom" constant="85" id="p63-hU-APq"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Yiv-h8-4V1" secondAttribute="trailing" constant="65" id="phk-GT-PvS"/>
|
||||
<constraint firstItem="F5p-cf-frr" firstAttribute="top" secondItem="ZJU-Uo-5TM" secondAttribute="bottom" constant="8" id="qqc-dh-O24"/>
|
||||
<constraint firstItem="dnL-WV-spY" firstAttribute="centerX" secondItem="Z8i-yN-1Cd" secondAttribute="centerX" id="rMH-NL-gTu"/>
|
||||
|
|
@ -172,7 +173,7 @@
|
|||
<constraint firstItem="Z8i-yN-1Cd" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="Gug-bY-bRv"/>
|
||||
<constraint firstItem="1vd-yc-0a5" firstAttribute="bottom" secondItem="Z8i-yN-1Cd" secondAttribute="bottom" id="TXU-c3-0M6"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Z8i-yN-1Cd" secondAttribute="trailing" id="UyN-ah-Reu"/>
|
||||
<constraint firstItem="Z8i-yN-1Cd" firstAttribute="top" secondItem="1vd-yc-0a5" secondAttribute="top" id="bbt-Lx-gQG"/>
|
||||
<constraint firstItem="Z8i-yN-1Cd" firstAttribute="top" secondItem="1vd-yc-0a5" secondAttribute="top" constant="-20" id="bbt-Lx-gQG"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="1vd-yc-0a5"/>
|
||||
<point key="canvasLocation" x="-85.599999999999994" y="-3.1484257871064472"/>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="w3j-WU-gmW">
|
||||
<rect key="frame" x="87" y="252.5" width="200" height="41"/>
|
||||
<rect key="frame" x="87" y="252.5" width="201" height="41"/>
|
||||
<color key="backgroundColor" red="0.70980392156862748" green="0.054901960784313725" blue="0.054901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="41" id="q8T-c9-PAl"/>
|
||||
|
|
@ -124,7 +124,7 @@
|
|||
<constraint firstItem="MHD-nb-UXj" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="wco-Sk-bTY"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="g7Z-wI-UmZ"/>
|
||||
<point key="canvasLocation" x="33.5" y="53.5"/>
|
||||
<point key="canvasLocation" x="-161" y="36"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
|
|
|
|||
|
|
@ -61,8 +61,6 @@
|
|||
-(void)updatePage{
|
||||
|
||||
self.pagControl.currentPage = self.scrollView.contentOffset.x / self.scrollView.bounds.size.width;
|
||||
|
||||
|
||||
self.pagControl.hidden = self.scrollView.contentOffset.x / self.scrollView.bounds.size.width == 2 ? YES : NO;
|
||||
GILog(@"%ld",self.pagControl.currentPage);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
@interface GiGaMaskTaskViewController ()<MaskCirCularProGressViewDelegate,MaskTimeTextViewDelegate>
|
||||
{
|
||||
AVAudioPlayer *_musicPalyer;
|
||||
AVAudioPlayer *_startMaskMusic;
|
||||
}
|
||||
|
||||
@property (nonatomic,strong) UIButton *rightNavUserBtn;
|
||||
|
|
@ -123,7 +124,6 @@
|
|||
return _hairImageView;
|
||||
}
|
||||
|
||||
|
||||
//人脸
|
||||
- (UIImageView *)faceView{
|
||||
if (!_faceView) {
|
||||
|
|
@ -206,27 +206,28 @@
|
|||
|
||||
#pragma mark 弹幕
|
||||
-(void)createInputView{
|
||||
|
||||
|
||||
|
||||
GiGaFlingCommitVC* GiGaFlingVC = [[GiGaFlingCommitVC alloc] init];
|
||||
if (ISIOS8) {
|
||||
GiGaFlingVC.modalPresentationStyle = UIModalPresentationOverCurrentContext;
|
||||
}else{
|
||||
GiGaFlingVC.modalPresentationStyle = UIModalPresentationCurrentContext;
|
||||
}
|
||||
GiGaFlingVC.view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3];
|
||||
GiGaFlingVC.view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.4];
|
||||
[self presentViewController:GiGaFlingVC animated:NO completion:nil];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - 生命周期
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
|
||||
[super viewWillAppear:animated];
|
||||
//取消导航对内容下移影响
|
||||
[self.navigationController.navigationBar setTranslucent:YES];
|
||||
|
||||
}
|
||||
|
||||
|
||||
-(void)viewDidAppear:(BOOL)animated{
|
||||
[super viewDidAppear:animated];
|
||||
if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
|
||||
|
|
@ -235,13 +236,12 @@
|
|||
|
||||
// app引导页
|
||||
|
||||
// BOOL showAppGaurd = [GiGaUserDefault isShowedAppGaurd];
|
||||
// if (showAppGaurd == NO) {
|
||||
// [self showAPPappGaurdView];
|
||||
// }
|
||||
|
||||
//[self showAPPappGaurdView];
|
||||
BOOL showAppGaurd = [GiGaUserDefault isShowedAppGaurd];
|
||||
if (showAppGaurd == NO) {
|
||||
[self showAPPappGaurdView];
|
||||
}
|
||||
|
||||
// [self showUserGaurdView];
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -260,7 +260,7 @@
|
|||
[self initUI];
|
||||
[self addNotify];
|
||||
[self creatBackGroundMusic];
|
||||
|
||||
[self creatMaskTimeSatrtMusic];
|
||||
}
|
||||
|
||||
#pragma mark - 响应事件
|
||||
|
|
@ -315,7 +315,6 @@
|
|||
make.top.mas_equalTo(self.attachPoint.y - 87);
|
||||
}];
|
||||
|
||||
|
||||
[self.maskImageView setImage:[UIImage imageNamed:@"masking_img_mask"]];
|
||||
|
||||
[self.view layoutIfNeeded];
|
||||
|
|
@ -474,12 +473,28 @@
|
|||
NSError *payerError;
|
||||
NSURL *musicUrl = [[NSURL alloc] initWithString:[[NSBundle mainBundle] pathForResource:@"pomodoSound" ofType:@"m4a"]] ;
|
||||
AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithContentsOfURL:musicUrl error:&payerError];
|
||||
player.numberOfLoops = 1;//-1 无限
|
||||
player.numberOfLoops = -1;//-1 无限
|
||||
player.volume = 0;
|
||||
_musicPalyer = player;
|
||||
[[AVAudioSession sharedInstance] setActive:YES error:nil];
|
||||
//设置后台模式和锁屏模式下依然能够播放
|
||||
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthers error:nil];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark 开始面膜时间提示音🎵
|
||||
-(void)creatMaskTimeSatrtMusic{
|
||||
|
||||
//初始化音频播放器
|
||||
NSError *payerError;
|
||||
NSURL *musicUrl = [[NSURL alloc] initWithString:[[NSBundle mainBundle] pathForResource:@"ogg_btn" ofType:@"mp3"]] ;
|
||||
AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithContentsOfURL:musicUrl error:&payerError];
|
||||
player.numberOfLoops = 2;
|
||||
player.volume = 0.5;
|
||||
|
||||
_startMaskMusic = player;
|
||||
[[AVAudioSession sharedInstance] setActive:YES error:nil];
|
||||
//设置后台模式和锁屏模式下依然能够播放
|
||||
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthers error:nil];
|
||||
}
|
||||
|
||||
#pragma mark 开始面膜时间
|
||||
|
|
@ -493,6 +508,7 @@
|
|||
return;
|
||||
}
|
||||
delegate.isMasking = YES;
|
||||
[_startMaskMusic play];
|
||||
[_musicPalyer play];
|
||||
// [self setBackGroundPlayingInfo];//锁屏音频信息
|
||||
|
||||
|
|
@ -504,7 +520,7 @@
|
|||
//[self showWaringView];
|
||||
|
||||
//app 前台时收到本地通知showAlert 后台时通知提醒
|
||||
// [[GiGaLocalNotificationManager localNotifiationCenter] sendLocalNotification:@"本地推送" fireTimeInterval:timeInterVal alertAction:@"测试面膜时间" withIdentifier:kLOCALNotifiID_MASKETIMEEND];
|
||||
[[GiGaLocalNotificationManager localNotifiationCenter] sendLocalNotification:@"面膜时间闹钟" fireTimeInterval:timeInterVal alertAction:@"面膜时间" withIdentifier:kLOCALNotifiID_MASKETIMEEND];
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -566,6 +582,8 @@
|
|||
|
||||
#pragma mark 开始测试
|
||||
-(void)testBtnAcion:(UIButton *)btn{
|
||||
|
||||
|
||||
// NSDictionary *dic = @{
|
||||
// @"dryness":@"0.41",
|
||||
// @"drynessPercent":@"41%",
|
||||
|
|
@ -630,7 +648,9 @@
|
|||
#pragma mark 新手引导蒙版消失
|
||||
-(void)guardViewDissmiss{
|
||||
|
||||
//[self showWaringView];
|
||||
self.swipeGaurdimagView.hidden = NO;
|
||||
self.startMaskButton.hidden = NO;
|
||||
[self showWaringView];
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -660,6 +680,8 @@
|
|||
#pragma mark 新手引导
|
||||
-(void)showUserGaurdView{
|
||||
|
||||
self.swipeGaurdimagView.hidden = YES;
|
||||
self.startMaskButton.hidden = YES;
|
||||
UserGuardViewController *userGuardVC = [[UserGuardViewController alloc] init];
|
||||
if (ISIOS8) {
|
||||
userGuardVC.modalPresentationStyle = UIModalPresentationOverCurrentContext;
|
||||
|
|
@ -715,7 +737,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
self.navigationController.navigationBar.backgroundColor = [UIColor whiteColor];
|
||||
}
|
||||
|
||||
|
|
@ -809,7 +830,6 @@
|
|||
if (user.headImgUrl && ![user.headImgUrl isKindOfClass:[NSNull class]] ) {
|
||||
[self refreshUserIcon:user.headImgUrl];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#pragma mark 去分享
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@
|
|||
#import "SHineLabel.h"
|
||||
|
||||
@interface UserGuardViewController ()
|
||||
|
||||
@property(nonatomic,strong) UIImageView *handimage;
|
||||
@property(nonatomic,strong) UIImageView *upimage;
|
||||
|
||||
@end
|
||||
|
||||
|
|
@ -29,24 +31,39 @@
|
|||
|
||||
-(void)creatUI{
|
||||
|
||||
// UIButton *dismisBtn= [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
// //face
|
||||
// UIImageView *faceimage = [[UIImageView alloc] init];
|
||||
// faceimage.image = [UIImage imageNamed:@"bg_img_face"];
|
||||
// faceimage.contentMode = UIViewContentModeScaleAspectFit;
|
||||
// [self.view addSubview:faceimage];
|
||||
// [faceimage mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
//
|
||||
// [dismisBtn setTitle:@"知道了" forState:UIControlStateNormal];
|
||||
// [dismisBtn setTintColor:[UIColor whiteColor]];
|
||||
// dismisBtn.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];
|
||||
// [dismisBtn addTarget:self action:@selector(dismisBtnAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
// [self.view addSubview:dismisBtn];
|
||||
//
|
||||
// [dismisBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.width.mas_equalTo(100);
|
||||
// make.height.mas_equalTo(60);
|
||||
// make.size.mas_equalTo(CGSizeMake(99, 124));
|
||||
// make.centerX.mas_equalTo(self.view.mas_centerX);
|
||||
// make.top.mas_equalTo(self.view.mas_top).offset(200);
|
||||
// make.top.mas_equalTo(self.view.mas_top).offset(91);
|
||||
//
|
||||
// }];
|
||||
//
|
||||
// //mask
|
||||
// UIImageView *maskimage = [[UIImageView alloc] init];
|
||||
// maskimage.image = [UIImage imageNamed:@"mask_img_mask"];
|
||||
// maskimage.contentMode = UIViewContentModeScaleAspectFit;
|
||||
// [self.view addSubview:maskimage];
|
||||
// [maskimage mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.size.mas_equalTo(CGSizeMake(72, 87));
|
||||
// make.centerX.mas_equalTo(self.view.mas_centerX);
|
||||
// make.top.mas_equalTo(self.view.mas_top).offset(254);
|
||||
//
|
||||
// }];
|
||||
|
||||
// UIView *holdbackView = [[UIView alloc] initWithFrame:self.view.bounds];
|
||||
// holdbackView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.4];
|
||||
// [self.view addSubview:holdbackView];
|
||||
|
||||
//usergaurd_uphand
|
||||
UIImageView *upimage = [[UIImageView alloc] init];
|
||||
upimage.image = [UIImage imageNamed:@"userguard_up"];
|
||||
self.upimage = upimage;
|
||||
[self.view addSubview:upimage];
|
||||
[upimage mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.and.with.mas_equalTo(20);
|
||||
|
|
@ -85,6 +102,7 @@
|
|||
}];
|
||||
|
||||
// [self creatnaima];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -100,12 +118,22 @@
|
|||
make.top.mas_equalTo(201);
|
||||
|
||||
}];
|
||||
|
||||
[self->_upimage mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(201);
|
||||
}];
|
||||
|
||||
[self.view layoutIfNeeded];
|
||||
|
||||
} completion:^(BOOL finished) {
|
||||
|
||||
[self->_handimage mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(301);
|
||||
|
||||
}];
|
||||
[self->_upimage mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(298);
|
||||
|
||||
}];
|
||||
[self.view layoutIfNeeded];
|
||||
}];
|
||||
|
|
|
|||
|
|
@ -237,12 +237,15 @@
|
|||
if (index > _currentModel.answerList.count) {
|
||||
return;
|
||||
}
|
||||
|
||||
//答案整型非范围 设计稿范围展示!!
|
||||
NSLog(@"答案下标:%d",index);
|
||||
//修改答案默认下标
|
||||
|
||||
//返回时查看之前选中答案时使用
|
||||
_currentModel.slidervalue = value;
|
||||
//选中记录 修改答案默认下标 最终答案选择根据defaultFlag 1 时为选中答案
|
||||
[self changeAnswerDefaultflag:index];
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -330,8 +333,6 @@
|
|||
-(void)reloadViews{
|
||||
|
||||
//刷新问题相关数据
|
||||
|
||||
|
||||
if (_page == self.questonArray.count) {
|
||||
|
||||
NSAttributedString *nextTitle = [[NSAttributedString alloc] initWithString:@"完成" attributes:@{NSFontAttributeName:[UIFont fontWithName:GIGA_FONTBOLD size:18],NSForegroundColorAttributeName:[UIColor whiteColor]}];
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#import "UIButton+WebCache.h"
|
||||
#import "UIImageView+WebCache.h"
|
||||
#import "GiGaUserInfoVC.h"
|
||||
#import "LXCustomActionSheet.h"
|
||||
|
||||
@interface MaskTestResultVC ()
|
||||
|
||||
|
|
@ -314,26 +315,48 @@
|
|||
[self showFinalShareView];
|
||||
UIImage *image = [UIImage saveNavsuitImage:self.tableView];
|
||||
//[[GiGaFileNanager shareInstance] saveImaeToAlBum:image];
|
||||
[self jxt_showActionSheetWithTitle:@"分享到微信" message:@"" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||
// [self jxt_showActionSheetWithTitle:@"分享到微信" message:@"" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||
//
|
||||
// alertMaker.addActionDefaultTitle(@"微信好友");
|
||||
// alertMaker.addActionDefaultTitle(@"朋友圈");
|
||||
// alertMaker.addActionCancelTitle(@"取消");
|
||||
// } actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
|
||||
// [self hidSomeViews];
|
||||
// if (buttonIndex==0) {
|
||||
// //好友
|
||||
// [self shareImagToWX:image scene:WXSceneSession];
|
||||
//
|
||||
//
|
||||
// }else if (buttonIndex==1){
|
||||
// // 朋友圈
|
||||
// [self shareImagToWX:image scene:WXSceneTimeline];
|
||||
// }else{
|
||||
// GILog(@"取消");
|
||||
//
|
||||
// }
|
||||
// }];
|
||||
|
||||
LXCustomActionSheet *sheet = [[LXCustomActionSheet alloc] initWithTitle:@"分享到微信" optionsArr:@[@"微信好友",@"朋友圈"] cancelTitle:@"取消" selectedBlock:^(NSInteger index) {
|
||||
|
||||
alertMaker.addActionDefaultTitle(@"微信好友");
|
||||
alertMaker.addActionDefaultTitle(@"朋友圈");
|
||||
alertMaker.addActionCancelTitle(@"取消");
|
||||
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
|
||||
if (index==0) {
|
||||
[self hidSomeViews];
|
||||
//好友
|
||||
[self shareImagToWX:image scene:WXSceneSession];
|
||||
|
||||
|
||||
}else if (index==1){
|
||||
[self hidSomeViews];
|
||||
// 朋友圈
|
||||
[self shareImagToWX:image scene:WXSceneTimeline];
|
||||
}
|
||||
|
||||
} cancelBlock:^{
|
||||
[self hidSomeViews];
|
||||
if (buttonIndex==0) {
|
||||
//好友
|
||||
[self shareImagToWX:image scene:WXSceneSession];
|
||||
|
||||
|
||||
}else if (buttonIndex==1){
|
||||
// 朋友圈
|
||||
[self shareImagToWX:image scene:WXSceneTimeline];
|
||||
}else{
|
||||
GILog(@"取消");
|
||||
|
||||
}
|
||||
GILog(@"取消");
|
||||
}];
|
||||
|
||||
[sheet show];
|
||||
|
||||
}
|
||||
-(void)hidSomeViews{
|
||||
MaskResultShareViewCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:2 inSection:0]];
|
||||
|
|
@ -350,8 +373,7 @@
|
|||
cell.shareBtn.hidden = YES;
|
||||
cell.lastLabe.text = @"长按扫描二维码,测试你的肤质";
|
||||
self.tabheader.hidden = NO;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(void)shareImagToWX:(UIImage *)image scene:(int)scene{
|
||||
|
|
|
|||
|
|
@ -17,5 +17,7 @@
|
|||
@property (nonatomic,assign) int answer_id;
|
||||
//默认答案 1选中 0 非选中
|
||||
@property (nonatomic,assign) int defaultFlag;
|
||||
//答案h序号
|
||||
@property (nonatomic,assign) int sortNum;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#import <UIKit/UIKit.h>
|
||||
typedef NS_ENUM(NSInteger,GIGaQuestionSliderType)
|
||||
{
|
||||
GIGaQuestionSliderTypeGray = 0,//灰
|
||||
GIGaQuestionSliderTypeGray = 0,//灰 //红
|
||||
GIGaQuestionSliderTypeGradient ,//变色
|
||||
GIGaQuestionSliderTypeIndicator //带指示器
|
||||
};
|
||||
|
|
|
|||
|
|
@ -57,13 +57,14 @@
|
|||
}
|
||||
|
||||
-(void)creatGradient{
|
||||
|
||||
self.minimumTrackTintColor=[UIColor clearColor];
|
||||
self.maximumTrackTintColor=[UIColor clearColor];
|
||||
|
||||
NSArray *colorArr = @[(id)[[UIColor colorWithHex:0xFFFFFF] CGColor],
|
||||
(id)[[UIColor colorWithHex:0xFFF3E4] CGColor],
|
||||
(id)[[UIColor colorWithHex:0xFBC37B] CGColor]];
|
||||
NSArray *colorLocationArray = @[@0.0, @0.5, @1];
|
||||
NSArray *colorLocationArray = @[@0.0, @0.5, @1.0];
|
||||
CAGradientLayer * gradientLayer = [CAGradientLayer layer];
|
||||
gradientLayer.frame = self.bounds;
|
||||
gradientLayer.masksToBounds = YES;
|
||||
|
|
@ -76,18 +77,21 @@
|
|||
[gradientLayer setStartPoint:CGPointMake(0, 0)];
|
||||
[gradientLayer setEndPoint:CGPointMake(1, 0)];
|
||||
[self.layer addSublayer:gradientLayer];
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(void)createUI{
|
||||
|
||||
self.minimumValue = 0.0;
|
||||
self.maximumValue = 1.0;
|
||||
self.minimumTrackTintColor = GIGARGB(216,216, 216, 1);
|
||||
self.maximumTrackTintColor = GIGARGB(216,216, 216, 1);
|
||||
// self.minimumTrackTintColor = GIGARGB(216,216, 216, 1);
|
||||
// self.maximumTrackTintColor = GIGARGB(216,216, 216, 1);
|
||||
self.minimumTrackTintColor = GIGAUIColorFromRGBA(0xEA4D4D);
|
||||
self.maximumTrackTintColor = GIGAUIColorFromRGBA(0xEA4D4D);
|
||||
|
||||
}
|
||||
|
||||
|
||||
-(CGRect)trackRectForBounds:(CGRect)bounds
|
||||
{
|
||||
bounds.origin.x = bounds.origin.x;
|
||||
|
|
@ -95,6 +99,7 @@
|
|||
bounds.size.height = bounds.size.height;
|
||||
bounds.size.width = bounds.size.width;
|
||||
return bounds;
|
||||
|
||||
}
|
||||
|
||||
-(void)thumbimageView{
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
|
|
@ -49,6 +49,7 @@
|
|||
<connections>
|
||||
<outlet property="answerTitle" destination="iR5-Lj-9dP" id="Jlc-ce-rWZ"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="137.59999999999999" y="148.42578710644679"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -80,13 +80,15 @@
|
|||
-(void)creatPopSlider{
|
||||
|
||||
[self creatTab];
|
||||
NYSliderPopover *slider = [[NYSliderPopover alloc] init];
|
||||
slider.frame = CGRectMake(0,self.frame.size.height,self.frame.size.height, 13);
|
||||
NYSliderPopover *slider = [[NYSliderPopover alloc] initWithFrame:CGRectMake(0,self.frame.size.height,self.frame.size.height, 14)];
|
||||
// slider.frame = CGRectMake(0,self.frame.size.height,self.frame.size.height, 14);
|
||||
[slider addTarget:self action:@selector(updateValue:) forControlEvents:UIControlEventValueChanged];
|
||||
self.poSlider = slider;
|
||||
self.poSlider = slider;
|
||||
[self addSubview:slider];
|
||||
//self.poSlider.value = self.currentModel.slidervalue;
|
||||
self.poSlider.value = self.currentModel.slidervalue;
|
||||
self.poSlider.transform = CGAffineTransformMakeRotation(- M_PI/2);
|
||||
//NSLog(@"popslider%@",self.poSlider);
|
||||
|
||||
}
|
||||
|
||||
-(void)creatNormalStyle:(NSArray *)titles style:(GIGaQuestionSliderType)type{
|
||||
|
|
@ -96,12 +98,13 @@
|
|||
|
||||
-(void)creatSliderType:(GIGaQuestionSliderType)type{
|
||||
|
||||
GIGaQuestionSlider *slider = [[GIGaQuestionSlider alloc] initWithFrame:CGRectMake(0,self.frame.size.height,self.frame.size.height, 13) type:type];
|
||||
GIGaQuestionSlider *slider = [[GIGaQuestionSlider alloc] initWithFrame:CGRectMake(0,self.frame.size.height,self.frame.size.height, 14) type:type];
|
||||
[slider addTarget:self action:@selector(updateValue:) forControlEvents:UIControlEventValueChanged];
|
||||
self.slider = slider;
|
||||
[self.slider setValue:self.currentModel.slidervalue];
|
||||
[self addSubview:slider];
|
||||
self.slider.transform = CGAffineTransformMakeRotation(- M_PI/2);
|
||||
|
||||
}
|
||||
|
||||
-(void)layoutSubviews{
|
||||
|
|
@ -145,9 +148,9 @@
|
|||
|
||||
[self selectNOBtnState:self.noBtn];
|
||||
}else{
|
||||
|
||||
[self selctYesBtnState:self.yesBtn];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#pragma mark 是
|
||||
|
|
@ -192,8 +195,40 @@
|
|||
|
||||
-(void)updateValue:(UISlider *)slider{
|
||||
NSLog(@"value%f",slider.value);
|
||||
// 2 ,3 ,5 题slider 滑动时自动滑动到答案
|
||||
|
||||
if (self.poSlider) {
|
||||
//1 范围匹配取值
|
||||
[self anlysisAnswerWithSlider:slider.value];
|
||||
}else{
|
||||
// 2 ,3 ,5 题slider 滑动时自动滑动到答案
|
||||
// 范围0 ~ 100
|
||||
//每一份高度
|
||||
NSInteger totalCount = _answerList.count;
|
||||
CGFloat powSize = 100.f / (totalCount -1);
|
||||
//当前值
|
||||
CGFloat currentValue = slider.value * 100.f;
|
||||
//答案游标
|
||||
int count = currentValue / powSize;
|
||||
//最终自动滑到答案slider对应的value
|
||||
int index = 0 ;
|
||||
index = (int)_answerList.count - 1 -count;
|
||||
if (index < 0) {
|
||||
index = 0;
|
||||
}
|
||||
NSLog(@"%d",index);
|
||||
float value = 1.f/(totalCount -1) * count;
|
||||
NSLog(@"%f",value);
|
||||
[self anlysisAnswerWithSlider:value];
|
||||
[self sliderAutoChoiceAnswerValue:value];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[self anlysisAnswerWithSlider:slider.value];
|
||||
-(void)sliderAutoChoiceAnswerValue:(float)value{
|
||||
|
||||
[self.slider setValue:value];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark 题目答案解析
|
||||
|
|
@ -228,7 +263,7 @@
|
|||
//答案游标 1开始
|
||||
int count = currentValue / powSize;
|
||||
|
||||
//答案数组下标
|
||||
//答案数组下标 与slider值逆序对应(slider 0 对应 数组最大下标)
|
||||
int index = 0 ;
|
||||
index = (int)_answerList.count - 1 -count;
|
||||
if (index < 0) {
|
||||
|
|
|
|||
|
|
@ -23,8 +23,18 @@
|
|||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
|
||||
|
||||
[self thumbimageView];
|
||||
[self createUI];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self thumbimageView];
|
||||
[self createUI];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
@ -34,16 +44,15 @@
|
|||
|
||||
- (NYPopover *)popover
|
||||
{
|
||||
if (_popover == nil) {
|
||||
if (_popover == nil){
|
||||
//Default size, can be changed after
|
||||
[self addTarget:self action:@selector(updatePopoverFrame) forControlEvents:UIControlEventValueChanged];
|
||||
_popover = [[NYPopover alloc] initWithFrame:CGRectMake(self.frame.origin.x, self.frame.origin.y - 32, 40, 32)];
|
||||
[self updatePopoverFrame];
|
||||
_popover.alpha = 0;
|
||||
[self.superview addSubview:_popover];
|
||||
|
||||
[self thumbimageView];
|
||||
[self createUI];
|
||||
// [self thumbimageView];
|
||||
// [self createUI];
|
||||
}
|
||||
|
||||
return _popover;
|
||||
|
|
@ -52,7 +61,8 @@
|
|||
- (void)setValue:(float)value
|
||||
{
|
||||
[super setValue:value];
|
||||
[self updatePopoverFrame];
|
||||
//[self updatePopoverFrame];
|
||||
|
||||
}
|
||||
|
||||
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
|
||||
|
|
@ -157,8 +167,10 @@
|
|||
|
||||
self.minimumValue = 0.0;
|
||||
self.maximumValue = 1.0;
|
||||
self.minimumTrackTintColor = GIGARGB(216,216, 216, 1);
|
||||
self.maximumTrackTintColor = GIGARGB(216,216, 216, 1);
|
||||
// self.minimumTrackTintColor = GIGARGB(216,216, 216, 1);
|
||||
// self.maximumTrackTintColor = GIGARGB(216,216, 216, 1);
|
||||
self.minimumTrackTintColor = GIGAUIColorFromRGBA(0xEA4D4D);
|
||||
self.maximumTrackTintColor = GIGAUIColorFromRGBA(0xEA4D4D);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -171,6 +183,8 @@
|
|||
return bounds;
|
||||
}
|
||||
|
||||
|
||||
|
||||
-(void)thumbimageView{
|
||||
|
||||
[self setThumbImage:[self OriginImage:[UIImage imageNamed:@"btn_slider_thumb"] scaleToSize:CGSizeMake(40, 40)] forState:UIControlStateNormal];
|
||||
|
|
@ -236,7 +250,6 @@
|
|||
if ((point.x >= _lastBounds.origin.x - thumbBound_x) && (point.x <= (_lastBounds.origin.x + _lastBounds.size.width + thumbBound_x)) && (point.y < (_lastBounds.size.height + thumbBound_y))) {
|
||||
result = YES;
|
||||
}
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,7 +88,17 @@ typedef NS_ENUM(NSUInteger, GYTitlePosition) {
|
|||
weakSelf.textLabel.layer.position = weakSelf.bottomPosition;
|
||||
weakSelf.needDealy = DEALY_WHEN_TITLE_IN_BOTTOM;
|
||||
weakSelf.currentIndex ++;
|
||||
weakSelf.textLabel.text = [weakSelf.contentsAry objectAtIndex:[weakSelf realCurrentIndex]];
|
||||
NSString *tex = [weakSelf.contentsAry objectAtIndex:[weakSelf realCurrentIndex]];
|
||||
if ([tex isEqualToString:@"面膜时间"]) {
|
||||
weakSelf.textLabel.font = GIGA_TEXTFONTMEDIUM(18);
|
||||
}else{
|
||||
if (KMainW < 375) {
|
||||
weakSelf.textLabel.font = GIGA_TEXTFONTMEDIUM(10);
|
||||
}else{
|
||||
weakSelf.textLabel.font = GIGA_TEXTFONTMEDIUM(12);
|
||||
}
|
||||
}
|
||||
weakSelf.textLabel.text = tex;
|
||||
} else {
|
||||
weakSelf.needDealy = DEALY_WHEN_TITLE_IN_MIDDLE;
|
||||
}
|
||||
|
|
@ -96,7 +106,17 @@ typedef NS_ENUM(NSUInteger, GYTitlePosition) {
|
|||
[weakSelf startAnimation];
|
||||
} else { //停止动画后,要设置label位置和label显示内容
|
||||
weakSelf.textLabel.layer.position = weakSelf.middlePosition;
|
||||
weakSelf.textLabel.text = [weakSelf.contentsAry objectAtIndex:[weakSelf realCurrentIndex]];
|
||||
NSString *tex = [weakSelf.contentsAry objectAtIndex:[weakSelf realCurrentIndex]];
|
||||
if ([tex isEqualToString:@"面膜时间"]) {
|
||||
weakSelf.textLabel.font = GIGA_TEXTFONTMEDIUM(18);
|
||||
}else{
|
||||
if (KMainW < 375) {
|
||||
weakSelf.textLabel.font = GIGA_TEXTFONTMEDIUM(10);
|
||||
}else{
|
||||
weakSelf.textLabel.font = GIGA_TEXTFONTMEDIUM(12);
|
||||
}
|
||||
}
|
||||
weakSelf.textLabel.text = tex;
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -308,8 +308,7 @@
|
|||
if (!self.user.nickName || [self.user.nickName isKindOfClass:[NSNull class]]) {
|
||||
self.user.nickName = @"";
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ( self.user.nickName.length >40 ) {
|
||||
GIGA_ShowToast(@"用户名1-40字符长度")
|
||||
return;
|
||||
|
|
@ -353,12 +352,11 @@
|
|||
[api requstDataWithResult:^(GiGaAPIResult *result) {
|
||||
[self.view hideToastActivity];
|
||||
if (result.success) {
|
||||
GIGA_ShowToast(@"修改成功");
|
||||
|
||||
GIGA_WIndowTost(@"修改成功")
|
||||
[[GiGaUserManager shareUser] saveUser:self.user];
|
||||
|
||||
NC_POST_NAME_OBJECT(kUserNameUpDateNoti, nil);
|
||||
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
|
||||
}else{
|
||||
GIGA_ShowToast(result.dic[@"msg"]);
|
||||
if (result.code == 401) {
|
||||
|
|
|
|||
|
|
@ -25,12 +25,15 @@
|
|||
- (void)textViewDidChange:(UITextView *)textView
|
||||
{
|
||||
if (textView == self.contentFiled) {
|
||||
if (textView.text.length == 0) {
|
||||
self.holdLabe.hidden = NO;
|
||||
}
|
||||
|
||||
if ( textView.text.length <=100 ) {
|
||||
self.holdLabe.hidden = YES;
|
||||
|
||||
if ( textView.text.length <=100) {
|
||||
if (textView.text.length == 0) {
|
||||
self.holdLabe.hidden = NO;
|
||||
}else{
|
||||
self.holdLabe.hidden = YES;
|
||||
}
|
||||
|
||||
self.numberCountLabe.text = [NSString stringWithFormat:@"%lu/100",(unsigned long)textView.text.length];
|
||||
self.contentFiled.text = textView.text;
|
||||
self.textMAx = textView.text;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
|
|
@ -32,10 +32,10 @@
|
|||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Kst-pD-CHd">
|
||||
<rect key="frame" x="25" y="43.5" width="324.5" height="0.5"/>
|
||||
<rect key="frame" x="25" y="43" width="324.5" height="0.5"/>
|
||||
<color key="backgroundColor" red="0.87058823529999996" green="0.87058823529999996" blue="0.87058823529999996" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="0.5" id="Uus-Ns-JTy"/>
|
||||
<constraint firstAttribute="height" constant="0.5" id="ESZ-rm-dCn"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_indicator_right" translatesAutoresizingMaskIntoConstraints="NO" id="bdq-X4-7Cg">
|
||||
|
|
@ -47,14 +47,14 @@
|
|||
</imageView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="Kst-pD-CHd" secondAttribute="trailing" constant="25.5" id="C8S-X7-7Rz"/>
|
||||
<constraint firstItem="y6H-zg-4yv" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="120" id="DIy-Iq-K1L"/>
|
||||
<constraint firstAttribute="trailing" secondItem="bdq-X4-7Cg" secondAttribute="trailing" constant="17" id="Fbe-Qg-IBx"/>
|
||||
<constraint firstItem="Kst-pD-CHd" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="25" id="MHr-ud-Hb1"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Kst-pD-CHd" secondAttribute="trailing" constant="25.5" id="IIY-Ji-Vmi"/>
|
||||
<constraint firstItem="Kst-pD-CHd" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="25" id="L6U-8j-1kg"/>
|
||||
<constraint firstItem="bdq-X4-7Cg" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" constant="0.25" id="a00-Gq-hFr"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Kst-pD-CHd" secondAttribute="bottom" constant="-0.5" id="eZ9-17-ap9"/>
|
||||
<constraint firstItem="OA0-rJ-5qY" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="i9g-Lz-1cw"/>
|
||||
<constraint firstItem="OA0-rJ-5qY" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="29" id="mRd-S1-39D"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Kst-pD-CHd" secondAttribute="bottom" id="skw-un-GQY"/>
|
||||
<constraint firstItem="y6H-zg-4yv" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="uJ4-iv-cmb"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="用户ID" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HzQ-bQ-e0n">
|
||||
<rect key="frame" x="29" y="11" width="42" height="20"/>
|
||||
<rect key="frame" x="29" y="12" width="42" height="20"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="14"/>
|
||||
<color key="textColor" red="0.21568627450980393" green="0.21568627450980393" blue="0.21568627450980393" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
|
|
@ -32,21 +32,21 @@
|
|||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jfm-bd-p6y">
|
||||
<rect key="frame" x="25" y="43.5" width="324.5" height="0.5"/>
|
||||
<rect key="frame" x="25" y="43" width="324.5" height="0.5"/>
|
||||
<color key="backgroundColor" red="0.87058823529999996" green="0.87058823529999996" blue="0.87058823529999996" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="0.5" id="YID-hl-czK"/>
|
||||
<constraint firstAttribute="height" constant="0.5" id="w9m-PB-GIh"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="jfm-bd-p6y" secondAttribute="trailing" constant="25.5" id="0aS-wo-eDs"/>
|
||||
<constraint firstItem="4Oa-fe-SvG" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="120" id="0jr-ZC-Wlq"/>
|
||||
<constraint firstItem="HzQ-bQ-e0n" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="F58-gR-xKI"/>
|
||||
<constraint firstItem="HzQ-bQ-e0n" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="29" id="J1t-bO-G6L"/>
|
||||
<constraint firstItem="4Oa-fe-SvG" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="dm8-pf-orr"/>
|
||||
<constraint firstAttribute="trailing" secondItem="jfm-bd-p6y" secondAttribute="trailing" constant="25.5" id="iLR-ky-qmP"/>
|
||||
<constraint firstItem="jfm-bd-p6y" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="25" id="oFi-j8-zxh"/>
|
||||
<constraint firstAttribute="bottom" secondItem="jfm-bd-p6y" secondAttribute="bottom" constant="-0.5" id="xz1-B6-c0m"/>
|
||||
<constraint firstAttribute="bottom" secondItem="jfm-bd-p6y" secondAttribute="bottom" id="nd0-8D-77E"/>
|
||||
<constraint firstItem="jfm-bd-p6y" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="25" id="ngh-6l-0sT"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="微信号" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="96G-Rk-4QP">
|
||||
<rect key="frame" x="29" y="4" width="42" height="34"/>
|
||||
<rect key="frame" x="29" y="5" width="42" height="34"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="34" id="7uO-em-FCR"/>
|
||||
</constraints>
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="输入微信号" textAlignment="natural" minimumFontSize="13" translatesAutoresizingMaskIntoConstraints="NO" id="ZiU-cX-tf9">
|
||||
<rect key="frame" x="120" y="4" width="241" height="34"/>
|
||||
<rect key="frame" x="120" y="5" width="241" height="34"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="34" id="EQ6-lD-lta"/>
|
||||
</constraints>
|
||||
|
|
@ -37,12 +37,22 @@
|
|||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="13"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="11w-XI-Rl5">
|
||||
<rect key="frame" x="25" y="43" width="326" height="1"/>
|
||||
<color key="backgroundColor" red="0.87058823529411766" green="0.87058823529411766" blue="0.87058823529411766" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="0.5" id="7cy-Jh-XpW"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="ZiU-cX-tf9" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="CAa-I5-ohs"/>
|
||||
<constraint firstAttribute="trailing" secondItem="11w-XI-Rl5" secondAttribute="trailing" constant="24" id="Why-Gg-HX9"/>
|
||||
<constraint firstItem="11w-XI-Rl5" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="25" id="e1G-l5-v0d"/>
|
||||
<constraint firstItem="96G-Rk-4QP" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="29" id="eDQ-I2-ePA"/>
|
||||
<constraint firstItem="ZiU-cX-tf9" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="120" id="edd-QI-enH"/>
|
||||
<constraint firstItem="96G-Rk-4QP" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="f7e-nm-2FR"/>
|
||||
<constraint firstAttribute="bottom" secondItem="11w-XI-Rl5" secondAttribute="bottom" id="kRj-0c-c0b"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ZiU-cX-tf9" secondAttribute="trailing" constant="14" id="zF4-Al-MXL"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
|
|
@ -51,7 +61,7 @@
|
|||
<outlet property="descTitle" destination="96G-Rk-4QP" id="Jny-7N-qig"/>
|
||||
<outlet property="weiXinCount" destination="ZiU-cX-tf9" id="pgd-yd-pSv"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-87.5" y="67"/>
|
||||
<point key="canvasLocation" x="-159.19999999999999" y="-18.890554722638683"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@
|
|||
[self.usermale setImage:[UIImage imageNamed:@"sex_selected"] forState:UIControlStateNormal];
|
||||
[self.usefemale setImage:[UIImage imageNamed:@"sex_disselect"] forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(void)usermaleClick{
|
||||
self.actionblock(1);
|
||||
[self configUserSex:1];
|
||||
|
|
|
|||
Loading…
Reference in New Issue