new login style

This commit is contained in:
lianxiang
2018-10-15 19:26:07 +08:00
parent 71f6176cea
commit 94ce6d3e14
30 changed files with 533 additions and 218 deletions
@@ -19,9 +19,12 @@
#import "UIImageView+WebCache.h"
#import "UIButton+WebCache.h"
#import "GiGaUserInfoVC.h"
#import "GIGaSharePageViewController.h"
@interface GIGaMaskShareViewController ()<UIImagePickerControllerDelegate,UINavigationControllerDelegate>
@property(nonatomic,strong) GiGaShareModel *model;
@property(nonatomic,strong)NSMutableArray *viewControllers;
@end
@implementation GIGaMaskShareViewController
@@ -177,9 +180,9 @@
case 1:
{
//系统
[GIGaUserFileHelper delectShareImage:kUSERSHAREA_IMAGENAME];
ShareViewController *share = [[ShareViewController alloc] init];
share.model = self.model;
//[GIGaUserFileHelper delectShareImage:kUSERSHAREA_IMAGENAME];
GIGaSharePageViewController *share = [[GIGaSharePageViewController alloc] initWithControllers:self.viewControllers];
//share.model = self.model;
[self presentViewController:share animated:NO completion:nil];
}
@@ -198,12 +201,43 @@
}
- (NSMutableArray *)viewControllers {
if (!_viewControllers) {
_viewControllers = [NSMutableArray array];
NSArray *descArr = @[@"生活不易,必须美丽",@"长夜漫漫,不如面膜时间",@"敷片面膜,人间值得",@"打开面膜时间,撰写你与美丽的故事",@"人越美丽,责任越大",@"吃得苦中苦,方为人上人",@"该放弃的决不挽留,该留住的决不放手"];
NSArray *images = @[@"sharebg_1",@"sharebg_2",@"sharebg_3",@"sharebg_4",@"sharebg_5",@"sharebg_6",@"sharebg_7"];
NSArray *shareimages = @[@"share_oneblack",@"share_one",@"share_one",@"share_one",@"share_one",@"share_one",@"share_one"];
NSArray *desColor = @[@1,@1,@2,@1,@1,@1,@2];
NSArray*doingcolorS = @[@2,@3,@2,@2,@2,@2,@2];
for (int i = 0; i <descArr.count; i++) {
ShareViewController *vc = [[ShareViewController alloc] init];
GiGaLoaclImageModel *model = [[GiGaLoaclImageModel alloc] init];
model.desc = descArr[i];
model.localImageName = images[i];
model.shareLabeimageName = shareimages[i];
model.doingColorflag = [doingcolorS[i] integerValue];
model.descColorflag = [desColor[i] integerValue];
vc.localModel = model;
vc.model = self.model;
[_viewControllers addObject:vc];
}
}
return _viewControllers;
}
#pragma mark share
-(void)shareBtnAction{
ShareViewController *share = [[ShareViewController alloc] init];
share.model = self.model;
[self presentViewController:share animated:YES completion:nil];
GIGaSharePageViewController *share = [[GIGaSharePageViewController alloc] initWithControllers:self.viewControllers];
//share.model = self.model;
[self presentViewController:share animated:NO completion:nil];
// ShareViewController *share = [[ShareViewController alloc] init];
// share.model = self.model;
// [self presentViewController:share animated:YES completion:nil];
//
}
@@ -281,7 +315,6 @@
-(void)requestshareInfo{
if (self.maskTimeId == nil) {
return;
}
@@ -7,11 +7,12 @@
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
//#import "GiGaShareModel.h"
@interface GIGaSharePageViewController : UIViewController
//@property(nonatomic,strong) GiGaShareModel *model;
- (instancetype)initWithControllers:(NSArray *)viewControllers;
@end
NS_ASSUME_NONNULL_END
@@ -8,25 +8,146 @@
#import "GIGaSharePageViewController.h"
@interface GIGaSharePageViewController ()
@interface GIGaSharePageViewController ()<UIPageViewControllerDataSource,UIPageViewControllerDelegate,UIScrollViewDelegate>
{
BOOL _done; //是否翻页完成
NSInteger _currentPage;//当前控制器对应下标
}
@property(nonatomic,strong) UIPageViewController *pageVC;
//@property(nonatomic,strong) NSArray *titles;
@property(nonatomic,strong) NSArray *viewControllers;
@property(nonatomic,strong) UIPageControl *pageControl;
@end
@implementation GIGaSharePageViewController
- (UIPageControl *)pageControl{
if (!_pageControl) {
_pageControl = [[UIPageControl alloc] init];
_pageControl.frame = CGRectMake(KMainW / 2 - 100, KMainH - 20, 200, 20);
_pageControl.numberOfPages = self.viewControllers.count;
_pageControl.hidesForSinglePage = YES;
_pageControl.userInteractionEnabled = NO;
}
return _pageControl;
}
- (instancetype)initWithControllers:(NSArray *)viewControllers{
self = [super init];
if (self) {
self.viewControllers = viewControllers;
}
return self;
}
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
// Do any additional setup after loading the view.
[self addChildViewController:self.pageVC];
[self.view addSubview:self.pageVC.view];
[self.view addSubview:self.pageControl];
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
#pragma mark - UIPageViewControllerDataSource
// 返回下一个ViewController对象
- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController {
NSUInteger index = [self indexOfViewController:viewController];
if (index == NSNotFound) {
return nil;
}
index++;
if (index == [self.viewControllers count]) {
return nil;
}
return self.viewControllers[index];
}
*/
// 返回上一个ViewController对象
- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController {
NSUInteger index = [self indexOfViewController:viewController];
if (index == 0 || index == NSNotFound) {
return nil;
}
index--;
return self.viewControllers[index];
}
#pragma mark - UIPageViewControllerDelegate
// 开始翻页调用
- (void)pageViewController:(UIPageViewController *)pageViewController willTransitionToViewControllers:(NSArray<UIViewController *> *)pendingViewControllers NS_AVAILABLE_IOS(6_0) {
NSLog(@"开始翻页");
}
// 翻页完成调用
- (void)pageViewController:(UIPageViewController *)pageViewController didFinishAnimating:(BOOL)finished previousViewControllers:(NSArray<UIViewController *> *)previousViewControllers transitionCompleted:(BOOL)completed {
_done = YES;
NSInteger index = [self.viewControllers indexOfObject:pageViewController.viewControllers[0]];
_currentPage = index;
[_pageControl setCurrentPage:_currentPage];
NSLog(@"翻页完成");
}
-(UIInterfaceOrientation)pageViewControllerPreferredInterfaceOrientationForPresentation:(UIPageViewController *)pageViewController NS_AVAILABLE_IOS(7_0) __TVOS_PROHIBITED {
return UIInterfaceOrientationPortrait;
}
#pragma mark - Tool
// 根据数组元素,得到下标值
- (NSUInteger)indexOfViewController:(UIViewController *)viewControlller {
return [self.viewControllers indexOfObject:viewControlller];
}
#pragma mark - SCrollViewDelegate
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
// LOG(@"滚动 = %f", scrollView.contentOffset.x-SCREEN_WIDTH);
//CGFloat offsetX = scrollView.contentOffset.x-KMainW;
if (!_done) {
[_pageControl setCurrentPage:_currentPage];
}else
{
_done = NO;
}
}
- (UIPageViewController *)pageVC {
if (!_pageVC) {
_pageVC = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options:nil];
_pageVC.dataSource = self;
_pageVC.delegate = self;
_pageVC.view.frame = CGRectMake(0,0,KMainW, KMainH);
for (UIView *subview in _pageVC.view.subviews) {
[(UIScrollView *)subview setDelegate:self];
//设置是否支持手势滑动
// [(UIScrollView *)subview setScrollEnabled:NO];
}
[_pageVC setViewControllers:@[self.viewControllers[0]] direction:UIPageViewControllerNavigationDirectionForward animated:YES completion:nil];
}
return _pageVC;
}
@end
@@ -20,7 +20,7 @@
#import "GiGaUserDefault.h"
#import "GiGaServerConfig.h"
#import "GiGaQuestionVC.h"
#import "GiGaBaseAPiRequest.h"
//弹幕控制器
@interface GiGaFlingCommitVC ()
@@ -161,6 +161,13 @@
self.commitInputView.SendCommentHandler = ^(NSString *content) {
GILog(@"发送->:%@",content);
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
if (!isUserLogin) {
[GiGaBaseAPiRequest userTokenTimeOutGologinFromVC:weakSelf];
return ;
}
NSArray *arr = @[@{
@"content":content,
@"room":@"",
@@ -175,11 +182,8 @@
//socket
[self connetction];
//显示隐藏输入框
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
if (!isUserLogin) {
self.commitInputView.hidden = YES;
}
}
@@ -69,7 +69,7 @@
- (MaskTimeTopAnimationView *)animLabeview{
if (!_animLabeview) {
_animLabeview = [[MaskTimeTopAnimationView alloc] initWithFrame:CGRectMake(0,20+ PhoneX_TopMargin,KMainW - 40 * 2, 44)];
NSString *text = @"长时间的使用面膜可能会对您的皮肤造成伤害";
NSString *text = @"配合测试结果的时间敷面膜效果更好哦";
[_animLabeview animationWithTexts:[NSArray arrayWithObjects:text,@"面膜时间",text, nil]];
//_animLabeview.backgroundColor = [UIColor blueColor];
@@ -185,7 +185,6 @@
}else{
text = @"测试肤质";
}
NSAttributedString *title = [GiGaHelper stringWithText:text textColor:[UIColor whiteColor] textFont:GIGA_TEXTFONTBOLD(18) leterSpace:0];
[_startTestButton setAttributedTitle:title forState:UIControlStateNormal];
[_startTestButton addTarget:self action:@selector(testBtnAcion:) forControlEvents:UIControlEventTouchUpInside];
@@ -207,7 +206,6 @@
#pragma mark 弹幕
-(void)createInputView{
GiGaFlingCommitVC* GiGaFlingVC = [[GiGaFlingCommitVC alloc] init];
if (ISIOS8) {
GiGaFlingVC.modalPresentationStyle = UIModalPresentationOverCurrentContext;
@@ -240,12 +238,12 @@
if (showAppGaurd == NO) {
[self showAPPappGaurdView];
}
// [self showUserGaurdView];
}
-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
[self.navigationController.navigationBar setTranslucent:NO];
if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
@@ -259,7 +257,7 @@
[self setUpNav];
[self initUI];
[self addNotify];
[self creatBackGroundMusic];
//[self creatBackGroundMusic];
[self creatMaskTimeSatrtMusic];
}
@@ -268,7 +266,7 @@
-(void)maskupSwipeGesture{
[self animaMask];
}
#pragma mark 点击手势
#pragma mark 点击手势结束面膜时间
-(void)maskTapAction{
[self animaMask];
}
@@ -358,7 +356,6 @@
self.cicleProgressView.hidden = YES;
self.swipeGaurdimagView.hidden = NO;
self.startMaskButton.hidden = NO;
[self.view layoutIfNeeded];
[UIView animateWithDuration:1.0 animations:^{
@@ -509,7 +506,7 @@
}
delegate.isMasking = YES;
[_startMaskMusic play];
[_musicPalyer play];
//[_musicPalyer play];
// [self setBackGroundPlayingInfo];//锁屏音频信息
//总时间隔 s
@@ -520,7 +517,7 @@
//[self showWaringView];
//app 前台时收到本地通知showAlert 后台时通知提醒
[[GiGaLocalNotificationManager localNotifiationCenter] sendLocalNotification:@"面膜时间闹钟" fireTimeInterval:timeInterVal alertAction:@"面膜时间" withIdentifier:kLOCALNotifiID_MASKETIMEEND];
[[GiGaLocalNotificationManager localNotifiationCenter] sendLocalNotification:@"面膜时间结束" fireTimeInterval:timeInterVal alertAction:@"面膜时间提醒" withIdentifier:kLOCALNotifiID_MASKETIMEEND];
}
@@ -571,10 +568,10 @@
//面膜时间结束时设置 全局变量 不再发送本地通知 提醒
AppDelegate *delegate =(AppDelegate *) [[UIApplication sharedApplication] delegate];
delegate.isMasking = NO;
[_musicPalyer stop];
//[_musicPalyer stop];
//震动 需用户手动开启震动模式
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
//复原动画
[self endMaskAnimation];
@@ -583,7 +580,10 @@
#pragma mark 开始测试
-(void)testBtnAcion:(UIButton *)btn{
// GIGaMaskShareViewController *shareVC = [[GIGaMaskShareViewController alloc] init];
// shareVC.maskTimeId = self.currentMaskId;
// [self.navigationController pushViewController:shareVC animated:YES];
// return;
// NSDictionary *dic = @{
// @"dryness":@"0.41",
// @"drynessPercent":@"41%",
@@ -763,7 +763,6 @@
GiGaUserLoginVC *userlogInVC= [[GiGaUserLoginVC alloc] init];
GiGaBaseNavViewController *baseNav = [[GiGaBaseNavViewController alloc] initWithRootViewController:userlogInVC];
[self presentViewController:baseNav animated:YES completion:nil];
}
}
@@ -854,7 +853,6 @@
[self.navigationController pushViewController:shareVC animated:YES];
}
}];
}
}
@@ -894,7 +892,6 @@
[api requstDataWithResult:^(GiGaAPIResult *result) {
if (result.success) {
GILog(@"%@",@"面膜时间APi结束");
}
}];
}
@@ -8,8 +8,10 @@
#import "GiGaBaseViewController.h"
#import "GiGaShareModel.h"
#import "GiGaLoaclImageModel.h"
@interface ShareViewController : GiGaBaseViewController
@property(nonatomic,strong) GiGaShareModel *model;
@property(nonatomic,strong) GiGaLoaclImageModel *localModel;
@end
@@ -20,34 +20,35 @@
#import "UIImage+ShotImage.h"
#import "GiGaBaseAPiRequest.h"
#import "UIImageView+WebCache.h"
#import "GIGaSharePageViewController.h"
#import "LXCustomActionSheet.h"
@interface ShareViewController ()<UITableViewDelegate,UITableViewDataSource,UIImagePickerControllerDelegate,UINavigationControllerDelegate>
@property(nonatomic,strong) UITableView *tab;
@property(nonatomic,strong) UIImageView *backimageview ;
@property(nonatomic) int curentImageIndex ;
@property(nonatomic,strong) NSArray *descArr;
//
@property(nonatomic,strong)NSMutableArray *viewControllers;
@end
@implementation ShareViewController
- (void)viewDidLoad {
[super viewDidLoad];
_curentImageIndex = 5;
[self creatTabUI];
self.descArr = @[@"生活不易,必须美丽",@"长夜漫漫,不如面膜时间",@"敷片面膜,人间值得",@"打开面膜时间,撰写你与美丽的故事",@"人越美丽,责任越大",@"吃得苦中苦,方为人上人",@"该放弃的决不挽留,该留住的决不放手"];
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
backBtn.frame = CGRectMake(20,20 +PhoneX_TopMargin, 40, 40);
backBtn.frame = CGRectMake(15,20 +PhoneX_TopMargin, 40, 40);
[backBtn setImage:[UIImage imageNamed:@"btn_moment_back"] forState:UIControlStateNormal];
[backBtn addTarget:self action:@selector(backBtnAction) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:backBtn];
[self creatBtns];
NC_ADD_TARGET_NAME_OBJECT(self, @selector(usershareSuccessNoti), NC_UseShareSuccessNoti, nil);
}
@@ -69,10 +70,15 @@
backimageview.contentMode = UIViewContentModeScaleAspectFill;
backimageview.frame = CGRectMake(0,0,self.view.frame.size.width, self.view.frame.size.height);
backimageview.userInteractionEnabled = YES;
backimageview.image = [GIGaUserFileHelper getUserShareImage:kUSERSHAREA_IMAGENAME];
self.backimageview = backimageview;
//默认背景 拍照 相册 或本地
if (self.localModel) {
backimageview.image = [UIImage imageNamed:self.localModel.localImageName];
}else{
backimageview.image = [GIGaUserFileHelper getUserShareImage:kUSERSHAREA_IMAGENAME];
}
self.backimageview = backimageview;
self.tab.backgroundView = backimageview;
}
@@ -91,8 +97,31 @@
cell = [[[NSBundle mainBundle] loadNibNamed:@"MaskTimeShareViewCell" owner:self options:nil] lastObject];
}
//默认
cell.descLabe.text = self.descArr[self.curentImageIndex];
if (self.localModel) {
//本地
cell.descLabe.text = self.localModel.desc;
if (self.localModel.descColorflag == 1) {
cell.descLabe.textColor = [UIColor whiteColor];
}else{
cell.descLabe.textColor = [UIColor blackColor];
}
if (self.localModel.doingColorflag == 1) {
cell.doinglabel.textColor = [UIColor whiteColor];
}else if (self.localModel.descColorflag == 3){
cell.doinglabel.textColor = GIGARGB(170, 170, 170, 1);
}else{
cell.doinglabel.textColor = [UIColor blackColor];
}
cell.shareLabe.image = [UIImage imageNamed:self.localModel.shareLabeimageName];
}else{
//默认
cell.descLabe.text = @"现在做些什么呢?";
}
return cell;
}else if (indexPath.row == 1){
@@ -119,6 +148,7 @@
cell = [[[NSBundle mainBundle] loadNibNamed:@"MaskShareBoootomViewCell" owner:self options:nil] lastObject];
}
return cell;
}
@@ -167,8 +197,8 @@
[shareBtn addTarget:self action:@selector(shareBtnAction) forControlEvents:UIControlEventTouchUpInside];
shareBtn.layer.masksToBounds = YES;
shareBtn.layer.cornerRadius = 4;
[self.view addSubview:shareBtn];
[shareBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(120, 40));
make.bottom.mas_equalTo(self.view.mas_bottom).mas_offset(-45);
@@ -176,6 +206,13 @@
}];
if (self.localModel) {
changeBtn.hidden = YES;
[shareBtn mas_updateConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.view.mas_centerX);
}];
}
}
//更换背景
@@ -193,32 +230,11 @@
case 1:
{
//系统
self.curentImageIndex ++;
if (self.curentImageIndex > 6) {
self.curentImageIndex = 0;
}
NSArray *images = @[@"sharebg_1",@"sharebg_2",@"sharebg_3",@"sharebg_4",@"sharebg_5",@"sharebg_6",@"sharebg_7"];
[self.backimageview setImage:[UIImage imageNamed: images[self->_curentImageIndex]]];
MaskTimeShareViewCell *cell = [self.tab cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
NSArray *shareimages = @[@"share_oneblack",@"share_one",@"share_one",@"share_one",@"share_one",@"share_one",@"share_one"];
NSArray*doingcolorS = @[[UIColor blackColor],GIGARGB(170, 170, 170, 1),[UIColor blackColor],[UIColor blackColor],[UIColor blackColor],[UIColor blackColor],[UIColor blackColor]];
cell.shareLabe.image = [UIImage imageNamed:shareimages[self.curentImageIndex]];
cell.doinglabel.textColor = doingcolorS[self.curentImageIndex];
NSArray *descArr = @[@"生活不易,必须美丽",@"长夜漫漫,不如面膜时间",@"敷片面膜,人间值得",@"打开面膜时间,撰写你与美丽的故事",@"人越美丽,责任越大",@"吃得苦中苦,方为人上人",@"该放弃的决不挽留,该留住的决不放手"];
NSArray *desColor = @[[UIColor whiteColor],[UIColor whiteColor],[UIColor blackColor],[UIColor whiteColor],[UIColor whiteColor],[UIColor whiteColor],[UIColor blackColor]];
cell.descLabe.text = descArr[self.curentImageIndex];
cell.descLabe.textColor = desColor[self.curentImageIndex];
GIGaSharePageViewController *share = [[GIGaSharePageViewController alloc] initWithControllers:self.viewControllers];
//share.model = self.model;
[self presentViewController:share animated:NO completion:nil];
}
break;
@@ -258,7 +274,6 @@
}];
}
}
//拍照
@@ -313,25 +328,27 @@
GIGA_ShowToast(@"未安装微信");
return;
}
UIImage *image = [UIImage saveLongImage:self.tab];
[self jxt_showActionSheetWithTitle:@"分享到微信" message:@"" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
alertMaker.addActionDefaultTitle(@"微信好友");
alertMaker.addActionDefaultTitle(@"朋友圈");
alertMaker.addActionCancelTitle(@"取消");
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
UIImage *image = [UIImage saveLongImage:self.tab];
LXCustomActionSheet *sheet = [[LXCustomActionSheet alloc] initWithTitle:@"分享到微信" optionsArr:@[@"微信好友",@"朋友圈"] cancelTitle:@"取消" selectedBlock:^(NSInteger index) {
if (buttonIndex==0) {
if (index==0) {
//好友
[self shareImagToWX:image scene:WXSceneSession];
}else if (buttonIndex==1){
// 朋友圈
}else if (index==1){
// 朋友圈
[self shareImagToWX:image scene:WXSceneTimeline];
}
} cancelBlock:^{
GILog(@"取消");
}];
[sheet show];
}
-(void)shareImagToWX:(UIImage *)image scene:(int)scene{
@@ -362,4 +379,31 @@
}
- (NSMutableArray *)viewControllers {
if (!_viewControllers) {
_viewControllers = [NSMutableArray array];
NSArray *descArr = @[@"生活不易,必须美丽",@"长夜漫漫,不如面膜时间",@"敷片面膜,人间值得",@"打开面膜时间,撰写你与美丽的故事",@"人越美丽,责任越大",@"吃得苦中苦,方为人上人",@"该放弃的决不挽留,该留住的决不放手"];
NSArray *images = @[@"sharebg_1",@"sharebg_2",@"sharebg_3",@"sharebg_4",@"sharebg_5",@"sharebg_6",@"sharebg_7"];
NSArray *shareimages = @[@"share_oneblack",@"share_one",@"share_one",@"share_one",@"share_one",@"share_one",@"share_one"];
NSArray *desColor = @[@1,@1,@2,@1,@1,@1,@2];
NSArray*doingcolorS = @[@2,@3,@2,@2,@2,@2,@2];
for (int i = 0; i <descArr.count; i++) {
ShareViewController *vc = [[ShareViewController alloc] init];
GiGaLoaclImageModel *model = [[GiGaLoaclImageModel alloc] init];
model.desc = descArr[i];
model.localImageName = images[i];
model.shareLabeimageName = shareimages[i];
model.doingColorflag = [doingcolorS[i] integerValue];
model.descColorflag = [desColor[i] integerValue];
vc.localModel = model;
[_viewControllers addObject:vc];
}
}
return _viewControllers;
}
@end
@@ -477,7 +477,10 @@
[self.navigationController pushViewController:resultVC animated:YES];
}else{
if (result.code == 401) {
//token失效
[GiGaBaseAPiRequest userTokenTimeOutGologinFromVC:self];
}
GIGA_ShowToast(result.message);
}
@@ -531,4 +534,5 @@
// Dispose of any resources that can be recreated.
}
@end
@@ -287,8 +287,10 @@
if (self.model == nil) {
return 255;
}
if (KMainW < 375) {
return 201;
if (KMainW == 375) {
return (KMainH - SAFE_NAV_HEIGHT) / 3.00 - 10;
}else if (KMainW <= 375){
return 201;
}
CGFloat viewH = self.view.frame.size.height - SAFE_NAV_HEIGHT;
CGFloat cellH = viewH / 3;
@@ -89,12 +89,22 @@
[self addSubview:minueImageview];
[minueImageview mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(colorView.mas_left).offset(20);
if (KMainW < 375) {
//se 5s
make.size.mas_equalTo(CGSizeMake(48, 49));
//make.left.mas_equalTo(colorView.mas_left).offset(20);
if (KMainW == 375) {
//x
make.left.mas_equalTo(colorView.mas_left).offset(30);
make.size.mas_equalTo(CGSizeMake(54, 49));
}else{
}
else if (KMainW < 375){
make.left.mas_equalTo(colorView.mas_left).offset(18);
make.size.mas_equalTo(CGSizeMake(48, 49));
}else if (KMainW == 414){
make.left.mas_equalTo(colorView.mas_left).offset(28);
make.size.mas_equalTo(CGSizeMake(54, 49));
}
else{
make.left.mas_equalTo(colorView.mas_left).offset(28);
make.size.mas_equalTo(CGSizeMake(72, 49));
}
make.top.mas_equalTo(jianyiImageView.mas_bottom).offset(20);
@@ -104,9 +114,15 @@
//时间⌚️
UILabel *timeLabel = [[UILabel alloc] init];
timeLabel.textColor = [UIColor blackColor];
if (KMainW < 375) {
if (KMainW == 375) {
timeLabel.font = GIGA_TEXTFONTBOLD(26);
}else if (KMainW == 414){
timeLabel.font = GIGA_TEXTFONTBOLD(30);
}
else if (KMainW < 375){
timeLabel.font = GIGA_TEXTFONTBOLD(24);
}else{
}
else{
timeLabel.font = GIGA_TEXTFONTBOLD(35);
}
timeLabel.text = @"17";
+16 -2
View File
@@ -8,10 +8,24 @@
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface GiGaLoaclImageModel : NSObject
//背景图片(本地)
@property(nonatomic,copy) NSString *localImageName;
//图片序号
@property(nonatomic) NSUInteger index;
//分享面膜时间 staring now 图片名 很白两种
@property(nonatomic,copy) NSString *shareLabeimageName;
//描述文本颜色 1 白 2 黑 3 GIGARGB(170, 170, 170, 1)
@property(nonatomic) NSUInteger descColorflag;
//描述文本
@property(nonatomic,copy) NSString *desc;
//文本颜色 what are we doing 颜色 黑白
@property(nonatomic) NSUInteger doingColorflag;
@end
NS_ASSUME_NONNULL_END