Commit d918ad95 cgx

失眠拯救计划弹框UI

1 个父辈 3d32af91
正在显示 30 个修改的文件 包含 249 行增加14 行删除
......@@ -67,6 +67,7 @@
D07DACAA2810557D0067A1BF /* RSKImageCropperStrings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = D07DAC9D2810557D0067A1BF /* RSKImageCropperStrings.bundle */; };
D07DACAB2810557D0067A1BF /* RSKImageScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = D07DACA32810557D0067A1BF /* RSKImageScrollView.m */; };
D07F9DE927F4683B0036372F /* DKColorTable.txt in Resources */ = {isa = PBXBuildFile; fileRef = D07F9DE827F4683B0036372F /* DKColorTable.txt */; };
D0874BBF2816E61000CECB3C /* RescuePlanView.m in Sources */ = {isa = PBXBuildFile; fileRef = D0874BBE2816E61000CECB3C /* RescuePlanView.m */; };
D0878F48280BD18F005F1B7F /* LoginView.m in Sources */ = {isa = PBXBuildFile; fileRef = D0878F47280BD18F005F1B7F /* LoginView.m */; };
D0878F4C280BEFF9005F1B7F /* UILabel+YBAttributeTextTapAction.m in Sources */ = {isa = PBXBuildFile; fileRef = D0878F4B280BEFF9005F1B7F /* UILabel+YBAttributeTextTapAction.m */; };
D0878F4F280C087E005F1B7F /* LoginController.m in Sources */ = {isa = PBXBuildFile; fileRef = D0878F4E280C087E005F1B7F /* LoginController.m */; };
......@@ -236,6 +237,8 @@
D07DACA32810557D0067A1BF /* RSKImageScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RSKImageScrollView.m; sourceTree = "<group>"; };
D07F9D0627F45CB20036372F /* DKNightVersion.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = DKNightVersion.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D07F9DE827F4683B0036372F /* DKColorTable.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DKColorTable.txt; sourceTree = "<group>"; };
D0874BBD2816E61000CECB3C /* RescuePlanView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RescuePlanView.h; sourceTree = "<group>"; };
D0874BBE2816E61000CECB3C /* RescuePlanView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RescuePlanView.m; sourceTree = "<group>"; };
D0878F46280BD18F005F1B7F /* LoginView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoginView.h; sourceTree = "<group>"; };
D0878F47280BD18F005F1B7F /* LoginView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoginView.m; sourceTree = "<group>"; };
D0878F4A280BEFF9005F1B7F /* UILabel+YBAttributeTextTapAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UILabel+YBAttributeTextTapAction.h"; sourceTree = "<group>"; };
......@@ -675,6 +678,15 @@
path = RSKImageCropper;
sourceTree = "<group>";
};
D0874BBC2816E54000CECB3C /* ActivityPopup */ = {
isa = PBXGroup;
children = (
D0874BBD2816E61000CECB3C /* RescuePlanView.h */,
D0874BBE2816E61000CECB3C /* RescuePlanView.m */,
);
path = ActivityPopup;
sourceTree = "<group>";
};
D0878F49280BEFF9005F1B7F /* YBAttributeTextTapAction */ = {
isa = PBXGroup;
children = (
......@@ -865,6 +877,7 @@
D0F808F72804204B0097899F /* Home */ = {
isa = PBXGroup;
children = (
D0874BBC2816E54000CECB3C /* ActivityPopup */,
D0F808FA280420DE0097899F /* Model */,
D0F808F9280420A30097899F /* View */,
D0F808F82804208C0097899F /* Controller */,
......@@ -1114,6 +1127,7 @@
D07DACA52810557D0067A1BF /* RSKInternalUtility.m in Sources */,
D07DACAB2810557D0067A1BF /* RSKImageScrollView.m in Sources */,
D0506B1528051ED400229278 /* SafeSleepModel.m in Sources */,
D0874BBF2816E61000CECB3C /* RescuePlanView.m in Sources */,
D07DACA42810557D0067A1BF /* CGGeometry+RSKImageCropper.m in Sources */,
D01814D527FFCCFA00583D4E /* HomeTableView.m in Sources */,
D09D0E96280D3FE9008DEDAB /* NSDate+Extras.m in Sources */,
......@@ -1350,7 +1364,7 @@
"-all_load",
"-l\"c++\"",
);
PRODUCT_BUNDLE_IDENTIFIER = com.aolei.sleep.dev;
PRODUCT_BUNDLE_IDENTIFIER = com.aolei.sleep.dev123;
PRODUCT_MODULE_NAME = DreamSleepDev;
PRODUCT_NAME = "$(TARGET_NAME)Dev";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -1383,7 +1397,7 @@
GENERATE_INFOPLIST_FILE = YES;
HEADER_SEARCH_PATHS = "$(inherited)/**";
INFOPLIST_FILE = DreamSleep/DSConfig/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "小梦睡眠-冥想解压助眠健康养生";
INFOPLIST_KEY_CFBundleDisplayName = "小梦睡眠-Dev";
INFOPLIST_KEY_NSCameraUsageDescription = "APP需要访问您的相机。";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
......@@ -1504,7 +1518,7 @@
GENERATE_INFOPLIST_FILE = YES;
HEADER_SEARCH_PATHS = "$(inherited)/**";
INFOPLIST_FILE = DreamSleep/DSConfig/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "小梦睡眠-Beta";
INFOPLIST_KEY_CFBundleDisplayName = "小梦睡眠-Dev";
INFOPLIST_KEY_NSCameraUsageDescription = "APP需要访问您的相机。";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
......
//
// RescuePlanView.h
// DreamSleep
//
// Created by peter on 2022/4/25.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef void (^JumpBlock)(void);
/// 失眠拯救计划
@interface RescuePlanView : UIView
@property (nonatomic, copy) JumpBlock block;
- (instancetype)initWithJumpBlock:(JumpBlock)block;
- (void)show;
@end
NS_ASSUME_NONNULL_END
//
// RescuePlanView.m
// DreamSleep
//
// Created by peter on 2022/4/25.
//
#import "RescuePlanView.h"
@interface RescuePlanView ()
/// 拯救计划弹框图片
@property (nonatomic, strong) UIImageView *rescueIV;
/// 关闭按钮
@property (nonatomic, strong) UIButton *closeBtn;
@end
@implementation RescuePlanView
- (instancetype)initWithJumpBlock:(JumpBlock)block {
if (self = [super initWithFrame:[UIScreen mainScreen].bounds]) {
_block = block;
self.backgroundColor = DarkColor;
self.backgroundColor = [self.backgroundColor colorWithAlphaComponent:0.6];
[self addSubview:self.rescueIV];
[self addSubview:self.closeBtn];
[self.rescueIV mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.equalTo(self);
}];
[self.closeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.rescueIV);
make.top.equalTo(self.rescueIV).offset(24);
}];
}
return self;
}
#pragma mark - Actions
- (void)show {
[DSKeyWindow addSubview:self];
}
- (void)dismiss {
[self removeFromSuperview];
}
- (void)tapAction {
[self dismiss];
if (self.block) { self.block(); }
}
#pragma mark - lazy
- (UIImageView *)rescueIV {
if (!_rescueIV) {
_rescueIV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"pic_pop_normal"]];
_rescueIV.userInteractionEnabled = YES;
UITapGestureRecognizer *tapGR = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction)];
[_rescueIV addGestureRecognizer:tapGR];
}
return _rescueIV;
}
- (UIButton *)closeBtn {
if (!_closeBtn) {
_closeBtn = [UIButton new];
[_closeBtn setImage:[UIImage imageNamed:@"home_close"] forState:UIControlStateNormal];
[_closeBtn addTarget:self action:@selector(dismiss) forControlEvents:UIControlEventTouchUpInside];
}
return _closeBtn;
}
@end
......@@ -7,6 +7,7 @@
#import "HomeViewController.h"
#import "HomeTableView.h"
#import "RescuePlanView.h"
#import "UserRequestModel.h"
@interface HomeViewController ()
......@@ -34,14 +35,24 @@
}
}
#pragma mark - 显示失眠拯救计划弹框
- (void)showRescuePlanView {
WS(weakSelf);
RescuePlanView *rescuePlanView = [[RescuePlanView alloc] initWithJumpBlock:^{
[weakSelf.navigationController pushViewController:[[DsWebController alloc] initWithTitle:@"失眠拯救计划" link:@"https://www.cbti.cn/sleep/sleep_plan"] animated:YES];
}];
[rescuePlanView show];
}
#pragma mark - 导航栏日间、黑夜模式
- (NaviStyle)navigationBarStyle {
return [self.dk_manager.themeVersion isEqualToString:DKThemeVersionNormal] ? NaviStyleLight : NaviStyleDark;
}
#pragma mark - lazy
- (HomeTableView *)homeTV {
if (!_homeTV) {
_homeTV = [[HomeTableView alloc] initDemo];
_homeTV = [[HomeTableView alloc] init];
}
return _homeTV;
}
......
......@@ -11,9 +11,6 @@ NS_ASSUME_NONNULL_BEGIN
/// 自定义首页tableView
@interface HomeTableView : UITableView
- (instancetype)initDemo;
@end
NS_ASSUME_NONNULL_END
......@@ -19,7 +19,7 @@
@implementation HomeTableView
- (instancetype)initDemo {
- (instancetype)init {
if (self = [super initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight) style:UITableViewStylePlain]) {
self.dk_backgroundColorPicker = DKColorPickerWithKey(VCViewBG);
self.separatorStyle = UITableViewCellSeparatorStyleNone;
......@@ -37,12 +37,12 @@
[self.headerView updateBannerWithListData:requestModel.bannerListData];
}
}];
// [SafeSleepRequestModel getCourseListDataWithSubID:6 completion:^(SafeSleepRequestModel * _Nonnull requestModel) {
// [self.mj_header endRefreshing];
// }];
// [SafeSleepRequestModel getCourseListDataWithSubID:18 completion:^(SafeSleepRequestModel * _Nonnull requestModel) {
// [self.mj_header endRefreshing];
// }];
// [SafeSleepRequestModel getCourseListDataWithSubID:6 completion:^(SafeSleepRequestModel * _Nonnull requestModel) {
// [self.mj_header endRefreshing];
// }];
// [SafeSleepRequestModel getCourseListDataWithSubID:18 completion:^(SafeSleepRequestModel * _Nonnull requestModel) {
// [self.mj_header endRefreshing];
// }];
}];
[self.mj_header beginRefreshing];
}
......
{
"images" : [
{
"filename" : "dk_home_close.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dk_home_close@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dk_home_close@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "home_close.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "home_close@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "home_close@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "pic_pop_normal.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "pic_pop_normal@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "pic_pop_normal@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "pic_select_sleep_normal.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "pic_select_sleep_normal@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "pic_select_sleep_normal@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "pic_select_weeks_normal.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "pic_select_weeks_normal@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "pic_select_weeks_normal@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!