Commit de243197 authored by admin's avatar admin

修复 拍照后按钮显示不出来bug

parent 3a2738ae
......@@ -97,9 +97,9 @@
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 */; };
84D8636E1C1148EC00E4F4CC /* InpectPictureCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D863691C1148EC00E4F4CC /* InpectPictureCell.m */; };
84D8636F1C1148EC00E4F4CC /* InspectAddCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8636B1C1148EC00E4F4CC /* InspectAddCell.m */; };
84D863701C1148EC00E4F4CC /* InspectPicAddCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D8636D1C1148EC00E4F4CC /* InspectPicAddCell.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 */; };
......@@ -322,12 +322,12 @@
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>"; };
84D863681C1148EC00E4F4CC /* InpectPictureCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InpectPictureCell.h; sourceTree = "<group>"; };
84D863691C1148EC00E4F4CC /* InpectPictureCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InpectPictureCell.m; sourceTree = "<group>"; };
84D8636A1C1148EC00E4F4CC /* InspectAddCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectAddCell.h; sourceTree = "<group>"; };
84D8636B1C1148EC00E4F4CC /* InspectAddCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InspectAddCell.m; sourceTree = "<group>"; };
84D8636C1C1148EC00E4F4CC /* InspectPicAddCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectPicAddCell.h; sourceTree = "<group>"; };
84D8636D1C1148EC00E4F4CC /* InspectPicAddCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InspectPicAddCell.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>"; };
......@@ -714,7 +714,6 @@
8486999B1BDF810900859DFE /* Inspect */ = {
isa = PBXGroup;
children = (
84DAB3E41C07600000F3E416 /* InspectionPoint */,
84CF0ECA1BE9A7EF00C855CE /* InspectDetail */,
8486999C1BDF810900859DFE /* InspectList */,
848699A51BDF810900859DFE /* InspectTask */,
......@@ -1485,6 +1484,12 @@
84CF0ECB1BE9A7EF00C855CE /* Cell */ = {
isa = PBXGroup;
children = (
84D863681C1148EC00E4F4CC /* InpectPictureCell.h */,
84D863691C1148EC00E4F4CC /* InpectPictureCell.m */,
84D8636A1C1148EC00E4F4CC /* InspectAddCell.h */,
84D8636B1C1148EC00E4F4CC /* InspectAddCell.m */,
84D8636C1C1148EC00E4F4CC /* InspectPicAddCell.h */,
84D8636D1C1148EC00E4F4CC /* InspectPicAddCell.m */,
84D3E5F71C04BD8E001FF1DD /* InspectNotUpLoadCell.h */,
84D3E5F81C04BD8E001FF1DD /* InspectNotUpLoadCell.m */,
);
......@@ -1515,19 +1520,6 @@
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 = (
......@@ -1886,8 +1878,6 @@
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 */,
......@@ -1939,6 +1929,7 @@
84D3E5F01C04BC8C001FF1DD /* InspectUploadedViewController.m in Sources */,
8487D80C1BF218F900E63E90 /* MenuView.m in Sources */,
84CC34CE1C093C2F002F10E2 /* OnLineViewController.m in Sources */,
84D8636E1C1148EC00E4F4CC /* InpectPictureCell.m in Sources */,
8474C5921BE78A85007DCF19 /* QuestionViewController.m in Sources */,
84A673BF1C0C7AEB000F828E /* AnnounceModel.m in Sources */,
84CC34CD1C093C2F002F10E2 /* OnLineFooterView.m in Sources */,
......@@ -1969,7 +1960,6 @@
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 */,
84CC34E21C09583D002F10E2 /* LookOnLineTableViewCell.m in Sources */,
......@@ -1982,6 +1972,8 @@
84D554EE1C0EDFB8006C9AD0 /* SearchViewController.m in Sources */,
84A673C01C0C7AEB000F828E /* FuncItem.m in Sources */,
84F1669B1BE715E40061D350 /* ZanButton.m in Sources */,
84D863701C1148EC00E4F4CC /* InspectPicAddCell.m in Sources */,
84D8636F1C1148EC00E4F4CC /* InspectAddCell.m in Sources */,
84CC34DF1C0953C3002F10E2 /* HandOutViewController.m in Sources */,
8419EAD41BEDC98F002635ED /* HttpClient.m in Sources */,
84A673C11C0C7AEB000F828E /* AnnounceViewController.m in Sources */,
......
//
// InspectPointCell.h
// InpectPictureCell.h
// redstar
//
// Created by admin on 15/11/27.
......@@ -8,7 +8,10 @@
#import <UIKit/UIKit.h>
@interface InspectPointCell : UITableViewCell
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *detailLabel;
@interface InpectPictureCell : UITableViewCell
@property (nonatomic, strong) UIButton *photoButton1;
@property (nonatomic, strong) UIButton *photoButton2;
@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
{
self.contentView.backgroundColor = [UIColor colorWithRed:239 / 255.0 green:239 / 255.0 blue:239 / 255.0 alpha:239 / 255.0];
}
- (UIButton *)photoButton1
{
if (!_photoButton1) {
_photoButton1 = [[UIButton alloc] init];
_photoButton1.translatesAutoresizingMaskIntoConstraints = NO;
[self.contentView addSubview:_photoButton1];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint
constraintWithItem:_photoButton1
attribute:NSLayoutAttributeTop
relatedBy:NSLayoutRelationEqual
toItem:self.contentView
attribute:NSLayoutAttributeTop
multiplier:1.0
constant:5];
[self.contentView addConstraint:overDateTop];
NSLayoutConstraint *overDateLeft = [NSLayoutConstraint
constraintWithItem:_photoButton1
attribute:NSLayoutAttributeLeft
relatedBy:NSLayoutRelationEqual
toItem:self.contentView
attribute:NSLayoutAttributeLeft
multiplier:1.0
constant:20];
[self.contentView addConstraint:overDateLeft];
NSLayoutConstraint *overDateRight = [NSLayoutConstraint
constraintWithItem:_photoButton1
attribute:NSLayoutAttributeRight
relatedBy:NSLayoutRelationEqual
toItem:self.contentView
attribute:NSLayoutAttributeRight
multiplier:1.0
constant:-(kScreenWidth / 2 + 10)];
[self.contentView addConstraint:overDateRight];
NSLayoutConstraint *overDateHeight = [NSLayoutConstraint
constraintWithItem:_photoButton1
attribute:NSLayoutAttributeHeight
relatedBy:NSLayoutRelationEqual
toItem:nil
attribute:NSLayoutAttributeNotAnAttribute
multiplier:1.0
constant:90];
[self.contentView addConstraint:overDateHeight];
NSLayoutConstraint *overDateBottom = [NSLayoutConstraint
constraintWithItem:_photoButton1
attribute:NSLayoutAttributeBottom
relatedBy:NSLayoutRelationEqual
toItem:self.contentView
attribute:NSLayoutAttributeBottom
multiplier:1.0
constant:-5];
[self.contentView addConstraint:overDateBottom];
}
return _photoButton1;
}
- (UIButton *)photoButton2
{
if (!_photoButton2) {
_photoButton2 = [[UIButton alloc] init];
_photoButton2.translatesAutoresizingMaskIntoConstraints = NO;
[self.contentView addSubview:_photoButton2];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint
constraintWithItem:_photoButton2
attribute:NSLayoutAttributeTop
relatedBy:NSLayoutRelationEqual
toItem:self.contentView
attribute:NSLayoutAttributeTop
multiplier:1.0
constant:5];
[self.contentView addConstraint:overDateTop];
NSLayoutConstraint *overDateLeft = [NSLayoutConstraint
constraintWithItem:_photoButton2
attribute:NSLayoutAttributeLeft
relatedBy:NSLayoutRelationEqual
toItem:self.contentView
attribute:NSLayoutAttributeLeft
multiplier:1.0
constant:kScreenWidth / 2 + 10];
[self.contentView addConstraint:overDateLeft];
NSLayoutConstraint *overDateRight = [NSLayoutConstraint
constraintWithItem:_photoButton2
attribute:NSLayoutAttributeRight
relatedBy:NSLayoutRelationEqual
toItem:self.contentView
attribute:NSLayoutAttributeRight
multiplier:1.0
constant:-20];
[self.contentView addConstraint:overDateRight];
NSLayoutConstraint *overDateHeight = [NSLayoutConstraint
constraintWithItem:_photoButton2
attribute:NSLayoutAttributeHeight
relatedBy:NSLayoutRelationEqual
toItem:nil
attribute:NSLayoutAttributeNotAnAttribute
multiplier:1.0
constant:90];
[self.contentView addConstraint:overDateHeight];
}
return _photoButton2;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
//
// InpectPictureCell.h
// InspectAddCell.h
// redstar
//
// Created by admin on 15/11/27.
// Created by admin on 15/12/3.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface InpectPictureCell : UITableViewCell
@interface InspectAddCell : UITableViewCell
@property (nonatomic, strong) UIButton *photoButton;
@property (nonatomic, strong) NSLayoutConstraint *overDateLeft;
@property (nonatomic, strong) NSLayoutConstraint *overDateRight;
......
//
//
// InspectAddCell.m
// redstar
//
// Created by admin on 15/11/27.
// Created by admin on 15/12/3.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "InpectPictureCell.h"
#import "InspectAddCell.h"
@implementation InpectPictureCell
@implementation InspectAddCell
#pragma mark - System Methods
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
......@@ -23,15 +23,17 @@
#pragma mark - Private Methods
- (void)setup
{
self.contentView.backgroundColor = [UIColor colorWithRed:239 / 255.0 green:239 / 255.0 blue:239 / 255.0 alpha:239 / 255.0];
}
- (UIButton *)photoButton
{
if (!_photoButton) {
_photoButton = [[UIButton alloc] init];
_photoButton.backgroundColor = [UIColor whiteColor];
_photoButton.translatesAutoresizingMaskIntoConstraints = NO;
_photoButton.backgroundColor = [UIColor redColor];
[_photoButton setImage:[UIImage imageNamed:@"add-photos_btn"] forState:UIControlStateNormal];
[self.contentView addSubview:_photoButton];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint
......@@ -45,33 +47,33 @@
[self.contentView addConstraint:overDateTop];
self.overDateLeft = [NSLayoutConstraint
constraintWithItem:_photoButton
attribute:NSLayoutAttributeLeft
relatedBy:NSLayoutRelationEqual
toItem:self.contentView
attribute:NSLayoutAttributeLeft
multiplier:1.0
constant:20];
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)];
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];
constraintWithItem:_photoButton
attribute:NSLayoutAttributeHeight
relatedBy:NSLayoutRelationEqual
toItem:nil
attribute:NSLayoutAttributeNotAnAttribute
multiplier:1.0
constant:90];
[self.contentView addConstraint:overDateHeight];
NSLayoutConstraint *overDateBottom = [NSLayoutConstraint
......@@ -87,6 +89,9 @@
return _photoButton;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
......
//
// InspectInterfaceCell.h
// redstar
//
// Created by admin on 15/11/25.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface InspectInterfaceCell : UITableViewCell
@end
//
// InspectInterfaceCell.m
// redstar
//
// Created by admin on 15/11/25.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "InspectInterfaceCell.h"
@implementation InspectInterfaceCell
- (void)awakeFromNib {
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
......@@ -13,4 +13,5 @@
@property (nonatomic, strong) UILabel *titleDetailLabel;
@property (nonatomic, strong) UILabel *introLabel;
@property (nonatomic, strong) UILabel *introDetailLabel;
@property (nonatomic, strong) UILabel *pictureLabel;
@end
......@@ -8,6 +8,10 @@
#import "InspectNotUpLoadCell.h"
@interface InspectNotUpLoadCell ()
@property (nonatomic, strong) UIView *bgView;
@end
@implementation InspectNotUpLoadCell
#pragma mark - System Methods
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
......@@ -21,6 +25,7 @@
#pragma mark - Private Methods
- (void)setup {
self.bgView.backgroundColor = [UIColor colorWithRed:239 / 255.0 green:239 / 255.0 blue:239 / 255.0 alpha:239 / 255.0];
}
......@@ -105,9 +110,7 @@
if (!_introDetailLabel) {
_introDetailLabel = [[UILabel alloc] init];
_introDetailLabel.translatesAutoresizingMaskIntoConstraints = NO;
_introDetailLabel.font = [UIFont systemFontOfSize:15.0];
_introDetailLabel.numberOfLines = 0;
_introDetailLabel.textColor = [UIColor clearColor];
[self.contentView addSubview:_introDetailLabel];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint constraintWithItem:_introDetailLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.introLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
......@@ -119,13 +122,65 @@
NSLayoutConstraint *overDateRight = [NSLayoutConstraint constraintWithItem:_introDetailLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self.contentView addConstraint:overDateRight];
NSLayoutConstraint *overDateBottom = [NSLayoutConstraint constraintWithItem:_introDetailLabel attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-20];
[self.contentView addConstraint:overDateBottom];
}
return _introDetailLabel;
}
- (UIView *)bgView
{
if (!_bgView) {
_bgView = [[UIView alloc] init];
_bgView.translatesAutoresizingMaskIntoConstraints = NO;
[self.contentView addSubview:_bgView];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint constraintWithItem:_bgView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.introDetailLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self.contentView addConstraint:overDateTop];
NSLayoutConstraint *overDateLeft = [NSLayoutConstraint constraintWithItem:_bgView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
[self.contentView addConstraint:overDateLeft];
NSLayoutConstraint *overDateRight = [NSLayoutConstraint constraintWithItem:_bgView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
[self.contentView addConstraint:overDateRight];
NSLayoutConstraint *overDateHeight = [NSLayoutConstraint constraintWithItem:_bgView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self.contentView addConstraint:overDateHeight];
NSLayoutConstraint *overDateBottom = [NSLayoutConstraint constraintWithItem:_bgView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self.contentView addConstraint:overDateBottom];
}
return _bgView;
}
- (UILabel *)pictureLabel
{
if (!_pictureLabel) {
_pictureLabel = [[UILabel alloc] init];
_pictureLabel.translatesAutoresizingMaskIntoConstraints = NO;
_pictureLabel.font = [UIFont systemFontOfSize:15.0];
_pictureLabel.backgroundColor = [UIColor clearColor];
_pictureLabel.textColor = kLightGray;
[self.bgView addSubview:_pictureLabel];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint constraintWithItem:_pictureLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
[self.bgView addConstraint:overDateTop];
NSLayoutConstraint *overDateLeft = [NSLayoutConstraint constraintWithItem:_pictureLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self.bgView addConstraint:overDateLeft];
NSLayoutConstraint *overDateRight = [NSLayoutConstraint constraintWithItem:_pictureLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self.bgView addConstraint:overDateRight];
NSLayoutConstraint *overDateBottom = [NSLayoutConstraint constraintWithItem:_pictureLabel attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self.bgView addConstraint:overDateBottom];
}
return _pictureLabel;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
......
//
// InspectPicAddCell.h
// 拍照
//
// Created by admin on 15/12/4.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface InspectPicAddCell : UITableViewCell
@property (nonatomic, strong) UIButton *photoButton1;
@property (nonatomic, strong) UIButton *photoButton2;
@end
//
// InspectPicAddCell.m
// 拍照
//
// Created by admin on 15/12/4.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "InspectPicAddCell.h"
@implementation InspectPicAddCell
#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
{
self.contentView.backgroundColor = [UIColor colorWithRed:239 / 255.0 green:239 / 255.0 blue:239 / 255.0 alpha:239 / 255.0];
}
- (UIButton *)photoButton1
{
if (!_photoButton1) {
_photoButton1 = [[UIButton alloc] init];
_photoButton1.translatesAutoresizingMaskIntoConstraints = NO;
[self.contentView addSubview:_photoButton1];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint
constraintWithItem:_photoButton1
attribute:NSLayoutAttributeTop
relatedBy:NSLayoutRelationEqual
toItem:self.contentView
attribute:NSLayoutAttributeTop
multiplier:1.0
constant:5];
[self.contentView addConstraint:overDateTop];
NSLayoutConstraint *overDateLeft = [NSLayoutConstraint
constraintWithItem:_photoButton1
attribute:NSLayoutAttributeLeft
relatedBy:NSLayoutRelationEqual
toItem:self.contentView
attribute:NSLayoutAttributeLeft
multiplier:1.0
constant:20];
[self.contentView addConstraint:overDateLeft];
NSLayoutConstraint *overDateRight = [NSLayoutConstraint
constraintWithItem:_photoButton1
attribute:NSLayoutAttributeRight
relatedBy:NSLayoutRelationEqual
toItem:self.contentView
attribute:NSLayoutAttributeRight
multiplier:1.0
constant:-(kScreenWidth / 2 + 10)];
[self.contentView addConstraint:overDateRight];
NSLayoutConstraint *overDateHeight = [NSLayoutConstraint
constraintWithItem:_photoButton1
attribute:NSLayoutAttributeHeight
relatedBy:NSLayoutRelationEqual
toItem:nil
attribute:NSLayoutAttributeNotAnAttribute
multiplier:1.0
constant:90];
[self.contentView addConstraint:overDateHeight];
NSLayoutConstraint *overDateBottom = [NSLayoutConstraint
constraintWithItem:_photoButton1
attribute:NSLayoutAttributeBottom
relatedBy:NSLayoutRelationEqual
toItem:self.contentView
attribute:NSLayoutAttributeBottom
multiplier:1.0
constant:-5];
[self.contentView addConstraint:overDateBottom];
}
return _photoButton1;
}
- (UIButton *)photoButton2
{
if (!_photoButton2) {
_photoButton2 = [[UIButton alloc] init];
[_photoButton2 setImage:[UIImage imageNamed:@"add-photos_btn"] forState:UIControlStateNormal];
_photoButton2.translatesAutoresizingMaskIntoConstraints = NO;
_photoButton2.backgroundColor = [UIColor whiteColor];
[self.contentView addSubview:_photoButton2];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint
constraintWithItem:_photoButton2
attribute:NSLayoutAttributeTop
relatedBy:NSLayoutRelationEqual
toItem:self.contentView
attribute:NSLayoutAttributeTop
multiplier:1.0
constant:5];
[self.contentView addConstraint:overDateTop];
NSLayoutConstraint *overDateLeft = [NSLayoutConstraint
constraintWithItem:_photoButton2
attribute:NSLayoutAttributeLeft
relatedBy:NSLayoutRelationEqual
toItem:self.contentView
attribute:NSLayoutAttributeLeft
multiplier:1.0
constant:kScreenWidth / 2 + 10];
[self.contentView addConstraint:overDateLeft];
NSLayoutConstraint *overDateRight = [NSLayoutConstraint
constraintWithItem:_photoButton2
attribute:NSLayoutAttributeRight
relatedBy:NSLayoutRelationEqual
toItem:self.contentView
attribute:NSLayoutAttributeRight
multiplier:1.0
constant:-20];
[self.contentView addConstraint:overDateRight];
NSLayoutConstraint *overDateHeight = [NSLayoutConstraint
constraintWithItem:_photoButton2
attribute:NSLayoutAttributeHeight
relatedBy:NSLayoutRelationEqual
toItem:nil
attribute:NSLayoutAttributeNotAnAttribute
multiplier:1.0
constant:90];
[self.contentView addConstraint:overDateHeight];
}
return _photoButton2;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
......@@ -8,35 +8,7 @@
#import "InspectDetailFooterView.h"
#define kPictureX 20
#define kPictureY 0
#define kPictureWidth (kScreenWidth - kPictureX * 2)
#define kPictureHeight 40
#define kTakePhotoX 0
#define kTakePhotoY kPictureY + kPictureHeight
#define kTakePhotoWidth (kScreenWidth - kTakePhotoX * 2)
#define kTakePhotoHeight 130 // 待处理
#define kIntroX kPictureX
#define kIntroY kTakePhotoY + kTakePhotoHeight
#define kIntroWidth kPictureWidth
#define kIntroHeight kPictureHeight
#define kBackImageX kPictureX
#define kBackImageY kIntroY + kIntroHeight
#define kBackImageWidth kIntroWidth
#define kBackImageHeight 75
#define kReportX kPictureX
#define kReportY kBackImageY + kBackImageHeight + 20
#define kReportWidth kBackImageWidth
#define kReportHeight 50
#define kFootViewHeight kReportY + kReportHeight + 20
@interface InspectDetailFooterView () <UITextViewDelegate>
@property (nonatomic, strong) UILabel *pictureLabel;
@property (nonatomic, strong) UILabel *introLabel;
@property (nonatomic, strong) UIImageView *backImageView2;
......@@ -66,8 +38,6 @@
- (void)setup {
self.pictureLabel.text = @"现场照片";
self.takePhotoView.backgroundColor = kSectionBackGroundColor;
self.introLabel.text = @"处理说明";
UIImage *image = [UIImage imageNamed:@"textbox"];
UIImage *resizingName = [image resizableImageWithCapInsets:UIEdgeInsetsMake(2, 2, 22, 22) resizingMode:UIImageResizingModeStretch];
......@@ -77,30 +47,7 @@
[self.reportBtn setTitle:@"上报结果" forState:UIControlStateNormal];
self.width = kScreenWidth;
self.height = kFootViewHeight;
}
- (UILabel *)pictureLabel
{
if (!_pictureLabel) {
_pictureLabel = [[UILabel alloc] initWithFrame:CGRectMake(kPictureX, kPictureY, kPictureWidth, kPictureHeight)];
_pictureLabel.font = [UIFont systemFontOfSize:15.0];
_pictureLabel.textColor = kLightBlack;
[self addSubview:_pictureLabel];
}
return _pictureLabel;
}
- (TakePhotoView *)takePhotoView
{
if (!_takePhotoView) {
_takePhotoView = [[TakePhotoView alloc] initWithFrame:CGRectMake(kTakePhotoX, kTakePhotoY, kTakePhotoWidth, kTakePhotoHeight)];
[self addSubview:_takePhotoView];
}
return _takePhotoView;
}
- (UILabel *)introLabel
......@@ -112,7 +59,7 @@
_introLabel.textColor = kLightBlack;
[self addSubview:_introLabel];
NSLayoutConstraint *someoneTop = [NSLayoutConstraint constraintWithItem:_introLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.takePhotoView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
NSLayoutConstraint *someoneTop = [NSLayoutConstraint constraintWithItem:_introLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
[self addConstraint:someoneTop];
NSLayoutConstraint *someoneLeft = [NSLayoutConstraint constraintWithItem:_introLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
......@@ -131,7 +78,7 @@
- (UIImageView *)backImageView2
{
if (!_backImageView2) {
_backImageView2 = [[UIImageView alloc] initWithFrame:CGRectMake(kBackImageX, kBackImageY, kBackImageWidth, kBackImageHeight)];
_backImageView2 = [[UIImageView alloc] init];
_backImageView2.userInteractionEnabled = YES;
_backImageView2.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_backImageView2];
......
......@@ -22,7 +22,6 @@
#import "InspectNotUploadViewController.h"
#import "InspectUploadedViewController.h"
#import "InspectNoUpLoadViewController.h"
#define kTaskSortCell @"InspectTaskSortCell"
......
//
// 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.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
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