Skip to content

Commit

Permalink
手动智能联动-添加智能、无手动任务页面
Browse files Browse the repository at this point in the history
Tapd : http://tapd.oa.com/NEW_IOT/prong/stories/view/1020393192859882785

设计图:https://codesign.qq.com/s/x1DWk9JNgl9GnMm

Change-Id: Id5982510430e62f2c7768a8d6ae577154a3ad577
  • Loading branch information
ccharlesren committed Nov 3, 2020
1 parent 070fc3a commit a580445
Show file tree
Hide file tree
Showing 30 changed files with 548 additions and 4 deletions.
26 changes: 26 additions & 0 deletions LinkApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
6DD4D1482536F4D2005272BE /* TIoTCountdownTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DD4D1472536F4D2005272BE /* TIoTCountdownTimer.m */; };
6DD4D32125398C9B005272BE /* TIoTEvaluationSharedView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DD4D32025398C9A005272BE /* TIoTEvaluationSharedView.m */; };
6DD4E82F248927830056A162 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 6DD4E82E248927830056A162 /* GoogleService-Info.plist */; };
6DE800F9254FE95F0093F925 /* TIoTIntelligentVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DE800F8254FE95F0093F925 /* TIoTIntelligentVC.m */; };
6DE8010525503E5B0093F925 /* TIoTCustomSheetView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DE8010425503E5B0093F925 /* TIoTCustomSheetView.m */; };
6DE8010925504DE70093F925 /* TIoTAddManualIntelligentVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DE8010825504DE70093F925 /* TIoTAddManualIntelligentVC.m */; };
6DEC06332487AC0E00902C9F /* UIView+Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DEC06322487AC0E00902C9F /* UIView+Extension.m */; };
6DEEB78025494DFD00247A66 /* TIoTH5CallResultModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DEEB77F25494DFD00247A66 /* TIoTH5CallResultModel.m */; };
6DEEB7842549504500247A66 /* TIoTWebVC+TIoTWebVCCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DEEB7832549504500247A66 /* TIoTWebVC+TIoTWebVCCategory.m */; };
Expand Down Expand Up @@ -404,6 +407,12 @@
6DD4D31F25398C9A005272BE /* TIoTEvaluationSharedView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TIoTEvaluationSharedView.h; sourceTree = "<group>"; };
6DD4D32025398C9A005272BE /* TIoTEvaluationSharedView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TIoTEvaluationSharedView.m; sourceTree = "<group>"; };
6DD4E82E248927830056A162 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
6DE800F7254FE95F0093F925 /* TIoTIntelligentVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TIoTIntelligentVC.h; sourceTree = "<group>"; };
6DE800F8254FE95F0093F925 /* TIoTIntelligentVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TIoTIntelligentVC.m; sourceTree = "<group>"; };
6DE8010325503E5B0093F925 /* TIoTCustomSheetView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TIoTCustomSheetView.h; sourceTree = "<group>"; };
6DE8010425503E5B0093F925 /* TIoTCustomSheetView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TIoTCustomSheetView.m; sourceTree = "<group>"; };
6DE8010725504DE70093F925 /* TIoTAddManualIntelligentVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TIoTAddManualIntelligentVC.h; sourceTree = "<group>"; };
6DE8010825504DE70093F925 /* TIoTAddManualIntelligentVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TIoTAddManualIntelligentVC.m; sourceTree = "<group>"; };
6DEC06312487AC0E00902C9F /* UIView+Extension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIView+Extension.h"; sourceTree = "<group>"; };
6DEC06322487AC0E00902C9F /* UIView+Extension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIView+Extension.m"; sourceTree = "<group>"; };
6DEEB77E25494DFC00247A66 /* TIoTH5CallResultModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TIoTH5CallResultModel.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -976,6 +985,17 @@
path = View;
sourceTree = "<group>";
};
6DE800F6254FE9320093F925 /* Intelligent */ = {
isa = PBXGroup;
children = (
6DE800F7254FE95F0093F925 /* TIoTIntelligentVC.h */,
6DE800F8254FE95F0093F925 /* TIoTIntelligentVC.m */,
6DE8010725504DE70093F925 /* TIoTAddManualIntelligentVC.h */,
6DE8010825504DE70093F925 /* TIoTAddManualIntelligentVC.m */,
);
path = Intelligent;
sourceTree = "<group>";
};
6DEEB77725494D3200247A66 /* Model */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1084,6 +1104,7 @@
D231048A232F86380003069D /* Module */ = {
isa = PBXGroup;
children = (
6DE800F6254FE9320093F925 /* Intelligent */,
F4D48B822520834C00CE90AC /* Map */,
6DBBF7A9252333040018DE39 /* Evaluation */,
F4833EB824DD2A280033FAB2 /* Debug */,
Expand Down Expand Up @@ -1519,6 +1540,8 @@
ED6BA5C223C5DF8500BE9EC9 /* TIoTAlertView.m */,
6DD4D1462536F4D2005272BE /* TIoTCountdownTimer.h */,
6DD4D1472536F4D2005272BE /* TIoTCountdownTimer.m */,
6DE8010325503E5B0093F925 /* TIoTCustomSheetView.h */,
6DE8010425503E5B0093F925 /* TIoTCustomSheetView.m */,
);
path = AppUIConfig;
sourceTree = "<group>";
Expand Down Expand Up @@ -2371,6 +2394,7 @@
F4A0833A2519F5BF00B556B3 /* TIoTAppUtil.swift in Sources */,
D2A2CD3A234ECC6D0039EB51 /* TIoTRefreshHeader.m in Sources */,
ED8D1F6F242B500300900B80 /* TIoTTipView.m in Sources */,
6DE800F9254FE95F0093F925 /* TIoTIntelligentVC.m in Sources */,
D2DAC4C623386173006DB67C /* BluetoothCentralManager.m in Sources */,
D2A2CD39234ECC6D0039EB51 /* TIoTRefreshFooter.m in Sources */,
A40574A724E2AF1E00836FB7 /* TIoTNewVersionTipView.m in Sources */,
Expand Down Expand Up @@ -2402,9 +2426,11 @@
ED9C15B023B984DB00CAC848 /* UIImage+Ex.m in Sources */,
6DEEB7842549504500247A66 /* TIoTWebVC+TIoTWebVCCategory.m in Sources */,
D2038B9F2331FD540036F6B9 /* TIoTRegisterViewController.m in Sources */,
6DE8010525503E5B0093F925 /* TIoTCustomSheetView.m in Sources */,
D23104D62330678F0003069D /* UIView+XDPGesture.m in Sources */,
D23104BE233066810003069D /* KeyChainUntil.m in Sources */,
ED6DA51E23C99BBE00FDDC97 /* TIoTPopoverVC.m in Sources */,
6DE8010925504DE70093F925 /* TIoTAddManualIntelligentVC.m in Sources */,
6DC056EE24EA6AF700E06CC4 /* TIoTChooseTimeZoneVC.m in Sources */,
D23104F223306A0E0003069D /* TIoTTabBarViewController.m in Sources */,
D2A2CD25234C66790039EB51 /* UIViewController+GetController.m in Sources */,
Expand Down
6 changes: 3 additions & 3 deletions Source/LinkApp/Assets.xcassets/common/Contents.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "addIntelligent_Device@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "addIntelligent_Device@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "empty_noTask@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "empty_noTask@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "empty_placeHold@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "empty_placeHold@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "intelligentDefaultTabbar@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "intelligentDefaultTabbar@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "intelligentSelectTabbar@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "intelligentSelectTabbar@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions Source/LinkApp/Classes/AppConfig/AppUIConfig/TIoTCustomSheetView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// TIoTCustomSheetView.h
// LinkApp
//
// Created by ccharlesren on 2020/11/2.
// Copyright © 2020 Tencent. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface TIoTCustomSheetView : UIView


@end

NS_ASSUME_NONNULL_END
106 changes: 106 additions & 0 deletions Source/LinkApp/Classes/AppConfig/AppUIConfig/TIoTCustomSheetView.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
//
// TIoTCustomSheetView.m
// LinkApp
//
// Created by ccharlesren on 2020/11/2.
// Copyright © 2020 Tencent. All rights reserved.
//

#import "TIoTCustomSheetView.h"
#import "UIView+XDPExtension.h"

@interface TIoTCustomSheetView ()
@property (nonatomic, strong) UIView *bottomView;
@property (nonatomic, strong) UIView *actionBottomView;
@property (nonatomic, strong) UIView *upperPartContentView;
@property (nonatomic, strong) UIView *lowerPartContentView;
@end

@implementation TIoTCustomSheetView

- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self setupSubViews];
}
return self;
}

