Commit fd37c862 authored by zhangguangyi's avatar zhangguangyi

Merge branch 'master' of gitlab.huolea.com:lmi/dolphins

parents c2faa18f 088ef717
This diff is collapsed.
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_pet_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "guard_Safety_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "guard_green_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "guard_yellow_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "guard_Orange_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "guard_top_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_briefcase_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_activity_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_water_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_gift_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_flight_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_punch_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_cake_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_fitness_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_fruit_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_money_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_drug_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_vegetables_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_eat_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_game_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_bed_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "guard_remind_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
//
// ZJGuardViewController.h
// Dolphins
//
// Created by 明津李 on 2020/7/28.
// Copyright © 2020 Company. All rights reserved.
//
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface ZJGuardViewController : BaseViewController
@end
NS_ASSUME_NONNULL_END
//
// ZJGuardViewController.m
// Dolphins
//
// Created by 明津李 on 2020/7/28.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJGuardViewController.h"
#import "ZJGuardCollectionHeaderView.h"
#import "ZJGuardCell.h"
@interface ZJGuardViewController ()<UICollectionViewDelegate, UICollectionViewDataSource>
@property (nonatomic, strong) UICollectionView * collectView;
@property (nonatomic, strong) NSMutableArray * dataSource;
@end
@implementation ZJGuardViewController
- (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:YES];
}
- (void)viewDidLoad {
[super viewDidLoad];
_dataSource = [[NSMutableArray alloc] init];
_dataSource = @[@{@"title":@"多吃蔬菜", @"image":@"remind_cell_2_3"},
@{@"title":@"记得起床", @"image":@"remind_cell_3_2"},
@{@"title":@"多吃水果", @"image":@"remind_cell_2_0"},
@{@"title":@"多喝水", @"image":@"remind_cell_0_2"},
@{@"title":@"添加提醒", @"image":@"remind_cell_Add"}].mutableCopy;
[self setUI];
}
- (void)setUI{
self.view.backgroundColor = [UIColor whiteColor];
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc]init];
layout.minimumLineSpacing = 1.0;
layout.minimumInteritemSpacing = 1.0;
layout.sectionInset = UIEdgeInsetsMake(1.0, 1.0, 1.0, 1.0);
_collectView = [[UICollectionView alloc] initWithFrame:CGRectNull collectionViewLayout:layout];
_collectView.backgroundColor = self.view.backgroundColor;
_collectView.delegate = self;
_collectView.dataSource = self;
[self.view addSubview:_collectView];
[_collectView registerNib:[UINib nibWithNibName:@"ZJGuardCollectionHeaderView" bundle:nil] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"ZJGuardCollectionHeaderView"];
[_collectView registerNib:[UINib nibWithNibName:@"ZJGuardCell" bundle:nil] forCellWithReuseIdentifier:@"ZJGuardCell"];
// collectionView.register(UINib.init(nibName:"CRCallPhoneDisplayCell", bundle: nil), forCellWithReuseIdentifier: "CRCallPhoneDisplayCell")
[_collectView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.view);
}];
if (@available(iOS 11.0, *)) {
self.collectView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
} else {
self.automaticallyAdjustsScrollViewInsets = NO;
}
}
- (void)headerBtnClick:(UIButton *)sender{
switch (sender.tag-0x64) {
case 0:
break;
case 1:
break;
case 2:
break;
default:
break;
}
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
return _dataSource.count;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
ZJGuardCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"ZJGuardCell" forIndexPath:indexPath];
NSDictionary * dic = _dataSource[indexPath.item];
cell.iconImV.image = [UIImage imageNamed:[dic objectForKey:@"image"]];
cell.titleLab.text = [dic objectForKey:@"title"];
return cell;
}
- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath{
if (kind == UICollectionElementKindSectionHeader) {
ZJGuardCollectionHeaderView * header = [collectionView dequeueReusableSupplementaryViewOfKind:kind withReuseIdentifier:@"ZJGuardCollectionHeaderView" forIndexPath:indexPath];
header.backgroundColor = [UIColor whiteColor];
header.topConstrait.constant = StatusBarHeight+105*scale_w;
header.headerBtn_0.tag = 0x64+0;
header.headerBtn_1.tag = 0x64+1;
header.headerBtn_2.tag = 0x64+2;
[header.headerBtn_0 addTarget:self action:@selector(headerBtnClick:) forControlEvents:(UIControlEventTouchUpInside)];
[header.headerBtn_1 addTarget:self action:@selector(headerBtnClick:) forControlEvents:(UIControlEventTouchUpInside)];
[header.headerBtn_2 addTarget:self action:@selector(headerBtnClick:) forControlEvents:(UIControlEventTouchUpInside)];
return header;
}
return nil;
}
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section{
return CGSizeMake(KScreenWidth, StatusBarHeight+(56+253+37)*scale_w);
}
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
CGSize size = CGSizeMake((KScreenWidth-5)/4, 74*scale_w);
return size;
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.2" 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="16087"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="pOX-1j-Bd6">
<objects>
<viewController id="ndR-PS-Mek" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="1RJ-Ec-3tn">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="xMl-qE-nPm"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="ln8-PG-iH1" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="14" y="106"/>
</scene>
</scenes>
</document>
//
// ZJGuardCell.h
// Dolphins
//
// Created by 明津李 on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZJGuardCell : UICollectionViewCell
@property (nonatomic, weak) IBOutlet UIImageView * iconImV;
@property (nonatomic, weak) IBOutlet UILabel * titleLab;
@end
NS_ASSUME_NONNULL_END
//
// ZJGuardCell.m
// Dolphins
//
// Created by 明津李 on 2020/7/29.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJGuardCell.h"
@implementation ZJGuardCell
- (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="16097.2" 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="16087"/>
<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"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="ZJGuardCell" id="gTV-IL-0wX" customClass="ZJGuardCell">
<rect key="frame" x="0.0" y="0.0" width="305" height="180"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="305" height="180"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="remind_cell_Add" translatesAutoresizingMaskIntoConstraints="NO" id="wdg-vm-tUc">
<rect key="frame" x="132.5" y="56.5" width="40" height="40"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mve-uo-rrt">
<rect key="frame" x="138.5" y="104.5" width="28.5" height="13.5"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</view>
<constraints>
<constraint firstItem="wdg-vm-tUc" firstAttribute="centerY" secondItem="gTV-IL-0wX" secondAttribute="centerY" multiplier="0.85" id="JYa-hF-chD"/>
<constraint firstItem="mve-uo-rrt" firstAttribute="top" secondItem="wdg-vm-tUc" secondAttribute="bottom" constant="8" id="cd4-sm-ygU"/>
<constraint firstItem="wdg-vm-tUc" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="jbx-7c-Ys7"/>
<constraint firstItem="mve-uo-rrt" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="o7h-On-Wau"/>
</constraints>
<viewLayoutGuide key="safeArea" id="SEy-5g-ep8"/>
<size key="customSize" width="305" height="180"/>
<connections>
<outlet property="iconImV" destination="wdg-vm-tUc" id="65f-gD-wEJ"/>
<outlet property="titleLab" destination="mve-uo-rrt" id="jzF-Qq-Hwd"/>
</connections>
<point key="canvasLocation" x="322.46376811594206" y="138.61607142857142"/>
</collectionViewCell>
</objects>
<resources>
<image name="remind_cell_Add" width="40" height="40"/>
</resources>
</document>
//
// ZJGuardCollectionHeaderView.h
// Dolphins
//
// Created by 明津李 on 2020/7/28.
// Copyright © 2020 Company. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZJGuardCollectionHeaderView : UICollectionReusableView
@property (nonatomic, weak) IBOutlet UIImageView * bgImV;
@property (nonatomic, weak) IBOutlet UIButton * headerBtn_0;
@property (nonatomic, weak) IBOutlet UIButton * headerBtn_1;
@property (nonatomic, weak) IBOutlet UIButton * headerBtn_2;
@property (nonatomic, weak) IBOutlet NSLayoutConstraint * topConstrait;
@end
NS_ASSUME_NONNULL_END
//
// ZJGuardCollectionHeaderView.m
// Dolphins
//
// Created by 明津李 on 2020/7/28.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJGuardCollectionHeaderView.h"
@implementation ZJGuardCollectionHeaderView
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
@end
This diff is collapsed.
......@@ -15,6 +15,7 @@
#import "ZJMapStyle2ViewController.h"
#import "Data.h"
#import "LaunchScreenPlaceHolderView.h"
#import "ZJGuardViewController.h"
@interface BaseTabBarViewController () <UITabBarControllerDelegate>
......@@ -83,11 +84,17 @@
index:DYTTabBarIndexHome
viewController:care_style2 ? [[ZJCareStyle2ViewController alloc] init] : [[ZJCareViewController alloc] init]];
BaseNavigationViewController *iHospNav = [self baseNavigationWithTtitle:@""
// BaseNavigationViewController *iHospNav = [self baseNavigationWithTtitle:@""
// image:nil
// selectedImage:nil
// index:DYTTabBarIndexIHOSP
// viewController:map_style2 ? [[ZJMapStyle2ViewController alloc] init] : [[ZJMapViewController alloc] init]];
BaseNavigationViewController * guardNav = [self baseNavigationWithTtitle:@""
image:nil
selectedImage:nil
index:DYTTabBarIndexIHOSP
viewController:map_style2 ? [[ZJMapStyle2ViewController alloc] init] : [[ZJMapViewController alloc] init]];
viewController:[[ZJGuardViewController alloc] init]];
BaseNavigationViewController *mineNav = [self baseNavigationWithTtitle:@"我的"
image:[UIImage imageNamed:@"我的"]
......@@ -95,7 +102,7 @@
index:DYTTabBarIndexMine
viewController:[[ZJMineViewController alloc] init]];
self.viewControllers = @[homeNav,iHospNav, mineNav];
self.viewControllers = @[homeNav,guardNav, mineNav];
[self.tabBar setBackgroundImage:[UIImage new]];
[self.tabBar setShadowImage:[UIImage new]];
......
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