Commit cc721218 authored by admin's avatar admin

修改bug

parent eb9daac3
......@@ -76,6 +76,10 @@
84D80EB61BF714BE00A10EA4 /* GroupTabBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D80EB41BF714BE00A10EA4 /* GroupTabBar.m */; };
84D8257F1BDD2F7E00CC61F7 /* MineTableFooterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8257E1BDD2F7E00CC61F7 /* MineTableFooterView.m */; };
84D825821BDD35E000CC61F7 /* HomeHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D825811BDD35E000CC61F7 /* HomeHeaderView.m */; };
84DAB3EA1C07605F00F3E416 /* InspectNoUpLoadViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84DAB3E91C07605F00F3E416 /* InspectNoUpLoadViewController.m */; };
84DAB3ED1C07645F00F3E416 /* InspectPointCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84DAB3EC1C07645F00F3E416 /* InspectPointCell.m */; };
84DAB3F01C076C2E00F3E416 /* InpectPictureCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84DAB3EF1C076C2E00F3E416 /* InpectPictureCell.m */; };
84DAB3F61C0802FD00F3E416 /* FuncItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 84DAB3F51C0802FD00F3E416 /* FuncItem.m */; };
84DB9BC41BDCD4B600822CC4 /* CustomDropMenuView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84DB9BC31BDCD4B600822CC4 /* CustomDropMenuView.m */; };
84DB9BC71BDCD67200822CC4 /* UIView+Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = 84DB9BC61BDCD67200822CC4 /* UIView+Extension.m */; };
84E0ABCD1BFB082E001C8F45 /* TaskDetailModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 84E0ABCC1BFB082E001C8F45 /* TaskDetailModel.m */; };
......@@ -258,6 +262,14 @@
84D8257E1BDD2F7E00CC61F7 /* MineTableFooterView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MineTableFooterView.m; sourceTree = "<group>"; };
84D825801BDD35E000CC61F7 /* HomeHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeHeaderView.h; sourceTree = "<group>"; };
84D825811BDD35E000CC61F7 /* HomeHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeHeaderView.m; sourceTree = "<group>"; };
84DAB3E81C07605F00F3E416 /* InspectNoUpLoadViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectNoUpLoadViewController.h; sourceTree = "<group>"; };
84DAB3E91C07605F00F3E416 /* InspectNoUpLoadViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InspectNoUpLoadViewController.m; sourceTree = "<group>"; };
84DAB3EB1C07645F00F3E416 /* InspectPointCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectPointCell.h; sourceTree = "<group>"; };
84DAB3EC1C07645F00F3E416 /* InspectPointCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InspectPointCell.m; sourceTree = "<group>"; };
84DAB3EE1C076C2E00F3E416 /* InpectPictureCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InpectPictureCell.h; sourceTree = "<group>"; };
84DAB3EF1C076C2E00F3E416 /* InpectPictureCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InpectPictureCell.m; sourceTree = "<group>"; };
84DAB3F41C0802FD00F3E416 /* FuncItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FuncItem.h; sourceTree = "<group>"; };
84DAB3F51C0802FD00F3E416 /* FuncItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FuncItem.m; sourceTree = "<group>"; };
84DB9BC21BDCD4B600822CC4 /* CustomDropMenuView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomDropMenuView.h; sourceTree = "<group>"; };
84DB9BC31BDCD4B600822CC4 /* CustomDropMenuView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomDropMenuView.m; sourceTree = "<group>"; };
84DB9BC51BDCD67200822CC4 /* UIView+Extension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Extension.h"; sourceTree = "<group>"; };
......@@ -642,6 +654,7 @@
8486999B1BDF810900859DFE /* Inspect */ = {
isa = PBXGroup;
children = (
84DAB3E41C07600000F3E416 /* InspectionPoint */,
84CF0ECA1BE9A7EF00C855CE /* InspectDetail */,
8486999C1BDF810900859DFE /* InspectList */,
848699A51BDF810900859DFE /* InspectTask */,
......@@ -1122,6 +1135,8 @@
84C957511BDB54BB00083584 /* View */ = {
isa = PBXGroup;
children = (
84DAB3F41C0802FD00F3E416 /* FuncItem.h */,
84DAB3F51C0802FD00F3E416 /* FuncItem.m */,
);
path = View;
sourceTree = "<group>";
......@@ -1178,6 +1193,19 @@
path = View;
sourceTree = "<group>";
};
84DAB3E41C07600000F3E416 /* InspectionPoint */ = {
isa = PBXGroup;
children = (
84DAB3E81C07605F00F3E416 /* InspectNoUpLoadViewController.h */,
84DAB3E91C07605F00F3E416 /* InspectNoUpLoadViewController.m */,
84DAB3EB1C07645F00F3E416 /* InspectPointCell.h */,
84DAB3EC1C07645F00F3E416 /* InspectPointCell.m */,
84DAB3EE1C076C2E00F3E416 /* InpectPictureCell.h */,
84DAB3EF1C076C2E00F3E416 /* InpectPictureCell.m */,
);
path = InspectionPoint;
sourceTree = "<group>";
};
84DB9BC11BDCD49900822CC4 /* CustomDropMenu */ = {
isa = PBXGroup;
children = (
......@@ -1568,6 +1596,8 @@
840ABECC1BE1C29F006E49C5 /* RankDetailViewController.m in Sources */,
8497B62B1C043671007ECBE6 /* InspectTableView.m in Sources */,
84AD4F261BF4356A00BFB37C /* TaskModel.m in Sources */,
84DAB3ED1C07645F00F3E416 /* InspectPointCell.m in Sources */,
84DAB3F01C076C2E00F3E416 /* InpectPictureCell.m in Sources */,
841D24FB1BEB75CA0005CC9F /* QuestionDetailFooterView.m in Sources */,
84CF0FA21BE9EDA900C855CE /* TakePhotoView.m in Sources */,
846206BB1C06AFF50015C456 /* RankCommentCell.m in Sources */,
......@@ -1637,8 +1667,10 @@
84AD4F461BF4A9E800BFB37C /* RankHeadView.m in Sources */,
84E420411BE849FC00689976 /* QuestionDescribeCell.m in Sources */,
84DB9BC71BDCD67200822CC4 /* UIView+Extension.m in Sources */,
84DAB3EA1C07605F00F3E416 /* InspectNoUpLoadViewController.m in Sources */,
8462C6EC1BF5F3BE00344DDD /* MenuButton.m in Sources */,
8442BA5C1BDB8FDB005E5657 /* MineTableHeaderView.m in Sources */,
84DAB3F61C0802FD00F3E416 /* FuncItem.m in Sources */,
84D3E6021C04DA85001FF1DD /* InspectUpLoadFootView.m in Sources */,
8474C5991BE78BBC007DCF19 /* QuestionDetailCell.m in Sources */,
8474C5911BE78A85007DCF19 /* QuestionListTableCell.m in Sources */,
......
No preview for this file type
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "task_00@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "task_00@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
redstar/Assets.xcassets/home/task_00.imageset/task_00@2x.png

4.79 KB

redstar/Assets.xcassets/home/task_00.imageset/task_00@3x.png

7.34 KB

{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "task_01@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "task_01@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
redstar/Assets.xcassets/home/task_01.imageset/task_01@2x.png

5.48 KB

redstar/Assets.xcassets/home/task_01.imageset/task_01@3x.png

8.52 KB

{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "task_02@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "task_02@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
redstar/Assets.xcassets/home/task_02.imageset/task_02@2x.png

7.41 KB

redstar/Assets.xcassets/home/task_02.imageset/task_02@3x.png

11.7 KB

{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "task_03@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "task_03@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
redstar/Assets.xcassets/home/task_03.imageset/task_03@2x.png

5.59 KB

redstar/Assets.xcassets/home/task_03.imageset/task_03@3x.png

8.68 KB

{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "task_04@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "task_04@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
redstar/Assets.xcassets/home/task_04.imageset/task_04@2x.png

6.63 KB

redstar/Assets.xcassets/home/task_04.imageset/task_04@3x.png

10.3 KB

{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "task_05@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "task_05@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
redstar/Assets.xcassets/home/task_05.imageset/task_05@2x.png

4.93 KB

redstar/Assets.xcassets/home/task_05.imageset/task_05@3x.png

7.58 KB

//
// FuncItem.h
// redstar
//
// Created by admin on 15/11/27.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface FuncItem : UIButton
@end
//
// FuncItem.m
// redstar
//
// Created by admin on 15/11/27.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "FuncItem.h"
@implementation FuncItem
- (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);
}
@end
......@@ -7,7 +7,13 @@
//
#import <UIKit/UIKit.h>
#import "FuncItem.h"
@interface AnnounceViewController : UIViewController
@property (nonatomic, strong) FuncItem *onLineSamplingBtn; // 在线抽查按钮
@property (nonatomic, strong) FuncItem *wordOfMouthBtn; // 口碑按钮
@property (nonatomic, strong) FuncItem *standardBtn; // 口碑标准按钮
@property (nonatomic, strong) FuncItem *pictureBtn; // 图说口碑按钮
@property (nonatomic, strong) FuncItem *questionBtn; // 问题与知识按钮
@property (nonatomic, strong) FuncItem *caseBtn; // 优秀案例按钮
@end
......@@ -69,6 +69,11 @@
_placeholderLabel2.hidden = NO;
}
if ([text isEqualToString:@"\n"]) {
[self.contentTextView resignFirstResponder];
return NO;
}
return YES;
}
......@@ -269,8 +274,12 @@
return _sureBtn;
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
[self endEditing:YES];
if (![self.contentTextView isExclusiveTouch]) {
[self.contentTextView resignFirstResponder];
}
}
@end
......@@ -64,6 +64,11 @@
_placeholderLabel2.hidden = NO;
}
if ([text isEqualToString:@"\n"]) {
[self.contentTextView resignFirstResponder];
return NO;
}
return YES;
}
......
......@@ -114,6 +114,11 @@
}
}
if ([text isEqualToString:@"\n"]) {
[self.contentTextView resignFirstResponder];
return NO;
}
return YES;
}
......
......@@ -119,6 +119,12 @@
}
}
if ([text isEqualToString:@"\n"]) {
[self.titleTextView resignFirstResponder];
[self.contentTextView resignFirstResponder];
return NO;
}
return YES;
}
......
......@@ -138,7 +138,6 @@
_commentView.backgroundColor = [UIColor whiteColor];
}
_commentView.contentTextView.text = @"";
_commentView.contentTextView.delegate = self;
[_commentView.quitBtn addTarget:self action:@selector(closeBackGroundView) forControlEvents:UIControlEventTouchUpInside];
[_commentView.sureBtn addTarget:self action:@selector(submitComment:) forControlEvents:UIControlEventTouchUpInside];
[self.view insertSubview:_backGroundView aboveSubview:_tableView];
......
......@@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
@interface SearchToolBar : UIView
@interface SearchToolBar : UIView <UITextFieldDelegate>
@property (nonatomic, strong) UITextField *searchTextFiled; // 搜索框
@property (nonatomic, strong) UIButton *queryButton; // 快速查询按钮
......
......@@ -45,6 +45,7 @@
{
if (!_searchTextFiled) {
_searchTextFiled = [[UITextField alloc] init];
_searchTextFiled.delegate = self;
_searchTextFiled.font = [UIFont systemFontOfSize:14.0];
_searchTextFiled.backgroundColor = [UIColor whiteColor];
_searchTextFiled.translatesAutoresizingMaskIntoConstraints = NO;
......@@ -108,4 +109,12 @@
return _queryButton;
}
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
if ([textField resignFirstResponder]) {
return YES;
}
return NO;
}
@end
......@@ -729,6 +729,16 @@
return _noDataView;
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
if (![_screenView.textView isExclusiveTouch]) {
[_screenView.textView resignFirstResponder];
}
if (![self.searchBar.searchTextFiled isExclusiveTouch]) {
[self.searchBar.searchTextFiled resignFirstResponder];
}
}
/*
#pragma mark - Navigation
......
......@@ -88,6 +88,13 @@
if ([text isEqualToString:@""] && range.location == 0 && range.length == 1) {
_placeholderLabel2.hidden = NO;
}
if ([text isEqualToString:@"\n"]) {
[self.contentTextView resignFirstResponder];
return NO;
}
return YES;
}
......
......@@ -302,10 +302,12 @@
return _footerView;
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
[self.view endEditing:YES];
if (![_footerView.contentTextView isExclusiveTouch]) {
[self.footerView.contentTextView resignFirstResponder];
}
}
/*
#pragma mark - Navigation
......
......@@ -679,4 +679,12 @@
return _noDataView;
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
if (![_screenView.textView isExclusiveTouch]) {
[_screenView.textView resignFirstResponder];
}
}
@end
......@@ -22,6 +22,7 @@
#import "InspectNotUploadViewController.h"
#import "InspectUploadedViewController.h"
#import "InspectNoUpLoadViewController.h"
#define kTaskSortCell @"InspectTaskSortCell"
......@@ -166,6 +167,9 @@
TaskModel *task = taskGroup.answers[indexPath.row];
if (task.state == 0) {
//InspectNoUpLoadViewController *inspectNotVC = [[InspectNoUpLoadViewController alloc] init];
InspectNotUploadViewController *inspectNotVC = [[InspectNotUploadViewController alloc] init];
inspectNotVC.questionCount = taskGroup.questionCount;
inspectNotVC.taskModel = task;
......
//
// InpectPictureCell.h
// redstar
//
// Created by admin on 15/11/27.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface InpectPictureCell : UITableViewCell
@property (nonatomic, strong) UIButton *photoButton;
@property (nonatomic, strong) NSLayoutConstraint *overDateLeft;
@property (nonatomic, strong) NSLayoutConstraint *overDateRight;
@end
//
//
// redstar
//
// Created by admin on 15/11/27.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "InpectPictureCell.h"
@implementation InpectPictureCell
#pragma mark - System Methods
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
[self setup];
}
return self;
}
#pragma mark - Private Methods
- (void)setup
{
}
- (UIButton *)photoButton
{
if (!_photoButton) {
_photoButton = [[UIButton alloc] init];
_photoButton.translatesAutoresizingMaskIntoConstraints = NO;
_photoButton.backgroundColor = [UIColor redColor];
[self.contentView addSubview:_photoButton];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint
constraintWithItem:_photoButton
attribute:NSLayoutAttributeTop
relatedBy:NSLayoutRelationEqual
toItem:self.contentView
attribute:NSLayoutAttributeTop
multiplier:1.0
constant:5];
[self.contentView addConstraint:overDateTop];
self.overDateLeft = [NSLayoutConstraint
constraintWithItem:_photoButton
attribute:NSLayoutAttributeLeft
relatedBy:NSLayoutRelationEqual
toItem:self.contentView
attribute:NSLayoutAttributeLeft
multiplier:1.0
constant:20];
[self.contentView addConstraint:_overDateLeft];
self.overDateRight = [NSLayoutConstraint
constraintWithItem:_photoButton
attribute:NSLayoutAttributeRight
relatedBy:NSLayoutRelationEqual
toItem:self.contentView
attribute:NSLayoutAttributeRight
multiplier:1.0
constant:-(kScreenWidth / 2 + 10)];
[self.contentView addConstraint:_overDateRight];
NSLayoutConstraint *overDateHeight = [NSLayoutConstraint
constraintWithItem:_photoButton
attribute:NSLayoutAttributeHeight
relatedBy:NSLayoutRelationEqual
toItem:nil
attribute:NSLayoutAttributeNotAnAttribute
multiplier:1.0
constant:90];
[self.contentView addConstraint:overDateHeight];
NSLayoutConstraint *overDateBottom = [NSLayoutConstraint
constraintWithItem:_photoButton
attribute:NSLayoutAttributeBottom
relatedBy:NSLayoutRelationEqual
toItem:self.contentView
attribute:NSLayoutAttributeBottom
multiplier:1.0
constant:-5];
[self.contentView addConstraint:overDateBottom];
}
return _photoButton;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
//
// InspectNoUpLoadViewController.h
// redstar
//
// Created by admin on 15/11/26.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "TaskModel.h"
@interface InspectNoUpLoadViewController : UIViewController
@property (nonatomic, assign) int questionCount;
@property (nonatomic, strong) TaskModel *taskModel;
@property(nonatomic, strong) NSString *store_uuid;
@property (nonatomic, strong) NSString *uuid; // 口碑巡检uuid
@property (nonatomic, strong) NSString *praiseUuid;
@property (nonatomic, strong) NSString *questionUuid;
@end
//
// InspectPointCell.h
// redstar
//
// Created by admin on 15/11/27.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface InspectPointCell : UITableViewCell
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *detailLabel;
@end
//
// InspectPointCell.m
// redstar
//
// Created by admin on 15/11/27.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "InspectPointCell.h"
@implementation InspectPointCell
#pragma - lazy loading
- (UILabel *)titleLabel
{
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
_titleLabel.font = [UIFont systemFontOfSize:15.0];
_titleLabel.textColor = kLightGray;
[self.contentView addSubview:_titleLabel];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1.0 constant:5];
[self.contentView addConstraint:overDateTop];
NSLayoutConstraint *overDateLeft = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self.contentView addConstraint:overDateLeft];
NSLayoutConstraint *overDateRight = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self.contentView addConstraint:overDateRight];
NSLayoutConstraint *overDateWidth = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:23];
[self.contentView addConstraint:overDateWidth];
}
return _titleLabel;
}
- (UILabel *)detailLabel
{
if (!_detailLabel) {
_detailLabel = [[UILabel alloc] init];
_detailLabel.translatesAutoresizingMaskIntoConstraints = NO;
_detailLabel.font = [UIFont systemFontOfSize:15.0];
_detailLabel.textColor = kLightBlack;
_detailLabel.numberOfLines = 0;
[self.contentView addSubview:_detailLabel];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint constraintWithItem:_detailLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.titleLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:2];
[self.contentView addConstraint:overDateTop];
NSLayoutConstraint *overDateLeft = [NSLayoutConstraint constraintWithItem:_detailLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self.contentView addConstraint:overDateLeft];
NSLayoutConstraint *overDateRight = [NSLayoutConstraint constraintWithItem:_detailLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self.contentView addConstraint:overDateRight];
NSLayoutConstraint *overDateBottom = [NSLayoutConstraint constraintWithItem:_detailLabel attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-8];
[self.contentView addConstraint:overDateBottom];
}
return _detailLabel;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
......@@ -50,7 +50,7 @@
UIButton *bgButton = [UIButton buttonWithType:UIButtonTypeCustom];
bgButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
bgButton.contentEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 10);
bgButton.titleEdgeInsets = UIEdgeInsetsMake(0, 45, 0, 0);
bgButton.titleEdgeInsets = UIEdgeInsetsMake(0, 30, 0, 0);
[bgButton setTitleColor:kLightBlack forState:UIControlStateNormal];
bgButton.titleLabel.font = [UIFont systemFontOfSize:18.0];
[bgButton addTarget:self action:@selector(headBtnClick) forControlEvents:UIControlEventTouchUpInside];
......
......@@ -30,17 +30,16 @@
CGFloat btnW = self.width;
CGFloat btnH = self.height;
CGFloat imageH = btnH * 0.7;
self.imageView.frame = CGRectMake(0, 7, btnW, imageH);
self.imageView.frame = CGRectMake((btnW - 45) / 2 , 13, 45, 45);
CGFloat titleH = btnH - imageH;
CGFloat titleY = imageH - 5;
CGFloat titleH = btnH - 55;
CGFloat titleY = 61;
self.titleLabel.frame = CGRectMake(0, titleY, btnW, titleH);
// // 设置badgeView尺寸
// self.badgeView.x = self.width - self.badgeView.width - HMMargin;
//
// self.badgeView.y = 0;
// // 设置badgeView尺寸
// self.badgeView.x = self.width - self.badgeView.width - HMMargin;
//
// self.badgeView.y = 0;
}
......
......@@ -85,7 +85,7 @@
- (UIScrollView *)scrollView
{
if (!_scrollView) {
_scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, 120)];
_scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, 86)];
_scrollView.bounces = NO;
_scrollView.backgroundColor = [UIColor whiteColor];
_scrollView.pagingEnabled = YES;
......
......@@ -240,7 +240,7 @@
self.bgImageView.image = image;
self.searchTextField.backgroundColor = [UIColor clearColor];
self.nameLabel.backgroundColor = [UIColor clearColor];
_nameLabel.text = @"东方明珠,你好!";
_nameLabel.text = @"超级管理员,你好!";
self.shopnameLabel.backgroundColor = [UIColor clearColor];
_shopnameLabel.text = @"上海真北店";
......@@ -248,16 +248,16 @@
- (void)setupTableView
{
self.headView = [[HomeHeaderView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 149)];
self.headView = [[HomeHeaderView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 115)];
self.headView.scrollView.contentSize = CGSizeMake(2 * kScreenWidth, 120);
CGFloat itemW = kScreenWidth / 3;
self.headView.scrollView.contentSize = CGSizeMake(2 * kScreenWidth, 86);
CGFloat itemW = kScreenWidth / 4;
CGFloat itemH = self.headView.scrollView.frame.size.height;
for (int i = 0; i < 6; i++) {
HomeCellItem *item = [[HomeCellItem alloc] init];
item.frame = CGRectMake(i * itemW, 0, itemW, itemH);
UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"task_00%d", i]];
UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"task_0%d", i]];
[item setImage:image forState:UIControlStateNormal];
[item setTitleColor:kPictureCellDetailsColor forState:UIControlStateNormal];
[item setTitle:[NSString stringWithFormat:@"%@", self.btnTitleArray[i]] forState:UIControlStateNormal];
......@@ -524,7 +524,7 @@
if (!cell) {
cell = [[RankCommentCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kHomeRankingListCell];
}
RankListModel *rankListModel = _rankData[indexPath.section];
RankListModel *rankListModel = _rankData[indexPath.section - 2];
RankCommentModel *commentModel = rankListModel.comments[indexPath.row];
cell.rankComment = commentModel;
return cell;
......@@ -560,9 +560,9 @@
[self.navigationController pushViewController:inspectTaskVC animated:YES];
} else {
RankListModel *rankList = _rankData[indexPath.section];
RankListModel *rankList = _rankData[indexPath.section - 2];
RankDetailViewController *rankDetailVC = [[RankDetailViewController alloc] init];
rankDetailVC.indexRow = indexPath.section;
rankDetailVC.indexRow = indexPath.section - 2;
rankDetailVC.uuid = rankList.uuid;
rankDetailVC.store_uuid = rankList.store_uuid;
rankDetailVC.storeAddress = rankList.storeAddress;
......@@ -726,7 +726,7 @@
return sectionView;
} else {
RankListHeaderView *headerView = [RankListHeaderView headViewWithTableView:tableView section:section];
RankListHeaderView *headerView = [RankListHeaderView headViewWithTableView:tableView section:section - 2];
headerView.delegate = self;
[headerView.pushButton addTarget:self action:@selector(pushclick:) forControlEvents:UIControlEventTouchUpInside];
headerView.rankListModel = _rankData[section-2];
......@@ -831,7 +831,7 @@
NSLayoutConstraint *bgImageBottom = [NSLayoutConstraint constraintWithItem:_nameLabel attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.bgImageView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self.bgImageView addConstraint:bgImageBottom];
NSLayoutConstraint *bgImageWidth = [NSLayoutConstraint constraintWithItem:_nameLabel attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:95];
NSLayoutConstraint *bgImageWidth = [NSLayoutConstraint constraintWithItem:_nameLabel attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:110];
[self.bgImageView addConstraint:bgImageWidth];
}
return _nameLabel;
......
......@@ -45,7 +45,7 @@
self.loginView.usernameTextFiled.delegate = self;
self.loginView.passwordTextFiled.delegate = self;
// 初始化数组
self.allUserDict = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"thoradmin", @"admin", nil];
......@@ -207,7 +207,7 @@
if ([self.loginView.usernameTextFiled isFirstResponder]) {
// 创建下拉菜单
self.menu = [CustomDropMenuView defaultMenuView];
_menu.showTop = 260;
_menu.showTop = 300;
_menu.showLeft = 20;
_menu.showRight = -20;
_menu.showHeight = 40 * _allUserDict.count;
......@@ -247,5 +247,12 @@
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
if ([textField resignFirstResponder]) {
return YES;
}
return NO;
}
@end
......@@ -33,13 +33,13 @@
[customLab setText:@"我的"];
customLab.font = [UIFont boldSystemFontOfSize:19];
self.navigationItem.titleView = customLab;
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
backBtn.frame = CGRectMake(0, 0, 30, 44);
[backBtn setImage:[UIImage imageNamed:@"back_btn"] forState:UIControlStateNormal];
[backBtn addTarget:self action:@selector(doBack:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn];
self.navigationItem.leftBarButtonItem = backItem;
//
// UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
// backBtn.frame = CGRectMake(0, 0, 30, 44);
// [backBtn setImage:[UIImage imageNamed:@"back_btn"] forState:UIControlStateNormal];
// [backBtn addTarget:self action:@selector(doBack:) forControlEvents:UIControlEventTouchUpInside];
// UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn];
// self.navigationItem.leftBarButtonItem = backItem;
......
......@@ -133,6 +133,12 @@
}
if ([text isEqualToString:@"\n"]) {
[self.textView resignFirstResponder];
return NO;
}
return YES;
}
......@@ -222,6 +228,8 @@
return _submitBtn;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
......
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