websocket and user center
This commit is contained in:
@@ -4,6 +4,14 @@
|
||||
"idiom" : "universal",
|
||||
"filename" : "btn_right.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
||||
@@ -4,6 +4,14 @@
|
||||
"idiom" : "universal",
|
||||
"filename" : "btn_turndown.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
{
|
||||
UIView *_emptyView;
|
||||
UIView *_noNetWorkView;
|
||||
UITableView *_tableView;
|
||||
}
|
||||
|
||||
@property (nonatomic,strong) UIView * emptyView;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
[self.navigationController.navigationBar cnSetBackgroundColor:GIGAUIColorFromRGB_A(0xD8D8D8, 0.2)];
|
||||
//[self.navigationController.navigationBar cnSetBackgroundColor:GIGAUIColorFromRGB_A(0xD8D8D8, 0.2)];
|
||||
}
|
||||
|
||||
-(void)addNavTitile:(NSString *)title{
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
if (!_tableView) {
|
||||
|
||||
_tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped];
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, PhoneX_TopMargin, KMainW,KMainH - PhoneX_BottomMargin) style:UITableViewStyleGrouped];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
@@ -80,4 +80,10 @@ alpha:((float)(rgbValue & 0xFF))/255.0]
|
||||
#define GIGA_ShowToast(__toast__) [self.view makeToast:(__toast__) duration:1.5 position:CSToastPositionCenter];
|
||||
#define GIGA_WIndowTost(__toast__) [[UIApplication sharedApplication].keyWindow makeToast:(__toast__) duration:1.5 position:CSToastPositionCenter];
|
||||
|
||||
//X
|
||||
#define PhoneX_BottomMargin ([UIScreen mainScreen].bounds.size.height == 812.0 ? 34.0 :0.0)
|
||||
|
||||
#define PhoneX_TopMargin ([UIScreen mainScreen].bounds.size.height == 812.0 ? 24.0 :0.0)
|
||||
|
||||
|
||||
#endif /* GIGA_h */
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>cn</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>MaskTime</string>
|
||||
<string>面膜时间</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
||||
@@ -376,7 +376,6 @@
|
||||
#pragma mark 开始测试
|
||||
-(void)testBtnAcion:(UIButton *)btn{
|
||||
|
||||
|
||||
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
|
||||
|
||||
if (isUserLogin) {
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "GiGaBaseViewController.h"
|
||||
|
||||
@interface GiGaMeViewController : UIViewController
|
||||
@interface GiGaMeViewController : GiGaBaseViewController
|
||||
|
||||
@end
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
|
||||
#import "GiGaMeViewController.h"
|
||||
#import "GiGaUserViewController.h"
|
||||
#import "GiGaMineUserViewCell.h"
|
||||
#import "GiGaMineInfoViewCell.h"
|
||||
#import "GiSysSettingsVC.h"
|
||||
#import "GiMaskTimeHistoryVC.h"
|
||||
|
||||
@interface GiGaMeViewController ()
|
||||
|
||||
@@ -17,21 +21,105 @@
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.title = @"我的";
|
||||
|
||||
[self addNavTitile:@"我的"];
|
||||
// Do any additional setup after loading the view.
|
||||
[self.view addSubview:self.tableView];
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
self.tableView.backgroundColor = [UIColor lightGrayColor];
|
||||
self.tableView.separatorStyle = UITableViewCellSelectionStyleNone;
|
||||
self.tableView.sectionFooterHeight = 0;
|
||||
self.tableView.estimatedSectionFooterHeight= 0;
|
||||
self.tableView.estimatedSectionHeaderHeight = 0;
|
||||
|
||||
}
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
|
||||
return 2;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
|
||||
if (section == 0){
|
||||
return 1;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if(indexPath.section ==0){
|
||||
GiGaMineUserViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"GiGaMineUserViewCell"];
|
||||
if(!cell){
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"GiGaMineUserViewCell" owner:self options:nil] lastObject];
|
||||
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
GiGaMineInfoViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"GiGaMineInfoViewCell"];
|
||||
if(!cell){
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"GiGaMineInfoViewCell" owner:self options:nil] lastObject];
|
||||
|
||||
}
|
||||
|
||||
[cell loadCellData:indexPath];
|
||||
return cell;
|
||||
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if(indexPath.section == 1){
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
}
|
||||
|
||||
if(indexPath.section == 0){
|
||||
GiGaUserViewController *userVC= [[GiGaUserViewController alloc] init];
|
||||
[self.navigationController pushViewController:userVC animated:YES];
|
||||
|
||||
}else{
|
||||
if (indexPath.section == 1 && indexPath.row == 0 ){
|
||||
//历史记录
|
||||
GiMaskTimeHistoryVC *historyVC= [[GiMaskTimeHistoryVC alloc] init];
|
||||
[self.navigationController pushViewController:historyVC animated:YES];
|
||||
|
||||
}else{
|
||||
//系统设置
|
||||
GiSysSettingsVC*settingsVC= [[GiSysSettingsVC alloc] init];
|
||||
[self.navigationController pushViewController:settingsVC animated:YES];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if(indexPath.section==0){
|
||||
return 180;
|
||||
|
||||
}else {
|
||||
return 54;
|
||||
}
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
||||
return 0.1;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
||||
if (section == 1){
|
||||
return 20;
|
||||
}
|
||||
return 0.1;
|
||||
}
|
||||
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
GiGaUserViewController *userVC= [[GiGaUserViewController alloc] init];
|
||||
[self.navigationController pushViewController:userVC animated:YES];
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "GiGaBaseViewController.h"
|
||||
|
||||
@interface GiGaUserViewController : UIViewController
|
||||
@interface GiGaUserViewController : GiGaBaseViewController
|
||||
|
||||
@end
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
self.title = @"个人中心";
|
||||
//self.title = @"个人中心";
|
||||
[self addNavTitile:@"个人中心"];
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// GiMaskTimeHistoryVC.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/3.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GiGaBaseViewController.h"
|
||||
|
||||
@interface GiMaskTimeHistoryVC : GiGaBaseViewController
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// GiMaskTimeHistoryVC.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/3.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GiMaskTimeHistoryVC.h"
|
||||
|
||||
@interface GiMaskTimeHistoryVC ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation GiMaskTimeHistoryVC
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self addNavTitile:@"历史记录"];
|
||||
// Do any additional setup after loading the view.
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
/*
|
||||
#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
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// GiSysSettingsVC.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/3.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GiGaBaseViewController.h"
|
||||
|
||||
@interface GiSysSettingsVC : GiGaBaseViewController
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,122 @@
|
||||
//
|
||||
// GiSysSettingsVC.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/3.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GiSysSettingsVC.h"
|
||||
#import "GiGaSettingsViewCell.h"
|
||||
#import "JXTAlertController.h"
|
||||
|
||||
@interface GiSysSettingsVC ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation GiSysSettingsVC
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
[self addNavTitile:@"系统设置"];
|
||||
[self.view addSubview:self.tableView];
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
self.tableView.backgroundColor = [UIColor lightGrayColor];
|
||||
self.tableView.separatorStyle = UITableViewCellSelectionStyleNone;
|
||||
self.tableView.sectionFooterHeight = 0;
|
||||
self.tableView.estimatedSectionFooterHeight= 0;
|
||||
self.tableView.estimatedSectionHeaderHeight = 0;
|
||||
|
||||
}
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
|
||||
return 4;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
GiGaSettingsViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"GiGaSettingsViewCell"];
|
||||
|
||||
if(!cell){
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"GiGaSettingsViewCell" owner:self options:nil] lastObject];
|
||||
}
|
||||
|
||||
[cell loadCellDataAt:indexPath];
|
||||
return cell;
|
||||
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
return 54;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
||||
return 100;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
||||
|
||||
return 10;
|
||||
}
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
|
||||
|
||||
UIView *view = [[UIView alloc] init];
|
||||
view.frame = CGRectMake(0, 0, KMainW, 100);
|
||||
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
btn.frame = CGRectMake(30, 50, KMainW - 30*2, 50);
|
||||
[btn setTitle:@"退出登录" forState:UIControlStateNormal];
|
||||
btn.layer.masksToBounds = YES;
|
||||
btn.layer.cornerRadius = btn.frame.size.height / 2;
|
||||
btn.backgroundColor = [UIColor greenColor];
|
||||
[btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
[btn addTarget:self action:@selector(userLogOutAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
[view addSubview:btn];
|
||||
return view;
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
#pragma mark - 退出登录
|
||||
-(void)userLogOutAction{
|
||||
|
||||
[self jxt_showAlertWithTitle:@"温馨提示" message:@"确定退出?" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||
alertMaker.addActionCancelTitle(@"取消");
|
||||
alertMaker.addActionDestructiveTitle(@"退出");
|
||||
|
||||
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
|
||||
|
||||
switch (buttonIndex) {
|
||||
|
||||
case 1:
|
||||
{
|
||||
GILog(@"退出登录");
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
GILog(@"取消");
|
||||
break;
|
||||
}
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// GiGaMineInfoViewCell.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/3.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface GiGaMineInfoViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *listImageView;
|
||||
-(void)loadCellData:(NSIndexPath *)indexPath;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *descLabel;
|
||||
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// GiGaMineInfoViewCell.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/3.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GiGaMineInfoViewCell.h"
|
||||
|
||||
@implementation GiGaMineInfoViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)loadCellData:(NSIndexPath *)indexPath{
|
||||
|
||||
if(indexPath.section == 1 && indexPath.row == 0){
|
||||
|
||||
self.listImageView.image = [UIImage imageNamed:@""];
|
||||
self.descLabel.text = @"历史记录";
|
||||
|
||||
}else{
|
||||
self.listImageView.image = [UIImage imageNamed:@""];
|
||||
self.descLabel.text = @"系统设置";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<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" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="GiGaMineInfoViewCell" id="KGk-i7-Jjw" customClass="GiGaMineInfoViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="54"/>
|
||||
<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="341" height="53.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="uc2-z4-fOE">
|
||||
<rect key="frame" x="16" y="11" width="35" height="32"/>
|
||||
<color key="backgroundColor" red="0.19215686269999999" green="0.81960784310000001" blue="0.76470588240000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="35" id="7VO-cv-XQj"/>
|
||||
<constraint firstAttribute="height" constant="32" id="zDE-yt-1Bb"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uAa-YI-Wvr">
|
||||
<rect key="frame" x="71" y="16" width="26" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="wKB-tA-m3l"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="O4K-t3-KxB">
|
||||
<rect key="frame" x="0.0" y="53" width="375" height="1"/>
|
||||
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="lgP-Cy-DDC"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="O4K-t3-KxB" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="4HX-Qq-cv3"/>
|
||||
<constraint firstItem="uc2-z4-fOE" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="5qg-HZ-06o"/>
|
||||
<constraint firstAttribute="trailing" secondItem="O4K-t3-KxB" secondAttribute="trailing" constant="-34" id="Nad-rR-L6i"/>
|
||||
<constraint firstItem="uAa-YI-Wvr" firstAttribute="leading" secondItem="uc2-z4-fOE" secondAttribute="trailing" constant="20" id="PO3-lw-pzh"/>
|
||||
<constraint firstAttribute="bottom" secondItem="O4K-t3-KxB" secondAttribute="bottom" constant="-0.5" id="kHp-np-2YA"/>
|
||||
<constraint firstItem="uAa-YI-Wvr" firstAttribute="centerY" secondItem="uc2-z4-fOE" secondAttribute="centerY" id="sn9-aQ-jMo"/>
|
||||
<constraint firstItem="uc2-z4-fOE" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="ugC-g4-MrU"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
<connections>
|
||||
<outlet property="descLabel" destination="uAa-YI-Wvr" id="3Gm-KY-1Kk"/>
|
||||
<outlet property="listImageView" destination="uc2-z4-fOE" id="0EM-Ze-pik"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="33.5" y="75"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// GiGaMineUserViewCell.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/3.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface GiGaMineUserViewCell : UITableViewCell
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// GiGaMineUserViewCell.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/3.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
//我的 - 个人中心cell
|
||||
#import "GiGaMineUserViewCell.h"
|
||||
|
||||
@implementation GiGaMineUserViewCell
|
||||
|
||||
- (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
|
||||
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<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="none" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="GiGaMineUserViewCell" id="KGk-i7-Jjw" customClass="GiGaMineUserViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="180"/>
|
||||
<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="341" height="179.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="enF-Ff-Ve5">
|
||||
<rect key="frame" x="16" y="32" width="78" height="83"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="1" green="0.34901960780000002" blue="0.094117647060000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="用户名" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ljK-NJ-5JM">
|
||||
<rect key="frame" x="115" y="45" width="52" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8KQ-fZ-Z5e">
|
||||
<rect key="frame" x="115" y="85" width="80" height="30"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" title="VIP会员"/>
|
||||
</button>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
<point key="canvasLocation" x="33.5" y="75"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// GiGaSettingsViewCell.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/3.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface GiGaSettingsViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UILabel *descLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *cachLabe;
|
||||
-(void)loadCellDataAt:(NSIndexPath *)indexPath;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// GiGaSettingsViewCell.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/3.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GiGaSettingsViewCell.h"
|
||||
|
||||
@implementation GiGaSettingsViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
-(void)loadCellDataAt:(NSIndexPath *)indexPath{
|
||||
|
||||
NSArray *listArr =@[@"清除缓存",@"意见反馈",@"关于我们",@"版本说明"];
|
||||
|
||||
if(indexPath.row == 0){
|
||||
self.cachLabe.hidden = NO;
|
||||
|
||||
}
|
||||
self.descLabel.text = listArr[indexPath.row];
|
||||
|
||||
}
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<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" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="GiGaSettingsViewCell" id="KGk-i7-Jjw" customClass="GiGaSettingsViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<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="341" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ndG-YW-sfk">
|
||||
<rect key="frame" x="26" y="13" width="30" height="18"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6PS-Ws-JMW">
|
||||
<rect key="frame" x="0.0" y="42.5" width="375" height="1"/>
|
||||
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="F3E-xB-4EF"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="M" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hqP-o2-Ccz">
|
||||
<rect key="frame" x="265" y="13" width="13" height="18"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="6PS-Ws-JMW" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="DC4-fn-ot1"/>
|
||||
<constraint firstItem="ndG-YW-sfk" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="DY1-kd-hRN"/>
|
||||
<constraint firstAttribute="trailing" secondItem="hqP-o2-Ccz" secondAttribute="trailing" constant="63" id="I7g-q2-S0f"/>
|
||||
<constraint firstItem="hqP-o2-Ccz" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="Qn4-b5-aLv"/>
|
||||
<constraint firstAttribute="bottom" secondItem="6PS-Ws-JMW" secondAttribute="bottom" id="moN-rN-YYH"/>
|
||||
<constraint firstItem="ndG-YW-sfk" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="26" id="vW3-CP-kmW"/>
|
||||
<constraint firstAttribute="trailing" secondItem="6PS-Ws-JMW" secondAttribute="trailing" constant="-34" id="ylJ-U0-g2N"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
<connections>
|
||||
<outlet property="cachLabe" destination="hqP-o2-Ccz" id="DSK-og-jvk"/>
|
||||
<outlet property="descLabel" destination="ndG-YW-sfk" id="vPC-lk-giw"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-5.5" y="43"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import "ViewController.h"
|
||||
#import <SocketIO/SocketIO-Swift.h>
|
||||
|
||||
@interface ViewController ()
|
||||
|
||||
@@ -18,6 +19,7 @@
|
||||
[super viewDidLoad];
|
||||
self.view.backgroundColor = [UIColor purpleColor];
|
||||
|
||||
|
||||
// Do any additional setup after loading the view, typically from a nib.
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user