- (void)setupSubViews {

CGFloat kInterval = 15;
CGFloat kHeightWidth = 50;
CGFloat kActionBottonHeight = 175;
if (@available(iOS 11.0, *)) {
kActionBottonHeight = kActionBottonHeight + [UIApplication sharedApplication].delegate.window.safeAreaInsets.bottom;
}

UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(dismissView)];
[self addGestureRecognizer:tapGesture];


[self addSubview:self.bottomView];
[self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.leading.right.bottom.equalTo(self);
}];

[self.bottomView addSubview:self.actionBottomView];
[self.actionBottomView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.bottom.left.equalTo(self);
make.height.mas_equalTo(kActionBottonHeight);
}];

[self changeViewRectConnerWithView:self.actionBottomView withRect:CGRectMake(0, 0, kScreenWidth, kActionBottonHeight) roundCorner:UIRectCornerTopLeft|UIRectCornerTopRight withRadius:CGSizeMake(12, 12)];

}

- (void)dismissView {
[self dismissSharedView];
}

- (void)dismissSharedView {
[self removeFromSuperview];
}

#pragma mark - lazy load
- (UIView *)bottomView {
if (!_bottomView) {
_bottomView = [[UIView alloc]init];
_bottomView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
}
return _bottomView;
}

- (UIView *)actionBottomView {
if (!_actionBottomView) {
_actionBottomView = [[UIView alloc]init];
_actionBottomView.backgroundColor = [UIColor whiteColor];
}
return _actionBottomView;
}

