Commit 5b465c39 authored by zhangguangyi's avatar zhangguangyi

add UI

parent 39bf7699
No preview for this file type
This diff is collapsed.
{ {
"info" : { "info" : {
"author" : "xcode", "version" : 1,
"version" : 1 "author" : "xcode"
} }
} }
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "caring_person_list@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "caring_person_list@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "caring_person_listed@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "caring_person_listed@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "repeat_s_icon@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "repeat_s_icon@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#import "ZJGuardCollectionHeaderView.h" #import "ZJGuardCollectionHeaderView.h"
#import "ZJGuardCell.h" #import "ZJGuardCell.h"
#import "ZJReminderMainController.h" #import "ZJReminderMainController.h"
#import "ZJAddReminderController.h"
@interface ZJGuardViewController ()<UICollectionViewDelegate, UICollectionViewDataSource> @interface ZJGuardViewController ()<UICollectionViewDelegate, UICollectionViewDataSource>
...@@ -135,8 +136,14 @@ ...@@ -135,8 +136,14 @@
{ {
[collectionView deselectItemAtIndexPath:indexPath animated:YES]; [collectionView deselectItemAtIndexPath:indexPath animated:YES];
ZJReminderMainController *vc = [ZJReminderMainController new]; if (indexPath.row == self.dataSource.count - 1) {
[self.navigationController pushViewController:vc animated:YES]; ZJAddReminderController *vc = [ZJAddReminderController new];
[self.navigationController pushViewController:vc animated:YES];
}else{
ZJReminderMainController *vc = [ZJReminderMainController new];
vc.title = _dataSource[indexPath.row][@"title"];
[self.navigationController pushViewController:vc animated:YES];
}
} }
......
...@@ -22,6 +22,11 @@ ...@@ -22,6 +22,11 @@
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
[UINavigationBar appearance].tintColor = [UIColor colorWithHex: 0x030303];
[UINavigationBar appearance].barTintColor = [UIColor whiteColor];
[UINavigationBar appearance].translucent = [UIColor whiteColor];
} }
/* /*
......
//
// ZJAddReminderController.h
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZJAddReminderController : UIViewController
@end
NS_ASSUME_NONNULL_END
//
// ZJAddReminderController.m
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJAddReminderController.h"
#import "ZJChooseIconController.h"
@interface ZJAddReminderController ()
@property (weak, nonatomic) IBOutlet UITextField *textField;
@property (weak, nonatomic) IBOutlet UIImageView *icon;
@end
@implementation ZJAddReminderController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
self.title = @"添加提醒";
}
- (IBAction)buttonAction:(UIButton *)sender {
if (self.textField.text.length == 0) {
[MBProgressHUD showMessage:@"请输入名称"];
return;
}
}
- (IBAction)addIconAction:(UIButton *)sender {
ZJChooseIconController *vc = [ZJChooseIconController new];
[self.navigationController pushViewController:vc animated:YES];
}
/*
#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.
}
*/
@end
//
// ZJChooseIconController.h
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZJChooseIconController : UIViewController
@end
NS_ASSUME_NONNULL_END
//
// ZJChooseIconController.m
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJChooseIconController.h"
#import "ZJChooseIconCell.h"
@interface ZJChooseIconController ()<UICollectionViewDelegate,UICollectionViewDataSource>
@property(nonatomic,strong)UICollectionView *collectionView;
@property(nonatomic,strong)NSMutableArray *dataArray;
@end
@implementation ZJChooseIconController
-(NSMutableArray *)dataArray
{
if (!_dataArray) {
_dataArray = [[NSMutableArray alloc] init];
}
return _dataArray;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.title = @"选择提醒图标";
self.view.backgroundColor = [UIColor colorWithHexString:@"fafafa"];
[self.view addSubview:self.collectionView];
}
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
return 10;
}
-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
ZJChooseIconCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cell" forIndexPath:indexPath];
return cell;
}
-(UICollectionView *)collectionView
{
if (!_collectionView) {
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.itemSize = CGSizeMake(SCREEN_WIDTH / 4, 60);
layout.minimumLineSpacing = 0;
layout.minimumInteritemSpacing = 0;
_collectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:layout];
_collectionView.delegate = self;
_collectionView.dataSource = self;
_collectionView.backgroundColor = [UIColor colorWithHexString:@"fafafa"];
[_collectionView registerNib:[UINib nibWithNibName:@"ZJChooseIconCell" bundle:nil] forCellWithReuseIdentifier:@"cell"];
}
return _collectionView;
}
/*
#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.
}
*/
@end
//
// ZJReminderCareController.h
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZJReminderCareController : UIViewController
@property(nonatomic,copy)void (^backData)(NSString *data);
@end
NS_ASSUME_NONNULL_END
//
// ZJReminderCareController.m
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJReminderCareController.h"
#import "ZJReminderCareCell.h"
static NSString * const ZJReminderCareCellID = @"ZJReminderCareCellID";
@interface ZJReminderCareController ()<UITableViewDataSource,UITableViewDelegate>
@property(nonatomic,strong)UITableView *tableView;
@property(nonatomic,strong)NSMutableArray *dataArray;
@end
@implementation ZJReminderCareController
-(NSMutableArray *)dataArray
{
if (!_dataArray) {
_dataArray = [[NSMutableArray alloc] init];
}
return _dataArray;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[self setupUI];
[self requestData];
}
-(void)setupUI
{
self.view.backgroundColor = [UIColor colorWithHexString:@"FAFAFA"];
self.title = @"关心的人";
[self.view addSubview:self.tableView];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.right.mas_equalTo(0);
make.top.mas_equalTo(0);
make.bottom.mas_equalTo(0);
}];
}
-(void)requestData
{
[self.dataArray removeAllObjects];
NSArray *res = @[@{@"name":@"关心的人",@"subName":@"选择关心的人"},
@{@"name":@"提醒图片",@"subName":@""},
@{@"name":@"提醒事项",@"subName":@"多吃蔬菜"},
@{@"name":@"提醒时间",@"subName":@""},
@{@"name":@"重复",@"subName":@"每天"}];
[self.dataArray addObjectsFromArray:res];
[self.tableView reloadData];
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return self.dataArray.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
ZJReminderCareCell *cell = [tableView dequeueReusableCellWithIdentifier:ZJReminderCareCellID];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
if (self.backData) {
self.backData(@"关心的人");
}
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 86;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 1;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 1;
}
-(UITableView *)tableView
{
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
_tableView.backgroundColor = [UIColor colorWithHexString:@"FAFAFA"];
_tableView.showsVerticalScrollIndicator = NO;
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.estimatedRowHeight = 0;
_tableView.estimatedSectionHeaderHeight = 0;
_tableView.estimatedSectionFooterHeight = 0;
[_tableView registerNib:[UINib nibWithNibName:@"ZJReminderCareCell" bundle:nil] forCellReuseIdentifier:ZJReminderCareCellID];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}
return _tableView;
}
@end
//
// ZJReminderCateAddController.h
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZJReminderCateAddController : UIViewController
@end
NS_ASSUME_NONNULL_END
//
// ZJReminderCateAddController.m
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJReminderCateAddController.h"
#import "ZJReminderCateAddCell.h"
#import "ZJReminderFooterView.h"
#import "ZJReminderCareController.h"
#import "ZJReminderTimeController.h"
#import "QFTimePickerView.h"
static NSString * const ZJReminderCateAddCellID = @"ZJReminderCateAddCellID";
static NSString * const ZJReminderFooterViewID = @"ZJReminderFooterViewID";
@interface ZJReminderCateAddController ()<UITableViewDataSource,UITableViewDelegate>
@property(nonatomic,strong)UITableView *tableView;
@property(nonatomic,strong)NSMutableArray *dataArray;
@end
@implementation ZJReminderCateAddController
-(NSMutableArray *)dataArray
{
if (!_dataArray) {
_dataArray = [[NSMutableArray alloc] init];
}
return _dataArray;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[self setupUI];
[self requestData];
}
-(void)setupUI
{
self.view.backgroundColor = [UIColor colorWithHexString:@"FAFAFA"];
self.title = @"提醒设置";
[self.view addSubview:self.tableView];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.right.mas_equalTo(0);
make.top.mas_equalTo(0);
make.bottom.mas_equalTo(0);
}];
}
-(void)requestData
{
[self.dataArray removeAllObjects];
NSArray *res = @[@{@"name":@"关心的人",@"subName":@"选择关心的人"},
@{@"name":@"提醒图片",@"subName":@""},
@{@"name":@"提醒事项",@"subName":@"多吃蔬菜"},
@{@"name":@"提醒时间",@"subName":@""},
@{@"name":@"重复",@"subName":@"每天"}];
[self.dataArray addObjectsFromArray:res];
[self.tableView reloadData];
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return self.dataArray.count;
}
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
ZJReminderFooterView *footer = [tableView dequeueReusableHeaderFooterViewWithIdentifier:ZJReminderFooterViewID];
// footer.backgroundColor = [UIColor redColor];
return footer;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
ZJReminderCateAddCell *cell = [tableView dequeueReusableCellWithIdentifier:ZJReminderCateAddCellID];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
if (self.dataArray.count) {
cell.icon.hidden = indexPath.row == 1 ? NO : YES;
cell.subName.hidden = !cell.icon.hidden;
cell.arrow.hidden = (indexPath.row == 1 || indexPath.row == 2) ? YES : NO;
NSDictionary *dict = self.dataArray[indexPath.row];
cell.name.text = dict[@"name"];
cell.subName.text = dict[@"subName"];
}
return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
switch (indexPath.row) {
case 0:
{// 关心的人
ZJReminderCareController *vc = [ZJReminderCareController new];
vc.backData = ^(NSString * _Nonnull data) {
};
[self.navigationController pushViewController:vc animated:YES];
}
break;
case 1:
{// 提醒图片
}
break;
case 2:
{// 提醒事项
}
break;
case 3:
{// 提醒时间
QFTimePickerView *pickerView = [[QFTimePickerView alloc] initDatePackerWithStartHour:@"00" endHour:@"24" period:1 response:^(NSString *str) {
NSString *string = str;
NSLog(@"str = %@",string);
}];
[pickerView show];
}
break;
case 4:
{// 重复
ZJReminderTimeController *vc = [ZJReminderTimeController new];
[self.navigationController pushViewController:vc animated:YES];
}
break;
default:
break;
}
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 65;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 1;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 180;
}
-(UITableView *)tableView
{
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
_tableView.backgroundColor = [UIColor colorWithHexString:@"FAFAFA"];
_tableView.showsVerticalScrollIndicator = NO;
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.estimatedRowHeight = 0;
_tableView.estimatedSectionHeaderHeight = 0;
_tableView.estimatedSectionFooterHeight = 0;
[_tableView registerNib:[UINib nibWithNibName:@"ZJReminderCateAddCell" bundle:nil] forCellReuseIdentifier:ZJReminderCateAddCellID];
[_tableView registerNib:[UINib nibWithNibName:@"ZJReminderFooterView" bundle:nil] forHeaderFooterViewReuseIdentifier:ZJReminderFooterViewID];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}
return _tableView;
}
/*
#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.
}
*/
@end
...@@ -8,48 +8,145 @@ ...@@ -8,48 +8,145 @@
#import "ZJReminderMainController.h" #import "ZJReminderMainController.h"
#import "ZJReminderMainCell.h" #import "ZJReminderMainCell.h"
#import "ZJReminderBottom.h"
#import "ZJReminder.h"
#import "ZJReminderCateAddController.h"
static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID"; static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
@interface ZJReminderMainController ()<UITableViewDataSource,UITableViewDelegate> @interface ZJReminderMainController ()<UITableViewDataSource,UITableViewDelegate>
@property(nonatomic,strong)UITableView *tableView; @property(nonatomic,strong)UITableView *tableView;
@property(nonatomic,strong)ZJReminderBottom *bottomView;
@property(nonatomic,strong)NSMutableArray *dataArray;
@property(nonatomic,assign)BOOL isManger;
@end @end
@implementation ZJReminderMainController @implementation ZJReminderMainController
-(NSMutableArray *)dataArray
{
if (!_dataArray) {
_dataArray = [[NSMutableArray alloc] init];
}
return _dataArray;
}
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"管理" style:UIBarButtonItemStyleDone target:self action:@selector(chooseAction)];
self.navigationItem.rightBarButtonItem.tintColor = [UIColor blackColor];
[self setupUI]; [self setupUI];
[self requestData];
} }
-(void)setupUI -(void)setupUI
{ {
self.view.backgroundColor = [UIColor colorWithHexString:@"FAFAFA"];
[self.view addSubview:self.tableView]; [self.view addSubview:self.tableView];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(10); make.left.mas_equalTo(0);
make.right.mas_equalTo(-10); make.right.mas_equalTo(0);
make.top.mas_equalTo(0); make.top.mas_equalTo(0);
make.bottom.mas_equalTo(0); make.bottom.mas_equalTo(0);
}]; }];
self.bottomView = [[ZJReminderBottom alloc] init];
[self.view addSubview:self.bottomView];
[self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(20);
make.right.mas_equalTo(-20);
make.bottom.mas_equalTo(-20);
make.height.mas_equalTo(44);
}];
[self.bottomView setColorViewLayers:@[@"528BFF",@"6497FF"] size:CGSizeMake(SCREEN_WIDTH - 40, 44)];
self.bottomView.titleString = @"添加提醒";
__weak typeof(self) weakSelf = self;
self.bottomView.clickMethod = ^{
if (weakSelf.isManger) {
NSLog(@"删除整个分类");
}else{
NSLog(@"添加提醒");
ZJReminderCateAddController *vc = [ZJReminderCateAddController new];
[weakSelf.navigationController pushViewController:vc animated:YES];
}
};
}
-(void)chooseAction
{
NSString *name = self.navigationItem.rightBarButtonItem.title;
if ([name isEqualToString:@"管理"]) {
self.navigationItem.rightBarButtonItem.title = @"取消";
[self exchangeChooseState:YES];
}else{
self.navigationItem.rightBarButtonItem.title = @"管理";
[self exchangeChooseState:NO];
}
}
-(void)exchangeChooseState:(BOOL)state
{
self.isManger = state;
if (state) {
self.bottomView.titleString = @"删除整个分类";
[self.bottomView setColorViewLayers:@[@"#F54E4A",@"#FB7073"] size:CGSizeMake(SCREEN_WIDTH - 40, 44)];
}else{
self.bottomView.titleString = @"添加提醒";
[self.bottomView setColorViewLayers:@[@"528BFF",@"6497FF"] size:CGSizeMake(SCREEN_WIDTH - 40, 44)];
}
[self.tableView reloadData];
}
-(void)requestData
{
for (int i = 0; i < 10; i++) {
ZJReminder *model = [ZJReminder new];
model.choose = NO;
[self.dataArray addObject:model];
}
[self.tableView reloadData];
} }
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{ {
return 10; return self.dataArray.count;
} }
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{ {
ZJReminderMainCell *cell = [tableView dequeueReusableCellWithIdentifier:ZJReminderMainCellID]; ZJReminderMainCell *cell = [tableView dequeueReusableCellWithIdentifier:ZJReminderMainCellID];
cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.selectionStyle = UITableViewCellSelectionStyleNone;
[cell.deleteBtn addTarget:self action:@selector(deleteAction:) forControlEvents:UIControlEventTouchUpInside];
cell.deleteBtn.hidden = !self.isManger;
return cell; return cell;
} }
-(void)deleteAction:(UIButton *)sender
{
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"温馨提示" message:@"删除后,好友将收不到此分类下的所有提醒通知,确定要删除吗?" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancel = [UIAlertAction actionWithTitle:@"在想想" style:UIAlertActionStyleCancel handler:nil];
UIAlertAction *delete = [UIAlertAction actionWithTitle:@"删除" style:UIAlertActionStyleDestructive handler:nil];
[alert addAction:cancel];
[alert addAction:delete];
[self presentViewController:alert animated:YES completion:nil];
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{ {
[tableView deselectRowAtIndexPath:indexPath animated:YES]; [tableView deselectRowAtIndexPath:indexPath animated:YES];
...@@ -61,14 +158,27 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID"; ...@@ -61,14 +158,27 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
return 160; return 160;
} }
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 10;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 100;
}
-(UITableView *)tableView -(UITableView *)tableView
{ {
if (!_tableView) { if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped]; _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
_tableView.backgroundColor = [UIColor colorWithHexString:@"FAFAFA"];
_tableView.showsVerticalScrollIndicator = NO;
_tableView.delegate = self; _tableView.delegate = self;
_tableView.dataSource = self; _tableView.dataSource = self;
_tableView.estimatedRowHeight = 0;
_tableView.estimatedSectionHeaderHeight = 0;
_tableView.estimatedSectionFooterHeight = 0;
[_tableView registerNib:[UINib nibWithNibName:@"ZJReminderMainCell" bundle:nil] forCellReuseIdentifier:ZJReminderMainCellID]; [_tableView registerNib:[UINib nibWithNibName:@"ZJReminderMainCell" bundle:nil] forCellReuseIdentifier:ZJReminderMainCellID];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone; _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
} }
......
//
// ZJReminderTimeController.h
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZJReminderTimeController : UIViewController
@end
NS_ASSUME_NONNULL_END
//
// ZJReminderTimeController.m
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJReminderTimeController.h"
#import "ZJReminderTimeCell.h"
#import "ZJReminder.h"
static NSString * const ZJReminderTimeCellID = @"ZJReminderTimeCellID";
@interface ZJReminderTimeController ()<UITableViewDataSource,UITableViewDelegate>
@property(nonatomic,strong)UITableView *tableView;
@property(nonatomic,strong)NSMutableArray *dataArray;
@property(nonatomic,strong)UIButton *sureButton;
@end
@implementation ZJReminderTimeController
-(NSMutableArray *)dataArray
{
if (!_dataArray) {
_dataArray = [[NSMutableArray alloc] init];
}
return _dataArray;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[self setupUI];
[self requestData];
}
-(void)setupUI
{
self.view.backgroundColor = [UIColor colorWithHexString:@"FAFAFA"];
self.title = @"重复";
[self.view addSubview:self.tableView];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.right.mas_equalTo(0);
make.top.mas_equalTo(0);
make.bottom.mas_equalTo(0);
}];
self.sureButton = [UIButton buttonWithType:UIButtonTypeCustom];
[self.sureButton setTitle:@"确定" forState:UIControlStateNormal];
[self.sureButton.titleLabel setFont:[UIFont systemFontOfSize:14]];
self.sureButton.backgroundColor = [UIColor colorWithHexString:@"528BFF"];
[self.view addSubview:self.sureButton];
self.sureButton.layer.cornerRadius = 22;
[self.sureButton addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
[self.sureButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@20);
make.right.bottom.equalTo(@(-20));
make.height.equalTo(@44);
}];
}
-(void)buttonAction:(UIButton *)sender
{
NSLog(@"确定");
}
-(void)requestData
{
[self.dataArray removeAllObjects];
NSArray *res = @[@"星期一",@"星期二",@"星期三",@"星期四",@"星期五",@"星期六",@"星期日"];
for (NSString *name in res) {
ZJReminderTime *model = [ZJReminderTime new];
model.name = name;
model.choose = YES;
[self.dataArray addObject:model];
}
[self.tableView reloadData];
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return self.dataArray.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
ZJReminderTimeCell *cell = [tableView dequeueReusableCellWithIdentifier:ZJReminderTimeCellID];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
if (self.dataArray.count) {
ZJReminderTime *model = self.dataArray[indexPath.row];
cell.name.text = model.name;
cell.icon.hidden = !model.choose;
}
return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
for (int i = 0; i < self.dataArray.count; i++) {
ZJReminderTime *model = self.dataArray[indexPath.row];
if (i == indexPath.row) {
model.choose = !model.choose;
}
}
[self.tableView reloadData];
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 55;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 1;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 100;
}
-(UITableView *)tableView
{
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
_tableView.backgroundColor = [UIColor colorWithHexString:@"FAFAFA"];
_tableView.showsVerticalScrollIndicator = NO;
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.estimatedRowHeight = 0;
_tableView.estimatedSectionHeaderHeight = 0;
_tableView.estimatedSectionFooterHeight = 0;
[_tableView registerNib:[UINib nibWithNibName:@"ZJReminderTimeCell" bundle:nil] forCellReuseIdentifier:ZJReminderTimeCellID];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}
return _tableView;
}
@end
//
// QFTimePickerView.h
// QFDatePickerView
//
// Created by gyz on 2017/11/14.
// Copyright © 2017年 gyz. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface QFTimePickerView : UIView
/**
初始化方法
@param startHour 其实时间点 时
@param endHour 结束时间点 时
@param period 间隔多少分中
@param block 返回选中的时间
@return QFTimePickerView实例
*/
- (instancetype)initDatePackerWithStartHour:(NSString *)startHour endHour:(NSString *)endHour period:(NSInteger)period response:(void (^)(NSString *))block;
- (void)show;
@end
//
// QFTimePickerView.m
// QFDatePickerView
//
// Created by gyz on 2017/11/14.
// Copyright © 2017年 gyz. All rights reserved.
//
#import "QFTimePickerView.h"
@interface QFTimePickerView () <UIPickerViewDataSource,UIPickerViewDelegate>{
UIView *contentView;
void(^backBlock)(NSString *);
NSMutableArray *hourArray;
NSMutableArray *minArray;
NSInteger currentHour;
NSInteger currentMin;
NSString *restr;
NSString *selectedHour;
NSString *selectedMin;
}
@property (nonatomic, assign) NSString *startTime;
@property (nonatomic, assign) NSString *endTime;
@property (nonatomic, assign) NSInteger period;
@end
@implementation QFTimePickerView
/**
初始化方法
@param startHour 其实时间点 时
@param endHour 结束时间点 时
@param period 间隔多少分中
@param block 返回选中的时间
@return QFTimePickerView实例
*/
- (instancetype)initDatePackerWithStartHour:(NSString *)startHour endHour:(NSString *)endHour period:(NSInteger)period response:(void (^)(NSString *))block{
if (self = [super init]) {
self.frame = [UIScreen mainScreen].bounds;
}
_startTime = startHour;
_endTime = endHour;
_period = period;
[self initDataSource];
[self initAppreaence];
if (block) {
backBlock = block;
}
return self;
}
#pragma mark - initDataSource
- (void)initDataSource {
[self configHourArray];
[self configMinArray];
selectedHour = hourArray[0];
selectedMin = minArray[0];
}
- (void)configHourArray {//配置小时数据源数组
//初始化小时数据源数组
hourArray = [[NSMutableArray alloc]init];
NSString *startHour = [_startTime substringWithRange:NSMakeRange(0, 2)];
NSString *endHour = [_endTime substringWithRange:NSMakeRange(0, 2)];
if ([startHour integerValue] > [endHour integerValue]) {//跨天
NSString *minStr = @"";
for (NSInteger i = [startHour integerValue]; i < 24; i++) {//加当天的小时数
if (i < 10) {
minStr = [NSString stringWithFormat:@"0%ld时",i];
} else {
minStr = [NSString stringWithFormat:@"%ld时",i];
}
[hourArray addObject:minStr];
}
for (NSInteger i = 0; i <= [endHour integerValue]; i++) {//加次天的小时数
if (i < 10) {
minStr = [NSString stringWithFormat:@"0%ld时",i];
} else {
minStr = [NSString stringWithFormat:@"%ld时",i];
}
[hourArray addObject:minStr];
}
} else {
for (NSInteger i = [startHour integerValue]; i < [endHour integerValue]; i++) {//加小时数
NSString *minStr = @"";
if (i < 10) {
minStr = [NSString stringWithFormat:@"0%ld时",i];
} else {
minStr = [NSString stringWithFormat:@"%ld时",i];
}
[hourArray addObject:minStr];
}
}
}
- (void)configMinArray {//配置分钟数据源数组
minArray = [[NSMutableArray alloc]init];
for (NSInteger i = 1 ; i <= 60; i++) {
NSString *minStr = @"";
if (i % _period == 0) {
if (i < 10) {
minStr = [NSString stringWithFormat:@"0%ld分",(long)i];
} else {
minStr = [NSString stringWithFormat:@"%ld分",(long)i];
}
[minArray addObject:minStr];
}
}
[minArray insertObject:@"00分" atIndex:0];
[minArray removeLastObject];
}
#pragma mark - initAppreaence
- (void)initAppreaence {
contentView = [[UIView alloc] initWithFrame:CGRectMake(0, self.frame.size.height, self.frame.size.width, 300)];
[self addSubview:contentView];
//设置背景颜色为黑色,并有0.4的透明度
self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.4];
//添加白色view
UIView *whiteView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, 50)];
whiteView.backgroundColor = [UIColor colorWithRed:244/255.0 green:245/255.0 blue:246/255.0 alpha:1.0];
[contentView addSubview:whiteView];
//添加确定和取消按钮
for (int i = 0; i < 2; i ++) {
UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake((self.frame.size.width - 60) * i, 0, 60, 50)];
[button setTitle:i == 0 ? @"取消" : @"确定" forState:UIControlStateNormal];
if (i == 0) {
[button setTitleColor:[UIColor colorWithRed:82/255.0 green:139/255.0 blue:255/255.0 alpha:1.0] forState:UIControlStateNormal];
} else {
[button setTitleColor:[UIColor colorWithRed:82/255.0 green:139/255.0 blue:255/255.0 alpha:1.0] forState:UIControlStateNormal];
}
[whiteView addSubview:button];
[button addTarget:self action:@selector(buttonTapped:) forControlEvents:UIControlEventTouchUpInside];
button.tag = 10 + i;
}
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, 50)];
label.text = @"选择提醒时间";
label.textAlignment = NSTextAlignmentCenter;
label.textColor = [UIColor colorWithRed:82/255.0 green:139/255.0 blue:255/255.0 alpha:1.0];
label.font = [UIFont systemFontOfSize:14];
[whiteView addSubview:label];
UIPickerView *pickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0, 50, CGRectGetWidth(self.bounds), 250)];
pickerView.delegate = self;
pickerView.dataSource = self;
pickerView.backgroundColor = [UIColor whiteColor];
//设置pickerView默认第一行 这里也可默认选中其他行 修改selectRow即可
[pickerView selectRow:0 inComponent:0 animated:YES];
[pickerView selectRow:0 inComponent:1 animated:YES];
[contentView addSubview:pickerView];
}
#pragma mark - Actions
- (void)buttonTapped:(UIButton *)sender {
if (sender.tag == 10) {
[self dismiss];
} else {
restr = [NSString stringWithFormat:@"%@:%@",selectedHour,selectedMin];
backBlock(restr);
[self dismiss];
}
}
#pragma mark - pickerView出现
- (void)show {
[[UIApplication sharedApplication].keyWindow addSubview:self];
[UIView animateWithDuration:0.4 animations:^{
contentView.center = CGPointMake(self.frame.size.width/2, contentView.center.y - contentView.frame.size.height);
}];
}
#pragma mark - pickerView消失
- (void)dismiss{
[UIView animateWithDuration:0.4 animations:^{
contentView.center = CGPointMake(self.frame.size.width/2, contentView.center.y + contentView.frame.size.height);
} completion:^(BOOL finished) {
[self removeFromSuperview];
}];
}
#pragma mark - UIPickerViewDataSource UIPickerViewDelegate
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView {
return 2;
}
- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component {
if (component == 0) {
return hourArray.count;
}
else {
return minArray.count;
}
}
- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component {
if (component == 0) {
return hourArray[row];
} else {
return minArray[row];
}
}
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component {
if (component == 0) {
selectedHour = hourArray[row];
if ([selectedHour isEqualToString:[hourArray lastObject]]) {
[pickerView selectRow:0 inComponent:1 animated:YES];
selectedMin = @"00";
}
// [pickerView reloadComponent:1];
} else {
if ([selectedHour isEqualToString:[hourArray lastObject]]) {
[pickerView selectRow:0 inComponent:1 animated:YES];
selectedMin = @"00";
} else {
selectedMin = minArray[row];
}
}
}
@end
//
// ZJReminder.h
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZJReminder : NSObject
@property(nonatomic,assign)BOOL choose;
@end
@interface ZJReminderTime : NSObject
@property(nonatomic,copy)NSString *name;
@property(nonatomic,assign)BOOL choose;
@end
NS_ASSUME_NONNULL_END
//
// ZJReminder.m
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJReminder.h"
@implementation ZJReminder
@end
@implementation ZJReminderTime
@end
//
// ZJReminderBottom.h
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZJReminderBottom : UIView
@property(nonatomic,strong)UIColor *layerColor;
@property(nonatomic,strong)UIColor *titleColor;
@property(nonatomic,copy)NSString *titleString;
@property(nonatomic,copy)void (^clickMethod)(void);
-(void)setColorViewLayers:(NSArray *)layers size:(CGSize)size;
@end
NS_ASSUME_NONNULL_END
//
// ZJReminderBottom.m
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJReminderBottom.h"
@interface ZJReminderBottom ()
@property(nonatomic,strong)UIView *colorView;
@property(nonatomic,strong)UILabel *title;
@end
@implementation ZJReminderBottom
-(instancetype)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame]) {
[self setupSubviews];
}
return self;
}
-(void)setupSubviews
{
self.backgroundColor = [UIColor whiteColor];
self.colorView = [[UIView alloc] init];
self.layer.cornerRadius = 22;
self.clipsToBounds = YES;
[self addSubview:self.colorView];
[self.colorView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.right.bottom.equalTo(@0);
}];
self.title = [[UILabel alloc] init];
self.title.font = [UIFont fontWithName:@"PingFangSC-Medium" size:14];
self.title.textColor = [UIColor whiteColor];
self.title.textAlignment = NSTextAlignmentCenter;
self.title.backgroundColor = [UIColor clearColor];
[self addSubview:self.title];
[self.title mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.right.bottom.equalTo(@0);
}];
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction)];
[self addGestureRecognizer:tap];
}
-(void)tapAction
{
if (self.clickMethod) {
self.clickMethod();
}
}
-(void)setLayerColor:(UIColor *)layerColor
{
_layerColor = layerColor;
self.colorView.backgroundColor = layerColor;
}
-(void)setTitleColor:(UIColor *)titleColor
{
_titleColor = titleColor;
self.title.textColor = titleColor;
}
-(void)setColorViewLayers:(NSArray *)layers size:(CGSize)size
{
if (layers.count < 2) return;
self.colorView.frame = CGRectMake(0, 0, size.width, size.height);
[self.colorView.layer addSublayer:[self gradientLayerAction:self.colorView startColor:[UIColor colorWithHexString:layers[0]] endColor:[UIColor colorWithHexString:layers[1]]]];
}
-(void)setTitleString:(NSString *)titleString
{
_titleString = titleString;
self.title.text = titleString;
}
-(CAGradientLayer *)gradientLayerAction:(UIView *)obj startColor:(UIColor *)startColor endColor:(UIColor *)endColor
{
CAGradientLayer * gradientLayer = [CAGradientLayer layer];
gradientLayer.frame = obj.bounds;
gradientLayer.colors = @[(__bridge id)startColor.CGColor,(__bridge id)endColor.CGColor];
gradientLayer.startPoint = CGPointMake(0, 0);
gradientLayer.endPoint = CGPointMake(1, 0);
gradientLayer.locations = @[@0,@1];
return gradientLayer;
}
@end
//
// ZJChooseIconCell.h
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZJChooseIconCell : UICollectionViewCell
@end
NS_ASSUME_NONNULL_END
//
// ZJChooseIconCell.m
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJChooseIconCell.h"
@implementation ZJChooseIconCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="ZJChooseIconCell">
<rect key="frame" x="0.0" y="0.0" width="91" height="108"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="91" height="108"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="remind_cell_0_2" translatesAutoresizingMaskIntoConstraints="NO" id="nuB-Rn-VdK">
<rect key="frame" x="25.5" y="34" width="40" height="40"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="9QJ-Za-gUs"/>
<constraint firstAttribute="height" constant="40" id="Cvy-XH-9Ai"/>
</constraints>
</imageView>
</subviews>
</view>
<constraints>
<constraint firstItem="nuB-Rn-VdK" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="fne-1k-boA"/>
<constraint firstItem="nuB-Rn-VdK" firstAttribute="centerY" secondItem="gTV-IL-0wX" secondAttribute="centerY" id="yDR-GO-KrF"/>
</constraints>
<size key="customSize" width="91" height="108"/>
<point key="canvasLocation" x="167.39130434782609" y="119.19642857142857"/>
</collectionViewCell>
</objects>
<resources>
<image name="remind_cell_0_2" width="40" height="40"/>
</resources>
</document>
//
// ZJReminderCareCell.h
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZJReminderCareCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIImageView *icon;
@property (weak, nonatomic) IBOutlet UILabel *name;
@property (weak, nonatomic) IBOutlet UIView *baseView;
@property (weak, nonatomic) IBOutlet UIView *mainView;
@property (weak, nonatomic) IBOutlet UIImageView *iconSelect;
@end
NS_ASSUME_NONNULL_END
//
// ZJReminderCareCell.m
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJReminderCareCell.h"
@implementation ZJReminderCareCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
self.baseView.layer.shadowColor = [UIColor colorWithHexString:@"#000000"].CGColor;
self.baseView.layer.shadowOffset = CGSizeMake(0,2);
self.baseView.layer.shadowOpacity = 0.1;
self.baseView.layer.shadowRadius = 4;
self.baseView.layer.cornerRadius = 7.5;
self.mainView.layer.masksToBounds = YES;
self.mainView.layer.cornerRadius = 7.5;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="96" id="KGk-i7-Jjw" customClass="ZJReminderCareCell">
<rect key="frame" x="0.0" y="0.0" width="375" height="86"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="375" height="86"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CYw-N6-Giv">
<rect key="frame" x="12" y="6" width="351" height="74"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tnu-6t-Kz8">
<rect key="frame" x="0.0" y="0.0" width="351" height="74"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="map_card_profile" translatesAutoresizingMaskIntoConstraints="NO" id="cAM-Rg-Qz2">
<rect key="frame" x="20" y="17" width="40" height="40"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="3z7-Gr-4on"/>
<constraint firstAttribute="height" constant="40" id="D9t-Xg-lRp"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Jmb-kr-BOC">
<rect key="frame" x="75" y="0.0" width="256" height="74"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.13333333333333333" green="0.13333333333333333" blue="0.13333333333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="caring_person_list" translatesAutoresizingMaskIntoConstraints="NO" id="6W9-lf-2jM">
<rect key="frame" x="313" y="28" width="18" height="18"/>
</imageView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="6W9-lf-2jM" firstAttribute="centerY" secondItem="tnu-6t-Kz8" secondAttribute="centerY" id="5sj-Hm-LpI"/>
<constraint firstItem="Jmb-kr-BOC" firstAttribute="leading" secondItem="cAM-Rg-Qz2" secondAttribute="trailing" constant="15" id="B6y-VN-xnO"/>
<constraint firstItem="cAM-Rg-Qz2" firstAttribute="centerY" secondItem="tnu-6t-Kz8" secondAttribute="centerY" id="coW-Af-cZ0"/>
<constraint firstAttribute="trailing" secondItem="6W9-lf-2jM" secondAttribute="trailing" constant="20" id="h07-lx-JhF"/>
<constraint firstAttribute="bottom" secondItem="Jmb-kr-BOC" secondAttribute="bottom" id="o3r-jh-luw"/>
<constraint firstItem="Jmb-kr-BOC" firstAttribute="top" secondItem="tnu-6t-Kz8" secondAttribute="top" id="oJY-NX-Rod"/>
<constraint firstAttribute="trailing" secondItem="Jmb-kr-BOC" secondAttribute="trailing" constant="20" id="rwv-A4-MMY"/>
<constraint firstItem="cAM-Rg-Qz2" firstAttribute="leading" secondItem="tnu-6t-Kz8" secondAttribute="leading" constant="20" id="vdK-GA-80u"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="tnu-6t-Kz8" firstAttribute="leading" secondItem="CYw-N6-Giv" secondAttribute="leading" id="3eO-Ev-Cz6"/>
<constraint firstItem="tnu-6t-Kz8" firstAttribute="top" secondItem="CYw-N6-Giv" secondAttribute="top" id="SjU-RI-vJ4"/>
<constraint firstAttribute="bottom" secondItem="tnu-6t-Kz8" secondAttribute="bottom" id="j8k-OO-LuR"/>
<constraint firstAttribute="trailing" secondItem="tnu-6t-Kz8" secondAttribute="trailing" id="yA0-Wi-1wa"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="CYw-N6-Giv" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="12" id="Be9-AY-kFF"/>
<constraint firstAttribute="trailing" secondItem="CYw-N6-Giv" secondAttribute="trailing" constant="12" id="hRz-ei-GZb"/>
<constraint firstAttribute="bottom" secondItem="CYw-N6-Giv" secondAttribute="bottom" constant="6" id="n8k-By-LGV"/>
<constraint firstItem="CYw-N6-Giv" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="6" id="ud7-ak-m9C"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="baseView" destination="CYw-N6-Giv" id="EcN-4q-nkf"/>
<outlet property="icon" destination="cAM-Rg-Qz2" id="wmb-Hn-Dc2"/>
<outlet property="iconSelect" destination="6W9-lf-2jM" id="CBR-aE-YbV"/>
<outlet property="mainView" destination="tnu-6t-Kz8" id="DEF-oa-dqJ"/>
<outlet property="name" destination="Jmb-kr-BOC" id="flj-Dc-R4D"/>
</connections>
<point key="canvasLocation" x="138.40579710144928" y="145.98214285714286"/>
</tableViewCell>
</objects>
<resources>
<image name="caring_person_list" width="18" height="18"/>
<image name="map_card_profile" width="20" height="20"/>
</resources>
</document>
//
// ZJReminderCateAddCell.h
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZJReminderCateAddCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UILabel *name;
@property (weak, nonatomic) IBOutlet UILabel *subName;
@property (weak, nonatomic) IBOutlet UIImageView *icon;
@property (weak, nonatomic) IBOutlet UIImageView *arrow;
@end
NS_ASSUME_NONNULL_END
//
// ZJReminderCateAddCell.m
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJReminderCateAddCell.h"
@interface ZJReminderCateAddCell ()
@end
@implementation ZJReminderCateAddCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="ZJReminderCateAddCell">
<rect key="frame" x="0.0" y="0.0" width="375" height="65"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="375" height="65"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0Qs-4A-vzi">
<rect key="frame" x="0.0" y="0.0" width="375" height="60"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="关心的人" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ca1-zM-bWf">
<rect key="frame" x="15" y="0.0" width="65.5" height="60"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.13333333333333333" green="0.13333333333333333" blue="0.13333333333333333" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_More" translatesAutoresizingMaskIntoConstraints="NO" id="YMV-R0-dRz">
<rect key="frame" x="347" y="23" width="14" height="14"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="选择关心的人" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zau-3e-rkV">
<rect key="frame" x="251" y="0.0" width="86" height="60"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="remind_cell_0_0" translatesAutoresizingMaskIntoConstraints="NO" id="IY7-bN-UvX">
<rect key="frame" x="307" y="15" width="30" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="Dkr-Rp-0Vh"/>
<constraint firstAttribute="width" constant="30" id="cfa-h5-PCm"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="YMV-R0-dRz" firstAttribute="leading" secondItem="zau-3e-rkV" secondAttribute="trailing" constant="10" id="Keg-25-buS"/>
<constraint firstItem="Ca1-zM-bWf" firstAttribute="top" secondItem="0Qs-4A-vzi" secondAttribute="top" id="LLb-0k-vRj"/>
<constraint firstItem="YMV-R0-dRz" firstAttribute="centerY" secondItem="0Qs-4A-vzi" secondAttribute="centerY" id="MFU-mc-RXH"/>
<constraint firstAttribute="height" constant="60" id="RcW-ZL-Qqs"/>
<constraint firstItem="Ca1-zM-bWf" firstAttribute="leading" secondItem="0Qs-4A-vzi" secondAttribute="leading" constant="15" id="VmA-fp-Mwr"/>
<constraint firstAttribute="trailing" secondItem="YMV-R0-dRz" secondAttribute="trailing" constant="14" id="Wax-Je-9mR"/>
<constraint firstAttribute="bottom" secondItem="zau-3e-rkV" secondAttribute="bottom" id="aQa-EZ-waB"/>
<constraint firstAttribute="bottom" secondItem="Ca1-zM-bWf" secondAttribute="bottom" id="cFu-z5-RHs"/>
<constraint firstItem="IY7-bN-UvX" firstAttribute="centerY" secondItem="0Qs-4A-vzi" secondAttribute="centerY" id="nAI-ND-k0N"/>
<constraint firstItem="zau-3e-rkV" firstAttribute="top" secondItem="0Qs-4A-vzi" secondAttribute="top" id="pCE-RL-Vmb"/>
<constraint firstItem="YMV-R0-dRz" firstAttribute="leading" secondItem="IY7-bN-UvX" secondAttribute="trailing" constant="10" id="snV-bY-vNB"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="0.98039215686274506" green="0.98039215686274506" blue="0.98039215686274506" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="0Qs-4A-vzi" secondAttribute="trailing" id="Xxu-ec-s0b"/>
<constraint firstItem="0Qs-4A-vzi" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="qTP-dd-P9k"/>
<constraint firstItem="0Qs-4A-vzi" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="sYd-Bt-uWH"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<connections>
<outlet property="arrow" destination="YMV-R0-dRz" id="zdO-II-pXz"/>
<outlet property="icon" destination="IY7-bN-UvX" id="BVM-e1-BIN"/>
<outlet property="name" destination="Ca1-zM-bWf" id="Id3-kM-qas"/>
<outlet property="subName" destination="zau-3e-rkV" id="xyF-Lw-oCe"/>
</connections>
<point key="canvasLocation" x="138.40579710144928" y="100.78125"/>
</tableViewCell>
</objects>
<resources>
<image name="icon_More" width="14" height="14"/>
<image name="remind_cell_0_0" width="40" height="40"/>
</resources>
</document>
//
// ZJReminderFooterView.h
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZJReminderFooterView : UITableViewHeaderFooterView
@property (weak, nonatomic) IBOutlet UIButton *saveBtn;
@end
NS_ASSUME_NONNULL_END
//
// ZJReminderFooterView.m
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJReminderFooterView.h"
@interface ZJReminderFooterView ()
@end
@implementation ZJReminderFooterView
-(void)awakeFromNib
{
[super awakeFromNib];
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="iN0-l3-epB" customClass="ZJReminderFooterView">
<rect key="frame" x="0.0" y="0.0" width="375" height="200"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="VBe-rX-7pd">
<rect key="frame" x="20" y="40" width="335" height="44"/>
<color key="backgroundColor" red="0.3294117647" green="0.54901960780000003" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="jiv-0g-4TL"/>
</constraints>
<state key="normal" title="保存">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="22"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="温馨提醒:添加提醒后,约定时间会向关心的人发起" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Gph-CG-J9S">
<rect key="frame" x="20" y="104" width="335" height="14.5"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="提醒消息" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0mH-sk-88b">
<rect key="frame" x="20" y="123.5" width="335" height="14.5"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="Gph-CG-J9S" secondAttribute="trailing" constant="20" id="2CA-VO-Xc2"/>
<constraint firstAttribute="trailing" secondItem="0mH-sk-88b" secondAttribute="trailing" constant="20" id="2bm-g0-idw"/>
<constraint firstItem="0mH-sk-88b" firstAttribute="top" secondItem="Gph-CG-J9S" secondAttribute="bottom" constant="5" id="97w-MJ-gZe"/>
<constraint firstItem="Gph-CG-J9S" firstAttribute="top" secondItem="VBe-rX-7pd" secondAttribute="bottom" constant="20" id="9sH-8Q-IrK"/>
<constraint firstItem="VBe-rX-7pd" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="40" id="Q4B-wP-e7r"/>
<constraint firstItem="0mH-sk-88b" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" id="dCY-oj-k1M"/>
<constraint firstItem="VBe-rX-7pd" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" id="rKU-ig-hLw"/>
<constraint firstAttribute="trailing" secondItem="VBe-rX-7pd" secondAttribute="trailing" constant="20" id="vwa-NO-B9g"/>
<constraint firstItem="Gph-CG-J9S" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" id="whS-vc-bxT"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<connections>
<outlet property="saveBtn" destination="VBe-rX-7pd" id="eaB-gP-y9J"/>
</connections>
<point key="canvasLocation" x="139" y="101"/>
</view>
</objects>
</document>
...@@ -12,6 +12,9 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -12,6 +12,9 @@ NS_ASSUME_NONNULL_BEGIN
@interface ZJReminderMainCell : UITableViewCell @interface ZJReminderMainCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIButton *deleteBtn;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
@property (weak, nonatomic) IBOutlet UILabel *phone; @property (weak, nonatomic) IBOutlet UILabel *phone;
@property (weak, nonatomic) IBOutlet UILabel *timeDesc; @property (weak, nonatomic) IBOutlet UILabel *timeDesc;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel; @property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UIButton *deleteBtn;
@property (weak, nonatomic) IBOutlet UIView *baseView; @property (weak, nonatomic) IBOutlet UIView *baseView;
@property (weak, nonatomic) IBOutlet UIView *mainView; @property (weak, nonatomic) IBOutlet UIView *mainView;
...@@ -27,12 +26,14 @@ ...@@ -27,12 +26,14 @@
[super awakeFromNib]; [super awakeFromNib];
// Initialization code // Initialization code
self.mainView.layer.shadowColor = [UIColor colorWithHexString:@"#000000"].CGColor; self.baseView.layer.shadowColor = [UIColor colorWithHexString:@"#000000"].CGColor;
self.mainView.layer.shadowOffset = CGSizeMake(0,2); self.baseView.layer.shadowOffset = CGSizeMake(0,2);
self.mainView.layer.shadowOpacity = 0.2; self.baseView.layer.shadowOpacity = 0.1;
self.mainView.layer.shadowRadius = 4; self.baseView.layer.shadowRadius = 4;
self.baseView.layer.cornerRadius = 7.5;
self.mainView.layer.masksToBounds = YES; self.mainView.layer.masksToBounds = YES;
self.mainView.layer.cornerRadius = 7.5; self.mainView.layer.cornerRadius = 7.5;
} }
......
...@@ -18,13 +18,13 @@ ...@@ -18,13 +18,13 @@
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="KVr-iT-Xcc"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="KVr-iT-Xcc">
<rect key="frame" x="10" y="5" width="355" height="150"/> <rect key="frame" x="12" y="6" width="351" height="148"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TD5-He-K3h"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TD5-He-K3h">
<rect key="frame" x="0.0" y="0.0" width="355" height="150"/> <rect key="frame" x="0.0" y="0.0" width="351" height="148"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xeB-lB-qIJ"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xeB-lB-qIJ">
<rect key="frame" x="0.0" y="0.0" width="355" height="55"/> <rect key="frame" x="0.0" y="0.0" width="351" height="55"/>
<subviews> <subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="map_card_profile" translatesAutoresizingMaskIntoConstraints="NO" id="PBQ-fF-jwC"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="map_card_profile" translatesAutoresizingMaskIntoConstraints="NO" id="PBQ-fF-jwC">
<rect key="frame" x="20" y="12.5" width="30" height="30"/> <rect key="frame" x="20" y="12.5" width="30" height="30"/>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
</imageView> </imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="182****8646" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xII-vT-ha9"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="182****8646" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xII-vT-ha9">
<rect key="frame" x="67.5" y="18" width="237.5" height="19.5"/> <rect key="frame" x="67.5" y="18" width="233.5" height="19.5"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.13333333333333333" green="0.13333333333333333" blue="0.13333333333333333" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.13333333333333333" green="0.13333333333333333" blue="0.13333333333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -57,23 +57,23 @@ ...@@ -57,23 +57,23 @@
</constraints> </constraints>
</view> </view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DH4-LA-zXj"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DH4-LA-zXj">
<rect key="frame" x="0.0" y="55" width="355" height="0.5"/> <rect key="frame" x="0.0" y="55" width="351" height="0.5"/>
<color key="backgroundColor" red="0.8666666666666667" green="0.8666666666666667" blue="0.8666666666666667" alpha="1" colorSpace="calibratedRGB"/> <color key="backgroundColor" red="0.8666666666666667" green="0.8666666666666667" blue="0.8666666666666667" alpha="1" colorSpace="calibratedRGB"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="0.5" id="QJi-43-3uJ"/> <constraint firstAttribute="height" constant="0.5" id="QJi-43-3uJ"/>
</constraints> </constraints>
</view> </view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ph3-Xe-HF4"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ph3-Xe-HF4">
<rect key="frame" x="0.0" y="55.5" width="355" height="94.5"/> <rect key="frame" x="0.0" y="55.5" width="351" height="92.5"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="距离提醒时间还有:" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Arz-qk-S48"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="距离提醒时间还有:" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Arz-qk-S48">
<rect key="frame" x="20" y="14" width="315" height="14.5"/> <rect key="frame" x="20" y="14" width="311" height="14.5"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/> <fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="23时59分" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sOO-sf-J2N"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="23时59分" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sOO-sf-J2N">
<rect key="frame" x="20" y="48.5" width="315" height="29"/> <rect key="frame" x="20" y="48.5" width="311" height="29"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="24"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="24"/>
<color key="textColor" red="0.32941176470588235" green="0.5490196078431373" blue="1" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.32941176470588235" green="0.5490196078431373" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -113,24 +113,26 @@ ...@@ -113,24 +113,26 @@
<constraint firstAttribute="bottom" secondItem="TD5-He-K3h" secondAttribute="bottom" id="dkq-qp-cZi"/> <constraint firstAttribute="bottom" secondItem="TD5-He-K3h" secondAttribute="bottom" id="dkq-qp-cZi"/>
</constraints> </constraints>
</view> </view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="t86-F1-8Du"> <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="t86-F1-8Du">
<rect key="frame" x="353" y="0.0" width="22" height="22"/> <rect key="frame" x="338" y="0.0" width="30" height="30"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="22" id="kZn-2B-KIe"/> <constraint firstAttribute="width" constant="30" id="Kgr-3I-GEK"/>
<constraint firstAttribute="width" constant="22" id="uEu-xr-H4g"/> <constraint firstAttribute="height" constant="30" id="iSi-fX-nr3"/>
</constraints> </constraints>
<state key="normal" title="Button" image="reminder_list_delete"/> <state key="normal" image="reminder_list_delete"/>
</button> </button>
</subviews> </subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="trailing" secondItem="KVr-iT-Xcc" secondAttribute="trailing" constant="10" id="4sN-P6-p2h"/> <constraint firstAttribute="trailing" secondItem="KVr-iT-Xcc" secondAttribute="trailing" constant="12" id="4sN-P6-p2h"/>
<constraint firstItem="KVr-iT-Xcc" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="10" id="5LR-qh-ad9"/> <constraint firstItem="KVr-iT-Xcc" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="12" id="5LR-qh-ad9"/>
<constraint firstItem="KVr-iT-Xcc" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="5" id="AMc-lP-tJx"/> <constraint firstItem="KVr-iT-Xcc" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="6" id="AMc-lP-tJx"/>
<constraint firstItem="t86-F1-8Du" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="IkP-WK-HLn"/> <constraint firstAttribute="trailing" secondItem="t86-F1-8Du" secondAttribute="trailing" constant="7" id="FMj-kL-0XB"/>
<constraint firstAttribute="trailing" secondItem="t86-F1-8Du" secondAttribute="trailing" id="RLT-fR-T1f"/> <constraint firstItem="t86-F1-8Du" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="eBa-bN-O6v"/>
<constraint firstAttribute="bottom" secondItem="KVr-iT-Xcc" secondAttribute="bottom" constant="5" id="rrT-W8-3Dr"/> <constraint firstAttribute="bottom" secondItem="KVr-iT-Xcc" secondAttribute="bottom" constant="6" id="rrT-W8-3Dr"/>
</constraints> </constraints>
</tableViewCellContentView> </tableViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/> <viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<connections> <connections>
<outlet property="baseView" destination="KVr-iT-Xcc" id="D4b-ry-xCT"/> <outlet property="baseView" destination="KVr-iT-Xcc" id="D4b-ry-xCT"/>
......
//
// ZJReminderTimeCell.h
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZJReminderTimeCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UILabel *name;
@property (weak, nonatomic) IBOutlet UIImageView *icon;
@end
NS_ASSUME_NONNULL_END
//
// ZJReminderTimeCell.m
// Dolphins
//
// Created by GY.Z on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJReminderTimeCell.h"
@implementation ZJReminderTimeCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="ZJReminderTimeCell">
<rect key="frame" x="0.0" y="0.0" width="375" height="55"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="375" height="55"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Alx-Ce-vtx">
<rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="星期一" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Agp-k0-1As">
<rect key="frame" x="20" y="0.0" width="49" height="50"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.13333333333333333" green="0.13333333333333333" blue="0.13333333333333333" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="repeat_s_icon" translatesAutoresizingMaskIntoConstraints="NO" id="4V9-3L-SZ0">
<rect key="frame" x="341" y="20.5" width="14" height="9"/>
</imageView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="Agp-k0-1As" firstAttribute="top" secondItem="Alx-Ce-vtx" secondAttribute="top" id="09D-sN-dqw"/>
<constraint firstAttribute="height" constant="50" id="cJU-Wg-W9O"/>
<constraint firstAttribute="trailing" secondItem="4V9-3L-SZ0" secondAttribute="trailing" constant="20" id="k3P-kn-Ao3"/>
<constraint firstItem="4V9-3L-SZ0" firstAttribute="centerY" secondItem="Alx-Ce-vtx" secondAttribute="centerY" id="p7q-3j-KTa"/>
<constraint firstAttribute="bottom" secondItem="Agp-k0-1As" secondAttribute="bottom" id="psy-vh-rXe"/>
<constraint firstItem="Agp-k0-1As" firstAttribute="leading" secondItem="Alx-Ce-vtx" secondAttribute="leading" constant="20" id="y6b-2W-8qX"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="Alx-Ce-vtx" secondAttribute="trailing" id="KY8-hd-eip"/>
<constraint firstItem="Alx-Ce-vtx" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="Wxg-3W-Pb9"/>
<constraint firstItem="Alx-Ce-vtx" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="vrS-tc-Q9y"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" red="0.98039215686274506" green="0.98039215686274506" blue="0.98039215686274506" alpha="1" colorSpace="calibratedRGB"/>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<connections>
<outlet property="icon" destination="4V9-3L-SZ0" id="t5f-Pt-ek4"/>
<outlet property="name" destination="Agp-k0-1As" id="Xv4-0x-8uV"/>
</connections>
<point key="canvasLocation" x="104" y="103"/>
</tableViewCell>
</objects>
<resources>
<image name="repeat_s_icon" width="14" height="9"/>
</resources>
</document>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment