Commit b6070a71 authored by admin's avatar admin

添加部分 待解决问题界面

parent 2bbcf793
This diff is collapsed.
......@@ -14,7 +14,7 @@
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = 'primary'
BlueprintIdentifier = '0C53F649F1A05FD9C8FB8D02'
BlueprintIdentifier = 'F0D6F5254AEB5A5F3FC87E82'
BlueprintName = 'AFNetworking'
ReferencedContainer = 'container:Pods.xcodeproj'
BuildableName = 'libAFNetworking.a'>
......
......@@ -14,7 +14,7 @@
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = 'primary'
BlueprintIdentifier = 'BD1CEEAD050E1221870570C6'
BlueprintIdentifier = 'C7097ABCC054B9A59BFFD0D6'
BlueprintName = 'Pods'
ReferencedContainer = 'container:Pods.xcodeproj'
BuildableName = 'libPods.a'>
......
......@@ -14,7 +14,7 @@
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = 'primary'
BlueprintIdentifier = '5725883F33B542DF61F62914'
BlueprintIdentifier = '1E0D2B730E9351B0483820F9'
BlueprintName = 'SDWebImage'
ReferencedContainer = 'container:Pods.xcodeproj'
BuildableName = 'libSDWebImage.a'>
......
......@@ -37,7 +37,7 @@
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>410B25DF16EA5C5B3E2698F74F9625FB</key>
<key>2602F3D0DAC534568B6AD7EEA0DD1959</key>
<dict>
<key>primary</key>
<true/>
......
This diff is collapsed.
......@@ -2,4 +2,16 @@
<Bucket
type = "0"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
scope = "0"
stopOnStyle = "0">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
......@@ -10,10 +10,10 @@
#define Url_h
// url 测试环境
// #define kRedStarURL @"http://218.244.151.129:7580/"
#define kRedStarURL @"http://218.244.151.129:7580/"
// 最新正式环境
#define kRedStarURL @"http://219.235.234.212:7580/"
// #define kRedStarURL @"http://219.235.234.212:7580/"
// 检查更新
#define kCheckUpdateURL @"redstar-server/rest/ipapk?type=ipa"
......@@ -120,4 +120,9 @@
// 口碑标注附件列表
#define kGetAttachmentsURL @"redstar-server/rest/standardpraise/get_attachments"
// 提交问题处理结果
// redstar-server/rest/question/resolve?time={time}&operId={operId}&operName={operName}
#define kSubmitQuestionResultURL @"redstar-server/rest/question/resolve?time="
#endif /* Url_h */
......@@ -35,4 +35,7 @@
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *uuid;
@property (nonatomic, copy) NSString *version;
@property (nonatomic, copy) NSArray *referAttachments;
@end
......@@ -104,10 +104,8 @@
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;
}
......
......@@ -366,8 +366,7 @@
if (range.location>=500) {
return NO;
}
else {
} else {
return YES;
}
......
......@@ -315,9 +315,7 @@
// 高度
NSLayoutConstraint *titleBootom = [NSLayoutConstraint constraintWithItem:_feedbackBackView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-15];
[self.contentView addConstraint:titleBootom];
}
return _feedbackBackView;
}
......
......@@ -179,12 +179,8 @@
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"您没有添加评论的权限!" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
[alert show];
}
}
// 提交评论
- (void)submitComment:(UIButton *)sender
{
......
......@@ -24,6 +24,8 @@
#import "UIImage+Fit.h"
#import <MJRefresh.h>
#import "QuestionUnsolvedViewController.h"
#define kQuestionListCell @"questionListTableViewCell"
#define kThumbTag 745645
......@@ -594,6 +596,7 @@
} else {
[parameters setObject:@"aborted" forKey:@"state"];
}
NSArray *array = @[@{@"field":@"state",
@"direction":@"asc"}];
[parameters setObject:array forKey:@"queryOrders"];
......@@ -643,10 +646,11 @@
@"direction":@"asc"}];
[parameters setObject:array forKey:@"queryOrders"];
}
NSLog(@"问题与知识parameters = %@", parameters);
// 请求问题列表
[httpClient getQuestionListWithParameters:parameters completion:^(id response, NSError *error) {
NSDictionary *dataDict = (NSDictionary *)response[@"data"];
NSLog(@"问题与知识 = %@", dataDict);
NSDictionary *recordsDict = (NSDictionary *)dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
for (NSDictionary *questionDict in recordsDict) {
......@@ -818,7 +822,13 @@
// cell点击事件
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
QuestionDetailViewController *questionDetailVC = [[QuestionDetailViewController alloc] init];
// QuestionDetailViewController *questionDetailVC = [[QuestionDetailViewController alloc] init];
// QuestionModel *question = (QuestionModel *)_allQuestionArray[indexPath.row];
// questionDetailVC.questionUuid = question.uuid;
// questionDetailVC.row = indexPath.row;
// [self.navigationController pushViewController:questionDetailVC animated:YES];
QuestionUnsolvedViewController *questionDetailVC = [[QuestionUnsolvedViewController alloc] init];
QuestionModel *question = (QuestionModel *)_allQuestionArray[indexPath.row];
questionDetailVC.questionUuid = question.uuid;
questionDetailVC.row = indexPath.row;
......
//
// FeedContentTableCell.h
// redstar
//
// Created by admin on 16/6/6.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface FeedContentTableCell : UITableViewCell
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UIImageView *backImageView1;
@property (nonatomic, strong) UITextView *titleTextView;
@property (nonatomic, strong) UILabel *placeholderLabel1;
@property (nonatomic, strong) UIButton *changeBtn; // 修改问题分类
@property (nonatomic, strong) UIButton *solveBtn; // 解决问题
@end
//
// FeedContentTableCell.m
// redstar
//
// Created by admin on 16/6/6.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import "FeedContentTableCell.h"
@implementation FeedContentTableCell
- (UILabel *)titleLabel {
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
}
_titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
_titleLabel.font = [UIFont systemFontOfSize:17.0];
_titleLabel.textColor = kdetailCellTitleColor;
[self.contentView addSubview:_titleLabel];
// 顶端
NSLayoutConstraint *titleTop = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1.0 constant:5];
[self.contentView addConstraint:titleTop];
// 左边
NSLayoutConstraint *titleLeft = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:17];
[self.contentView addConstraint:titleLeft];
// 右边
NSLayoutConstraint *titleWidth = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:80];
[self.contentView addConstraint:titleWidth];
// 高度
NSLayoutConstraint *titleHeight = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:40];
[self.contentView addConstraint:titleHeight];
return _titleLabel;
}
- (UIImageView *)backImageView1
{
if (!_backImageView1) {
_backImageView1 = [[UIImageView alloc] init];
_backImageView1.userInteractionEnabled = YES;
_backImageView1.translatesAutoresizingMaskIntoConstraints = NO;
[self.contentView addSubview:_backImageView1];
NSLayoutConstraint *contentTop = [NSLayoutConstraint constraintWithItem:_backImageView1 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1.0 constant:15];
[self.contentView addConstraint:contentTop];
NSLayoutConstraint *contentLeft = [NSLayoutConstraint constraintWithItem:_backImageView1 attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.titleLabel attribute:NSLayoutAttributeRight multiplier:1.0 constant:5];
[self.contentView addConstraint:contentLeft];
NSLayoutConstraint *contentRight = [NSLayoutConstraint constraintWithItem:_backImageView1 attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self.contentView addConstraint:contentRight];
NSLayoutConstraint *contentHeight = [NSLayoutConstraint constraintWithItem:_backImageView1 attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:120];
[self.contentView addConstraint:contentHeight];
}
return _backImageView1;
}
- (UITextView *)titleTextView
{
if (!_titleTextView) {
_titleTextView = [[UITextView alloc] init];
_titleTextView.tag = 1001;
_titleTextView.font = [UIFont systemFontOfSize:15.0];
_titleTextView.translatesAutoresizingMaskIntoConstraints = NO;
[self.backImageView1 addSubview:_titleTextView];
NSLayoutConstraint *contentTop = [NSLayoutConstraint constraintWithItem:_titleTextView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.backImageView1 attribute:NSLayoutAttributeTop multiplier:1.0 constant:1];
[self.backImageView1 addConstraint:contentTop];
NSLayoutConstraint *contentLeft = [NSLayoutConstraint constraintWithItem:_titleTextView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.backImageView1 attribute:NSLayoutAttributeLeft multiplier:1.0 constant:1];
[self.backImageView1 addConstraint:contentLeft];
NSLayoutConstraint *contentRight = [NSLayoutConstraint constraintWithItem:_titleTextView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.backImageView1 attribute:NSLayoutAttributeRight multiplier:1.0 constant:-1];
[self.backImageView1 addConstraint:contentRight];
NSLayoutConstraint *contentHeight = [NSLayoutConstraint constraintWithItem:_titleTextView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.backImageView1 attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-1];
[self.backImageView1 addConstraint:contentHeight];
}
return _titleTextView;
}
- (UILabel *)placeholderLabel1
{
if (!_placeholderLabel1) {
_placeholderLabel1 = [[UILabel alloc] init];
_placeholderLabel1.translatesAutoresizingMaskIntoConstraints = NO;
_placeholderLabel1.font = [UIFont systemFontOfSize:15.0];
_placeholderLabel1.textColor = kOnLineCellDetailColor;
[self.titleTextView addSubview:_placeholderLabel1];
NSLayoutConstraint *contentTop = [NSLayoutConstraint constraintWithItem:_placeholderLabel1 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.titleTextView attribute:NSLayoutAttributeTop multiplier:1.0 constant:2];
[self.titleTextView addConstraint:contentTop];
NSLayoutConstraint *contentLeft = [NSLayoutConstraint constraintWithItem:_placeholderLabel1 attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.titleTextView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:5];
[self.titleTextView addConstraint:contentLeft];
NSLayoutConstraint *contentRight = [NSLayoutConstraint constraintWithItem:_placeholderLabel1 attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.titleTextView attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
[self.titleTextView addConstraint:contentRight];
NSLayoutConstraint *contentHeight = [NSLayoutConstraint constraintWithItem:_placeholderLabel1 attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:30];
[self.titleTextView addConstraint:contentHeight];
}
return _placeholderLabel1;
}
- (UIButton *)changeBtn {
if (!_changeBtn) {
_changeBtn = [[UIButton alloc] init];
}
_changeBtn.translatesAutoresizingMaskIntoConstraints = NO;
_changeBtn.backgroundColor = kNavigationBarColor;
[_changeBtn setTitle:@"修改问题分类" forState:UIControlStateNormal];
_changeBtn.titleLabel.font = [UIFont systemFontOfSize:18.0];
_changeBtn.layer.cornerRadius = 3;
[self.contentView addSubview:_changeBtn];
// 顶端
NSLayoutConstraint *titleTop = [NSLayoutConstraint constraintWithItem:_changeBtn attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.backImageView1 attribute:NSLayoutAttributeBottom multiplier:1.0 constant:18];
[self.contentView addConstraint:titleTop];
// 左边
NSLayoutConstraint *titleLeft = [NSLayoutConstraint constraintWithItem:_changeBtn attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self.contentView addConstraint:titleLeft];
// 右边
NSLayoutConstraint *titleRight = [NSLayoutConstraint constraintWithItem:_changeBtn attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:-15];
[self.contentView addConstraint:titleRight];
// 高度
NSLayoutConstraint *titleHeight = [NSLayoutConstraint constraintWithItem:_changeBtn attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:45];
[self.contentView addConstraint:titleHeight];
return _changeBtn;
}
- (UIButton *)solveBtn {
if (!_solveBtn) {
_solveBtn = [[UIButton alloc] init];
}
_solveBtn.translatesAutoresizingMaskIntoConstraints = NO;
_solveBtn.backgroundColor = kNavigationBarColor;
_solveBtn.layer.cornerRadius = 3;
[_solveBtn setTitle:@"解决问题" forState:UIControlStateNormal];
_solveBtn.titleLabel.font = [UIFont systemFontOfSize:18.0];
[self.contentView addSubview:_solveBtn];
// 顶端
NSLayoutConstraint *titleTop = [NSLayoutConstraint constraintWithItem:_solveBtn attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.backImageView1 attribute:NSLayoutAttributeBottom multiplier:1.0 constant:18];
[self.contentView addConstraint:titleTop];
// 左边
NSLayoutConstraint *titleRight = [NSLayoutConstraint constraintWithItem:_solveBtn attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self.contentView addConstraint:titleRight];
// 右边
NSLayoutConstraint *titleLeft = [NSLayoutConstraint constraintWithItem:_solveBtn attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:15];
[self.contentView addConstraint:titleLeft];
// 高度
NSLayoutConstraint *titleHeight = [NSLayoutConstraint constraintWithItem:_solveBtn attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:45];
[self.contentView addConstraint:titleHeight];
return _solveBtn;
}
@end
//
// QuestionDealWithView.h
// redstar
//
// Created by admin on 16/6/5.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol QuestionDealWithDelegate <NSObject>
- (void)tableDidSelectAtIndexPath:(NSIndexPath *)indexPath;
@end
@interface QuestionDealWithView : UIView
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UIButton *quitBtn;
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, assign) id<QuestionDealWithDelegate> delegate;
@end
//
// QuestionUnsolveTableViewCell.h
// redstar
//
// Created by admin on 16/6/4.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "QuestionDetailModel.h"
@protocol QuestionUnsolveDelegate <NSObject>
- (void)showPicture:(UITapGestureRecognizer *)sender;
@end
@interface QuestionUnsolveTableViewCell : UITableViewCell
@property (nonatomic, strong) UILabel *titleLabel; // 标题
@property (nonatomic, strong) UILabel *describeLabel; // 描述
@property (nonatomic, strong) UILabel *pictureLabel; // 照片
@property (nonatomic, strong) UIView *pictureView; // 照片
@property (nonatomic, strong) QuestionDetailModel *questionDetail;
@property (nonatomic, assign) id <QuestionUnsolveDelegate> delegate;
@end
//
// QuestionUnsolvedViewController.h
// redstar
//
// Created by admin on 16/6/4.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface QuestionUnsolvedViewController : UIViewController
@property (nonatomic, assign) NSInteger row;
@property (nonatomic, copy) NSString *questionUuid;
@end
//
// SelectCategaryViewController.h
// redstar
//
// Created by admin on 16/6/6.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SelectCategaryViewController : UIViewController
@end
//
// SelectCategaryViewController.m
// redstar
//
// Created by admin on 16/6/6.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import "SelectCategaryViewController.h"
@interface SelectCategaryViewController ()
@property (nonatomic, strong) UITableView *tableView;
@end
@implementation SelectCategaryViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (UITableView *)tableView {
if (!_tableView) {
_tableView = [[UITableView alloc] init];
}
return _tableView;
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
//
// SolvedTypeTableViewCell.h
// redstar
//
// Created by admin on 16/6/6.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SolvedTypeTableViewCell : UITableViewCell
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UIButton *quesBtn;
@property (nonatomic, strong) UIButton *FAQBtn;
@property (nonatomic, strong) UIButton *SOPBtn;
@end
//
// SolvedTypeTableViewCell.m
// redstar
//
// Created by admin on 16/6/6.
// Copyright © 2016年 ZWF. All rights reserved.
//
#import "SolvedTypeTableViewCell.h"
@implementation SolvedTypeTableViewCell
- (UILabel *)titleLabel {
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
}
_titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
_titleLabel.font = [UIFont systemFontOfSize:17.0];
_titleLabel.textColor = kdetailCellTitleColor;
[self.contentView addSubview:_titleLabel];
// 顶端
NSLayoutConstraint *titleTop = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1.0 constant:5];
[self.contentView addConstraint:titleTop];
// 左边
NSLayoutConstraint *titleLeft = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:17];
[self.contentView addConstraint:titleLeft];
// 右边
NSLayoutConstraint *titleWidth = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:80];
[self.contentView addConstraint:titleWidth];
// 高度
NSLayoutConstraint *titleHeight = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:40];
[self.contentView addConstraint:titleHeight];
return _titleLabel;
}
- (UIButton *)quesBtn
{
if (!_quesBtn) {
_quesBtn = [[UIButton alloc] init];
_quesBtn.tag = 323118;
[_quesBtn setTitleColor:kOnLineCellTitleColor forState:UIControlStateNormal];
_quesBtn.translatesAutoresizingMaskIntoConstraints = NO;
[_quesBtn setTitle:@"纯问题" forState:UIControlStateNormal];
[_quesBtn setImage:[UIImage imageNamed:@"select_box"] forState:UIControlStateNormal];
[_quesBtn setImage:[UIImage imageNamed:@"no_select_box"] forState:UIControlStateSelected];
_quesBtn.titleLabel.font = [UIFont systemFontOfSize:17.0f];
_quesBtn.imageEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 20);
_quesBtn.titleEdgeInsets = UIEdgeInsetsMake(0, -8, 0, 0);
_quesBtn.imageView.contentMode = UIViewContentModeRight;
_quesBtn.titleLabel.contentMode = UIViewContentModeLeft;
[_quesBtn setTitleColor:[UIColor colorWithRed:151 / 255.0 green:151 / 255.0 blue:151 / 255.0 alpha:1.0f] forState:UIControlStateNormal];
[self.contentView addSubview:_quesBtn];
// 顶端
NSLayoutConstraint *selectTop = [NSLayoutConstraint constraintWithItem:_quesBtn attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1.0 constant:5];
[self.contentView addConstraint:selectTop];
// 左边
NSLayoutConstraint *selectLeft = [NSLayoutConstraint constraintWithItem:_quesBtn attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.titleLabel attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
[self.contentView addConstraint:selectLeft];
// 右边
NSLayoutConstraint *selectRight = [NSLayoutConstraint constraintWithItem:_quesBtn attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.FAQBtn attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
[self.contentView addConstraint:selectRight];
// 高度
NSLayoutConstraint *selectBottom = [NSLayoutConstraint constraintWithItem:_quesBtn attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:40];
[self.contentView addConstraint:selectBottom];
// 高度
NSLayoutConstraint *selectWidth = [NSLayoutConstraint constraintWithItem:_quesBtn attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:_FAQBtn attribute:NSLayoutAttributeWidth multiplier:1.0 constant:0];
[self.contentView addConstraint:selectWidth];
}
return _quesBtn;
}
- (UIButton *)FAQBtn
{
if (!_FAQBtn) {
_FAQBtn = [[UIButton alloc] init];
//_quesBtn.tag = 323228;
[_FAQBtn setTitleColor:kOnLineCellTitleColor forState:UIControlStateNormal];
_FAQBtn.translatesAutoresizingMaskIntoConstraints = NO;
[_FAQBtn setTitle:@"形成FAQ" forState:UIControlStateNormal];
[_FAQBtn setImage:[UIImage imageNamed:@"select_box"] forState:UIControlStateNormal];
[_FAQBtn setImage:[UIImage imageNamed:@"no_select_box"] forState:UIControlStateSelected];
_FAQBtn.titleLabel.font = [UIFont systemFontOfSize:17.0f];
_FAQBtn.imageEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 20);
_FAQBtn.titleEdgeInsets = UIEdgeInsetsMake(0, -8, 0, 0);
_FAQBtn.imageView.contentMode = UIViewContentModeRight;
_FAQBtn.titleLabel.contentMode = UIViewContentModeLeft;
[_FAQBtn setTitleColor:[UIColor colorWithRed:151 / 255.0 green:151 / 255.0 blue:151 / 255.0 alpha:1.0f] forState:UIControlStateNormal];
[self.contentView addSubview:_FAQBtn];
// 顶端
NSLayoutConstraint *selectTop = [NSLayoutConstraint constraintWithItem:_FAQBtn attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1.0 constant:5];
[self.contentView addConstraint:selectTop];
// 右边
NSLayoutConstraint *selectRight = [NSLayoutConstraint constraintWithItem:_FAQBtn attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self.contentView addConstraint:selectRight];
// 高度
NSLayoutConstraint *selectBottom = [NSLayoutConstraint constraintWithItem:_FAQBtn attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:40];
[self.contentView addConstraint:selectBottom];
}
return _FAQBtn;
}
- (UIButton *)SOPBtn
{
if (!_SOPBtn) {
_SOPBtn = [[UIButton alloc] init];
//_quesBtn.tag = 323228;
[_SOPBtn setTitleColor:kOnLineCellTitleColor forState:UIControlStateNormal];
_SOPBtn.translatesAutoresizingMaskIntoConstraints = NO;
[_SOPBtn setTitle:@"优化SOP" forState:UIControlStateNormal];
[_SOPBtn setImage:[UIImage imageNamed:@"select_box"] forState:UIControlStateNormal];
[_SOPBtn setImage:[UIImage imageNamed:@"no_select_box"] forState:UIControlStateSelected];
_SOPBtn.titleLabel.font = [UIFont systemFontOfSize:17.0f];
_SOPBtn.imageEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 20);
_SOPBtn.titleEdgeInsets = UIEdgeInsetsMake(0, -8, 0, 0);
_SOPBtn.imageView.contentMode = UIViewContentModeRight;
_SOPBtn.titleLabel.contentMode = UIViewContentModeLeft;
[_SOPBtn setTitleColor:[UIColor colorWithRed:151 / 255.0 green:151 / 255.0 blue:151 / 255.0 alpha:1.0f] forState:UIControlStateNormal];
[self.contentView addSubview:_SOPBtn];
// 顶端
NSLayoutConstraint *selectTop = [NSLayoutConstraint constraintWithItem:_SOPBtn attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.quesBtn attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-1];
[self.contentView addConstraint:selectTop];
// 右边
NSLayoutConstraint *selectLeft = [NSLayoutConstraint constraintWithItem:_SOPBtn attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.titleLabel attribute:NSLayoutAttributeRight multiplier:1.0 constant:8];
[self.contentView addConstraint:selectLeft];
// 高度
NSLayoutConstraint *selectBottom = [NSLayoutConstraint constraintWithItem:_SOPBtn attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:40];
[self.contentView addConstraint:selectBottom];
// 高度
NSLayoutConstraint *selectWidth = [NSLayoutConstraint constraintWithItem:_SOPBtn attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self.quesBtn attribute:NSLayoutAttributeWidth multiplier:1.0 constant:0];
[self.contentView addConstraint:selectWidth];
}
return _SOPBtn;
}
@end
......@@ -170,7 +170,6 @@
NSLog(@"paaaaa == %@", parameters);
[http getAttachmentsWithParameters:parameters completion:^(id response, NSError *error) {
NSArray *dataArray = response[@"data"];
NSLog(@"sssss === %@", response);
NSMutableArray *tempArray = [NSMutableArray array];
for (NSDictionary *attaDict in dataArray) {
AttachmentModel *atta = [[AttachmentModel alloc] init];
......@@ -317,7 +316,7 @@
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
//已完成下载
// 已完成下载
[operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
[self closeRedView];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"下载成功!" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", 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