Commit 3a46e680 authored by admin's avatar admin

登陆 首页界面插入图片

parent b46c9a19
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
840ABECC1BE1C29F006E49C5 /* RankDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 840ABECB1BE1C29F006E49C5 /* RankDetailViewController.m */; }; 840ABECC1BE1C29F006E49C5 /* RankDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 840ABECB1BE1C29F006E49C5 /* RankDetailViewController.m */; };
840ABECF1BE20A53006E49C5 /* RankShopDetialCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 840ABECE1BE20A53006E49C5 /* RankShopDetialCell.m */; }; 840ABECF1BE20A53006E49C5 /* RankShopDetialCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 840ABECE1BE20A53006E49C5 /* RankShopDetialCell.m */; };
8442BA5C1BDB8FDB005E5657 /* MineTableHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8442BA5B1BDB8FDB005E5657 /* MineTableHeaderView.m */; }; 8442BA5C1BDB8FDB005E5657 /* MineTableHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8442BA5B1BDB8FDB005E5657 /* MineTableHeaderView.m */; };
8474A01C1BE368D700315F30 /* HomeCellItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 8474A01B1BE368D700315F30 /* HomeCellItem.m */; };
84846E971BE069BC0010550A /* DateButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 84846E961BE069BC0010550A /* DateButton.m */; }; 84846E971BE069BC0010550A /* DateButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 84846E961BE069BC0010550A /* DateButton.m */; };
84846E9A1BE07CDF0010550A /* RankingListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84846E991BE07CDF0010550A /* RankingListCell.m */; }; 84846E9A1BE07CDF0010550A /* RankingListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84846E991BE07CDF0010550A /* RankingListCell.m */; };
848699B01BDF810900859DFE /* InspectListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8486999F1BDF810900859DFE /* InspectListCell.m */; }; 848699B01BDF810900859DFE /* InspectListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8486999F1BDF810900859DFE /* InspectListCell.m */; };
...@@ -67,6 +68,8 @@ ...@@ -67,6 +68,8 @@
840ABECE1BE20A53006E49C5 /* RankShopDetialCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RankShopDetialCell.m; sourceTree = "<group>"; }; 840ABECE1BE20A53006E49C5 /* RankShopDetialCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RankShopDetialCell.m; sourceTree = "<group>"; };
8442BA5A1BDB8FDB005E5657 /* MineTableHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MineTableHeaderView.h; sourceTree = "<group>"; }; 8442BA5A1BDB8FDB005E5657 /* MineTableHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MineTableHeaderView.h; sourceTree = "<group>"; };
8442BA5B1BDB8FDB005E5657 /* MineTableHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MineTableHeaderView.m; sourceTree = "<group>"; }; 8442BA5B1BDB8FDB005E5657 /* MineTableHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MineTableHeaderView.m; sourceTree = "<group>"; };
8474A01A1BE368D700315F30 /* HomeCellItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeCellItem.h; sourceTree = "<group>"; };
8474A01B1BE368D700315F30 /* HomeCellItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeCellItem.m; sourceTree = "<group>"; };
84846E951BE069BC0010550A /* DateButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateButton.h; sourceTree = "<group>"; }; 84846E951BE069BC0010550A /* DateButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateButton.h; sourceTree = "<group>"; };
84846E961BE069BC0010550A /* DateButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DateButton.m; sourceTree = "<group>"; }; 84846E961BE069BC0010550A /* DateButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DateButton.m; sourceTree = "<group>"; };
84846E981BE07CDF0010550A /* RankingListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RankingListCell.h; sourceTree = "<group>"; }; 84846E981BE07CDF0010550A /* RankingListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RankingListCell.h; sourceTree = "<group>"; };
...@@ -580,6 +583,8 @@ ...@@ -580,6 +583,8 @@
84C582EB1BDDFB0400AF838D /* HomeFunctionCell.m */, 84C582EB1BDDFB0400AF838D /* HomeFunctionCell.m */,
84DB060F1BE33F33003E581E /* NewAnnounceCell.h */, 84DB060F1BE33F33003E581E /* NewAnnounceCell.h */,
84DB06101BE33F33003E581E /* NewAnnounceCell.m */, 84DB06101BE33F33003E581E /* NewAnnounceCell.m */,
8474A01A1BE368D700315F30 /* HomeCellItem.h */,
8474A01B1BE368D700315F30 /* HomeCellItem.m */,
); );
path = Cell; path = Cell;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -903,6 +908,7 @@ ...@@ -903,6 +908,7 @@
848699B01BDF810900859DFE /* InspectListCell.m in Sources */, 848699B01BDF810900859DFE /* InspectListCell.m in Sources */,
84FD8A071BDA01C4006E442A /* ChartViewController.m in Sources */, 84FD8A071BDA01C4006E442A /* ChartViewController.m in Sources */,
84970DEF1BD8DD8A00C1728A /* main.m in Sources */, 84970DEF1BD8DD8A00C1728A /* main.m in Sources */,
8474A01C1BE368D700315F30 /* HomeCellItem.m in Sources */,
84D8257F1BDD2F7E00CC61F7 /* MineTableFooterView.m in Sources */, 84D8257F1BDD2F7E00CC61F7 /* MineTableFooterView.m in Sources */,
84970E281BD8DEFE00C1728A /* AppDelegate.m in Sources */, 84970E281BD8DEFE00C1728A /* AppDelegate.m in Sources */,
848699B31BDF810900859DFE /* InspectTaskViewController.m in Sources */, 848699B31BDF810900859DFE /* InspectTaskViewController.m in Sources */,
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "password_icon@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "password_icon@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "username_icon@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "username_icon@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
...@@ -2,15 +2,16 @@ ...@@ -2,15 +2,16 @@
"images" : [ "images" : [
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "Login_password.png",
"scale" : "1x" "scale" : "1x"
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "arrow_right@2x.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "arrow_right@3x.png",
"scale" : "3x" "scale" : "3x"
} }
], ],
......
...@@ -36,7 +36,15 @@ ...@@ -36,7 +36,15 @@
#define kSectionBackGroundColor [UIColor colorWithRed:246 / 255.0 green:246 / 255.0 blue:246 / 255.0 alpha:1.0] #define kSectionBackGroundColor [UIColor colorWithRed:246 / 255.0 green:246 / 255.0 blue:246 / 255.0 alpha:1.0]
// #999999 // #999999
#define kHomeSectionTitleTextColor [UIColor colorWithRed:153 / 255.0 green:153 / 255.0 blue:153 / 255.0 alpha:1.0] #define kHomeSectionTitleTextColor [UIColor colorWithRed:153 / 255.0 green:153 / 255.0 blue:153 / 255.0 alpha:1.0]
// #444444
#define kAnnounceTextColor [UIColor colorWithRed:68 / 255.0 green:68 / 255.0 blue:68 / 255.0 alpha:1.0]
// #adadad
#define kPointColor [UIColor colorWithRed:173 / 255.0 green:173 / 255.0 blue:173 / 255.0 alpha:1.0]
// #cccccc
#define kSeparateLineViewColor [UIColor colorWithRed:204 / 255.0 green:204 / 255.0 blue:204 / 255.0 alpha:1.0]
#define kLineCGColor [[UIColor colorWithRed:209 / 255.0 green:209 / 255.0 blue:209 / 255.0 alpha:1.0] CGColor]
// #666666
#define kHomeItemTextColor [UIColor colorWithRed:102 / 255.0 green:102 / 255.0 blue:102 / 255.0 alpha:1.0]
#import "UIView+Extension.h" #import "UIView+Extension.h"
......
//
// HomeCellItem.h
// redstar
//
// Created by admin on 15/10/30.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface HomeCellItem : UIButton
@end
//
// HomeCellItem.m
// redstar
//
// Created by admin on 15/10/30.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "HomeCellItem.h"
@implementation HomeCellItem
- (instancetype)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame]) {
self.imageView.contentMode = UIViewContentModeCenter;
[self setTitleColor:kHomeItemTextColor forState:UIControlStateNormal];
self.titleLabel.textAlignment = NSTextAlignmentCenter;
self.titleLabel.font = [UIFont systemFontOfSize:15];
[self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[self setTitleColor:[UIColor orangeColor] forState:UIControlStateSelected];
self.layer.borderWidth = 0.5;
self.layer.borderColor = kLineCGColor;
}
return self;
}
- (void)layoutSubviews
{
[super layoutSubviews];
CGFloat btnW = self.width;
CGFloat btnH = self.height;
CGFloat imageH = btnH * 0.7;
self.imageView.frame = CGRectMake(0, 7, btnW, imageH);
CGFloat titleH = btnH - imageH;
CGFloat titleY = imageH - 5;
self.titleLabel.frame = CGRectMake(0, titleY, btnW, titleH);
// // 设置badgeView尺寸
// self.badgeView.x = self.width - self.badgeView.width - HMMargin;
//
// self.badgeView.y = 0;
}
@end
...@@ -7,14 +7,15 @@ ...@@ -7,14 +7,15 @@
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "HomeCellItem.h"
@interface HomeFunctionCell : UITableViewCell @interface HomeFunctionCell : UITableViewCell
@property (nonatomic, strong) UIButton *onLineSamplingBtn; // 在线抽查按钮 @property (nonatomic, strong) HomeCellItem *onLineSamplingBtn; // 在线抽查按钮
@property (nonatomic, strong) UIButton *wordOfMouthBtn; // 口碑按钮 @property (nonatomic, strong) HomeCellItem *wordOfMouthBtn; // 口碑按钮
@property (nonatomic, strong) UIButton *standardBtn; // 口碑标准按钮 @property (nonatomic, strong) HomeCellItem *standardBtn; // 口碑标准按钮
@property (nonatomic, strong) UIButton *pictureBtn; // 图说口碑按钮 @property (nonatomic, strong) HomeCellItem *pictureBtn; // 图说口碑按钮
@property (nonatomic, strong) UIButton *questionBtn; // 问题与知识按钮 @property (nonatomic, strong) HomeCellItem *questionBtn; // 问题与知识按钮
@property (nonatomic, strong) UIButton *caseBtn; // 优秀案例按钮 @property (nonatomic, strong) HomeCellItem *caseBtn; // 优秀案例按钮
@end @end
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
#pragma mark - Private Methods #pragma mark - Private Methods
- (void)setup - (void)setup
{ {
self.announceLabel.textColor = kAnnounceTextColor;
self.pointLabel.text = @"···";
} }
#pragma mark - Lazy Loading #pragma mark - Lazy Loading
...@@ -41,12 +42,13 @@ ...@@ -41,12 +42,13 @@
if (!_announceLabel) { if (!_announceLabel) {
_announceLabel = [[UILabel alloc] init]; _announceLabel = [[UILabel alloc] init];
_announceLabel.translatesAutoresizingMaskIntoConstraints = NO; _announceLabel.translatesAutoresizingMaskIntoConstraints = NO;
_announceLabel.font = [UIFont systemFontOfSize:15.0];
[self.contentView addSubview:_announceLabel]; [self.contentView addSubview:_announceLabel];
NSLayoutConstraint *announceTop = [NSLayoutConstraint constraintWithItem:_announceLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1.0 constant:0]; NSLayoutConstraint *announceTop = [NSLayoutConstraint constraintWithItem:_announceLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
[self.contentView addConstraint:announceTop]; [self.contentView addConstraint:announceTop];
NSLayoutConstraint *announceLeft = [NSLayoutConstraint constraintWithItem:_announceLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0]; NSLayoutConstraint *announceLeft = [NSLayoutConstraint constraintWithItem:_announceLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self.contentView addConstraint:announceLeft]; [self.contentView addConstraint:announceLeft];
NSLayoutConstraint *announceRight = [NSLayoutConstraint constraintWithItem:_announceLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.pointLabel attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0]; NSLayoutConstraint *announceRight = [NSLayoutConstraint constraintWithItem:_announceLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.pointLabel attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
...@@ -63,21 +65,25 @@ ...@@ -63,21 +65,25 @@
{ {
if (!_pointLabel) { if (!_pointLabel) {
_pointLabel = [[UILabel alloc] init]; _pointLabel = [[UILabel alloc] init];
_pointLabel.textColor = kPointColor;
_pointLabel.translatesAutoresizingMaskIntoConstraints = NO; _pointLabel.translatesAutoresizingMaskIntoConstraints = NO;
_pointLabel.font = [UIFont systemFontOfSize:15.0];
[self.contentView addSubview:_pointLabel]; [self.contentView addSubview:_pointLabel];
NSLayoutConstraint *pointTop = [NSLayoutConstraint constraintWithItem:_pointLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1.0 constant:0]; NSLayoutConstraint *pointTop = [NSLayoutConstraint constraintWithItem:_pointLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
[self.contentView addConstraint:pointTop]; [self.contentView addConstraint:pointTop];
NSLayoutConstraint *pointLeft = [NSLayoutConstraint constraintWithItem:_pointLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0]; NSLayoutConstraint *pointWidth = [NSLayoutConstraint constraintWithItem:_pointLabel attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:20];
[self.contentView addConstraint:pointLeft]; [self.contentView addConstraint:pointWidth];
NSLayoutConstraint *pointRight = [NSLayoutConstraint constraintWithItem:_pointLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.pointLabel attribute:NSLayoutAttributeLeft multiplier:1.0 constant:-20]; NSLayoutConstraint *pointRight = [NSLayoutConstraint constraintWithItem:_pointLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self.contentView addConstraint:pointRight]; [self.contentView addConstraint:pointRight];
NSLayoutConstraint *pointBottom = [NSLayoutConstraint constraintWithItem:_pointLabel attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0]; NSLayoutConstraint *pointBottom = [NSLayoutConstraint constraintWithItem:_pointLabel attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self.contentView addConstraint:pointBottom]; [self.contentView addConstraint:pointBottom];
} }
return _pointLabel; return _pointLabel;
} }
......
...@@ -166,10 +166,12 @@ ...@@ -166,10 +166,12 @@
_weatherLabel.translatesAutoresizingMaskIntoConstraints = NO; _weatherLabel.translatesAutoresizingMaskIntoConstraints = NO;
_weatherLabel.textAlignment = NSTextAlignmentRight; _weatherLabel.textAlignment = NSTextAlignmentRight;
_weatherLabel.textColor = [UIColor whiteColor]; _weatherLabel.textColor = [UIColor whiteColor];
_weatherLabel.font = [UIFont boldSystemFontOfSize:14.0]; _weatherLabel.font = [UIFont systemFontOfSize:15.0];
[_weatherLabel setShadowColor:[UIColor blackColor]];
[_weatherLabel setShadowOffset:CGSizeMake(1, 1)];
[self insertSubview:_weatherLabel aboveSubview:self.scrollView]; [self insertSubview:_weatherLabel aboveSubview:self.scrollView];
NSLayoutConstraint *weatherHeight = [NSLayoutConstraint constraintWithItem:_weatherLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:20]; NSLayoutConstraint *weatherHeight = [NSLayoutConstraint constraintWithItem:_weatherLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:35];
[_weatherLabel addConstraint:weatherHeight]; [_weatherLabel addConstraint:weatherHeight];
NSLayoutConstraint *weatherRight = [NSLayoutConstraint constraintWithItem:_weatherLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeRight multiplier:1.0 constant:-10]; NSLayoutConstraint *weatherRight = [NSLayoutConstraint constraintWithItem:_weatherLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeRight multiplier:1.0 constant:-10];
......
...@@ -9,11 +9,12 @@ ...@@ -9,11 +9,12 @@
#import "HomeViewController.h" #import "HomeViewController.h"
#import "HomeHeaderView.h" #import "HomeHeaderView.h"
#import "HomeFunctionCell.h" #import "HomeFunctionCell.h"
#import "NewAnnounceCell.h"
#import "InspectListViewController.h" #import "InspectListViewController.h"
#import "RankingListViewController.h" #import "RankingListViewController.h"
#define kHomeCell @"HomeTableViewCell" #define kNewAnnounceCell @"NewAnnounceTableViewCell"
#define kHomeFunctionCell @"HomeFunctionCell" #define kHomeFunctionCell @"HomeFunctionCell"
@interface HomeViewController () <UITableViewDelegate, UITableViewDataSource, UIScrollViewDelegate> @interface HomeViewController () <UITableViewDelegate, UITableViewDataSource, UIScrollViewDelegate>
...@@ -126,13 +127,11 @@ ...@@ -126,13 +127,11 @@
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{ {
if (indexPath.section == 0) { if (indexPath.section == 0) {
UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:kHomeCell]; NewAnnounceCell *cell=[tableView dequeueReusableCellWithIdentifier:kNewAnnounceCell];
if (!cell) { if (!cell) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kHomeCell]; cell = [[NewAnnounceCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kNewAnnounceCell];
} }
// 设置cell右边有个小箭头 cell.announceLabel.text = _announeArray[indexPath.row];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.textLabel.text = _announeArray[indexPath.row];
cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell; return cell;
...@@ -214,8 +213,8 @@ ...@@ -214,8 +213,8 @@
// 箭头Iamge // 箭头Iamge
UIImageView *arrowIamgeView = [[UIImageView alloc] init]; UIImageView *arrowIamgeView = [[UIImageView alloc] init];
arrowIamgeView.image = [UIImage imageNamed:@"arrow_right"];
arrowIamgeView.translatesAutoresizingMaskIntoConstraints = NO; arrowIamgeView.translatesAutoresizingMaskIntoConstraints = NO;
arrowIamgeView.backgroundColor = [UIColor purpleColor];
[sectionView addSubview:arrowIamgeView]; [sectionView addSubview:arrowIamgeView];
// moreButton布局 // moreButton布局
...@@ -232,16 +231,16 @@ ...@@ -232,16 +231,16 @@
[sectionView addConstraint:moreButtonBottom]; [sectionView addConstraint:moreButtonBottom];
// arrowIamgeView布局 // arrowIamgeView布局
NSLayoutConstraint *arrowIamgeViewTop = [NSLayoutConstraint constraintWithItem:arrowIamgeView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:sectionView attribute:NSLayoutAttributeTop multiplier:1.0 constant:10]; NSLayoutConstraint *arrowIamgeViewTop = [NSLayoutConstraint constraintWithItem:arrowIamgeView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:sectionView attribute:NSLayoutAttributeTop multiplier:1.0 constant:13];
[sectionView addConstraint:arrowIamgeViewTop]; [sectionView addConstraint:arrowIamgeViewTop];
NSLayoutConstraint *arrowIamgeViewRight = [NSLayoutConstraint constraintWithItem:arrowIamgeView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:sectionView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-15]; NSLayoutConstraint *arrowIamgeViewRight = [NSLayoutConstraint constraintWithItem:arrowIamgeView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:sectionView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[sectionView addConstraint:arrowIamgeViewRight]; [sectionView addConstraint:arrowIamgeViewRight];
NSLayoutConstraint *arrowIamgeViewWidth = [NSLayoutConstraint constraintWithItem:arrowIamgeView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:16]; NSLayoutConstraint *arrowIamgeViewWidth = [NSLayoutConstraint constraintWithItem:arrowIamgeView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:7];
[sectionView addConstraint:arrowIamgeViewWidth]; [sectionView addConstraint:arrowIamgeViewWidth];
NSLayoutConstraint *arrowIamgeViewHeight = [NSLayoutConstraint constraintWithItem:arrowIamgeView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:16]; NSLayoutConstraint *arrowIamgeViewHeight = [NSLayoutConstraint constraintWithItem:arrowIamgeView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:12];
[sectionView addConstraint:arrowIamgeViewHeight]; [sectionView addConstraint:arrowIamgeViewHeight];
} else { } else {
...@@ -260,7 +259,7 @@ ...@@ -260,7 +259,7 @@
_tableView.dataSource = self; _tableView.dataSource = self;
_tableView.showsVerticalScrollIndicator = NO; _tableView.showsVerticalScrollIndicator = NO;
_tableView.showsHorizontalScrollIndicator = NO; _tableView.showsHorizontalScrollIndicator = NO;
[_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:kHomeCell]; [_tableView registerClass:[NewAnnounceCell class] forCellReuseIdentifier:kNewAnnounceCell];
[_tableView registerClass:[HomeFunctionCell class] forCellReuseIdentifier:kHomeFunctionCell]; [_tableView registerClass:[HomeFunctionCell class] forCellReuseIdentifier:kHomeFunctionCell];
[self.view addSubview:_tableView]; [self.view addSubview:_tableView];
......
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
[self.loginButton setTitle:@"登 录" forState:UIControlStateNormal]; [self.loginButton setTitle:@"登 录" forState:UIControlStateNormal];
self.usernameImageView.image = [UIImage imageNamed:@"aboutme_unchecked"]; self.usernameImageView.image = [UIImage imageNamed:@"username_icon"];
self.passwordImageView.image = [UIImage imageNamed:@"Login_password"]; self.passwordImageView.image = [UIImage imageNamed:@"password_icon"];
self.usernameTextFiled.clearButtonMode = UITextFieldViewModeAlways; self.usernameTextFiled.clearButtonMode = UITextFieldViewModeAlways;
self.passwordTextFiled.clearButtonMode = UITextFieldViewModeAlways; self.passwordTextFiled.clearButtonMode = UITextFieldViewModeAlways;
...@@ -129,17 +129,18 @@ ...@@ -129,17 +129,18 @@
[self.usernameView addConstraint:usernameImageViewTop]; [self.usernameView addConstraint:usernameImageViewTop];
// 左边 // 左边
NSLayoutConstraint *usernameImageViewLeft = [NSLayoutConstraint constraintWithItem:_usernameImageView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:_usernameView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:15]; NSLayoutConstraint *usernameImageViewLeft = [NSLayoutConstraint constraintWithItem:_usernameImageView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:_usernameView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:14];
[self.usernameView addConstraint:usernameImageViewLeft]; [self.usernameView addConstraint:usernameImageViewLeft];
// 底部 // 底部
NSLayoutConstraint *usernameImageViewHeight = [NSLayoutConstraint constraintWithItem:_usernameImageView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:22]; NSLayoutConstraint *usernameImageViewHeight = [NSLayoutConstraint constraintWithItem:_usernameImageView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:21];
[self.usernameView addConstraint:usernameImageViewHeight]; [self.usernameView addConstraint:usernameImageViewHeight];
// 宽度 // 宽度
NSLayoutConstraint *usernameImageViewWidth = [NSLayoutConstraint constraintWithItem:_usernameImageView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:24]; NSLayoutConstraint *usernameImageViewWidth = [NSLayoutConstraint constraintWithItem:_usernameImageView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:24];
[_usernameImageView addConstraint:usernameImageViewWidth]; [_usernameImageView addConstraint:usernameImageViewWidth];
return _usernameImageView; return _usernameImageView;
} }
...@@ -152,19 +153,19 @@ ...@@ -152,19 +153,19 @@
[self.passwordView addSubview:_passwordImageView]; [self.passwordView addSubview:_passwordImageView];
// 顶端 // 顶端
NSLayoutConstraint *passwordImageViewTop = [NSLayoutConstraint constraintWithItem:_passwordImageView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:_passwordView attribute:NSLayoutAttributeTop multiplier:1.0 constant:13]; NSLayoutConstraint *passwordImageViewTop = [NSLayoutConstraint constraintWithItem:_passwordImageView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:_passwordView attribute:NSLayoutAttributeTop multiplier:1.0 constant:14];
[self.passwordView addConstraint:passwordImageViewTop]; [self.passwordView addConstraint:passwordImageViewTop];
// 左边 // 左边
NSLayoutConstraint *passwordImageViewLeft = [NSLayoutConstraint constraintWithItem:_passwordImageView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:_passwordView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:15]; NSLayoutConstraint *passwordImageViewLeft = [NSLayoutConstraint constraintWithItem:_passwordImageView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:_passwordView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:17];
[self.passwordView addConstraint:passwordImageViewLeft]; [self.passwordView addConstraint:passwordImageViewLeft];
// 底部 // 底部
NSLayoutConstraint *passwordImageViewBottom = [NSLayoutConstraint constraintWithItem:_passwordImageView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:22]; NSLayoutConstraint *passwordImageViewBottom = [NSLayoutConstraint constraintWithItem:_passwordImageView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:23];
[self.passwordView addConstraint:passwordImageViewBottom]; [self.passwordView addConstraint:passwordImageViewBottom];
// 宽度 // 宽度
NSLayoutConstraint *passwordImageViewWidth = [NSLayoutConstraint constraintWithItem:_passwordImageView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:24]; NSLayoutConstraint *passwordImageViewWidth = [NSLayoutConstraint constraintWithItem:_passwordImageView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:19];
[_passwordImageView addConstraint:passwordImageViewWidth]; [_passwordImageView addConstraint:passwordImageViewWidth];
return _passwordImageView; return _passwordImageView;
......
...@@ -164,13 +164,11 @@ ...@@ -164,13 +164,11 @@
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
{ {
if ([viewController isKindOfClass:[MineViewController class]]) { if ([viewController isKindOfClass:[MineViewController class]]) {
//tabBarController.hidesBottomBarWhenPushed = YES;
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:viewController]; UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:viewController];
// nav.hidesBottomBarWhenPushed = YES;
tabBarController.tabBar.hidden = YES; tabBarController.tabBar.hidden = YES;
[self presentViewController:nav animated:YES completion:nil]; [self presentViewController:nav animated:YES completion:nil];
} }
} }
......
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