- (UIView *)upperPartContentView {
if (!_upperPartContentView) {
_upperPartContentView = [[UIView alloc]init];
_upperPartContentView.backgroundColor = [UIColor whiteColor];
}
return _upperPartContentView;
}

- (UIView *)lowerPartContentView {
if (!_lowerPartContentView) {
_lowerPartContentView = [[UIView alloc]init];
_lowerPartContentView.backgroundColor = [UIColor whiteColor];
}
return _lowerPartContentView;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/

@end
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#import "TIoTWebVC.h"
#import "TIoTCoreAppEnvironment.h"
#import <WebKit/WebKit.h>
#import "TIoTIntelligentVC.h"

@interface TIoTTabBarViewController ()<UITabBarControllerDelegate>

Expand All @@ -36,6 +37,11 @@ - (void)viewDidLoad {
[self addChildVc:homeVC title:NSLocalizedString(@"main_tab_1", @"首页") image:@"equipmentDefaultTabbar" selectedImage:@"equipmentSelectTabbar"];


//智能联动
TIoTIntelligentVC *intelligent = [[TIoTIntelligentVC alloc]init];
[self addChildVc:intelligent title:NSLocalizedString(@"home_intelligent", @"智能") image:@"intelligentDefaultTabbar" selectedImage:@"intelligentSelectTabbar"];


__weak typeof(self) weadkSelf= self;
//评测
self.webVC = [TIoTWebVC new];
Expand Down
2 changes: 2 additions & 0 deletions Source/LinkApp/Classes/AppConfig/AppUIConfig/TIoTUIProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
#define kTemperatureHexColor @"#15161A"
//时区地区字体颜色
#define kIndexFontHexColor @"#006EFF" //kRGBColor(0, 110, 255)
//智能模块蓝色
#define kIntelligentMainHexColor @"#0066FF" // (0,125,255)

#define WeakObj(o) __weak typeof(o) o##Weak = o;
#define StrongObj(o) __strong typeof(o) o##strong = o##Weak;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ NS_ASSUME_NONNULL_BEGIN

- (CAShapeLayer *)xdp_cornerRadius:(CGSize)size location:(UIRectCorner)corner;

- (void)changeViewRectConnerWithView:(UIView *)view withRect:(CGRect )rect roundCorner:(UIRectCorner)corner withRadius:(CGSize)size;

@end

NS_ASSUME_NONNULL_END
11 changes: 11 additions & 0 deletions Source/LinkApp/Classes/AppConfig/Category/UIView+XDPExtension.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,15 @@ - (CAShapeLayer *)xdp_cornerRadius:(CGSize)size location:(UIRectCorner)corner
return maskLayer;
}


//设置圆角
- (void)changeViewRectConnerWithView:(UIView *)view withRect:(CGRect )rect roundCorner:(UIRectCorner)corner withRadius:(CGSize)size {
UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:rect byRoundingCorners:corner cornerRadii:size];
CAShapeLayer * layer = [[CAShapeLayer alloc]init];
layer.frame = view.bounds;
layer.path = path.CGPath;
view.layer.mask = layer;

}

@end
Loading

0 comments on commit a580445

Please sign in to comment.