Commit 7c37e110 authored by admin's avatar admin

排序 筛选接口完成

parent c0e7f861
{
"images" : [
{
"orientation" : "portrait",
"idiom" : "ipad",
"minimum-system-version" : "7.0",
"extent" : "full-screen",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"minimum-system-version" : "7.0",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"minimum-system-version" : "7.0",
"extent" : "full-screen",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"minimum-system-version" : "7.0",
"subtype" : "retina4",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"minimum-system-version" : "7.0",
"extent" : "full-screen",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "filter_after@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "filter_after@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "iconfont-duigou@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "iconfont-duigou@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "sort_icon_after@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "sort_icon_after@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "736h",
"filename" : "launch_bg_6plus-2.png",
"minimum-system-version" : "8.0",
"orientation" : "portrait",
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "736h",
"filename" : "launch_bg_6plus-3.png",
"minimum-system-version" : "8.0",
"orientation" : "landscape",
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "667h",
"filename" : "launch_bg_6-1.png",
"minimum-system-version" : "8.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "launch_bg_4.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "retina4",
"filename" : "launch_bg_6plus-1.png",
"minimum-system-version" : "7.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "launch_bg_6.png",
"extent" : "full-screen",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "launch_bg_6plus.png",
"extent" : "full-screen",
"subtype" : "retina4",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
...@@ -31,4 +31,7 @@ ...@@ -31,4 +31,7 @@
// http://.../redstar-server/rest/question/submit?time={time}&operId={operId}&operName={operName} // http://.../redstar-server/rest/question/submit?time={time}&operId={operId}&operName={operName}
#define kAddQuestionURL @"" #define kAddQuestionURL @""
// 提交评论
#define kAddCommentURL @"redstar-server/rest/comment"
#endif /* Url_h */ #endif /* Url_h */
...@@ -20,5 +20,6 @@ ...@@ -20,5 +20,6 @@
@property (nonatomic, strong) UIButton *sureBtn; @property (nonatomic, strong) UIButton *sureBtn;
@property (nonatomic, strong) StarBar *starBar; @property (nonatomic, strong) StarBar *starBar;
@property (nonatomic, strong) UITextView *contentTextView;
@end @end
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
@interface CommentView () @interface CommentView ()
@property (nonatomic, strong) UILabel *placeholderLabel2; @property (nonatomic, strong) UILabel *placeholderLabel2;
@property (nonatomic, strong) UIImageView *backImageView2; @property (nonatomic, strong) UIImageView *backImageView2;
@property (nonatomic, strong) UITextView *contentTextView;
@end @end
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#import "QuestionDetailFooterView.h" #import "QuestionDetailFooterView.h"
#import "CommentView.h" #import "CommentView.h"
#import "HttpClient.h"
#define kQuestionDetailCell @"QuestionDetailCell" // 问题详情 #define kQuestionDetailCell @"QuestionDetailCell" // 问题详情
#define kQuestionCommentCell @"QuestionCommentCell" // 评论 #define kQuestionCommentCell @"QuestionCommentCell" // 评论
...@@ -95,6 +96,8 @@ ...@@ -95,6 +96,8 @@
_commentView = [[CommentView alloc] init]; _commentView = [[CommentView alloc] init];
_commentView.backgroundColor = [UIColor whiteColor]; _commentView.backgroundColor = [UIColor whiteColor];
} }
_commentView.starBar.starNumber = 0;
_commentView.contentTextView.text = @"";
[_commentView.quitBtn addTarget:self action:@selector(closeBackGroundView) forControlEvents:UIControlEventTouchUpInside]; [_commentView.quitBtn addTarget:self action:@selector(closeBackGroundView) forControlEvents:UIControlEventTouchUpInside];
[_commentView.sureBtn addTarget:self action:@selector(submitComment:) forControlEvents:UIControlEventTouchUpInside]; [_commentView.sureBtn addTarget:self action:@selector(submitComment:) forControlEvents:UIControlEventTouchUpInside];
[self.view insertSubview:_backGroundView aboveSubview:_tableView]; [self.view insertSubview:_backGroundView aboveSubview:_tableView];
...@@ -116,6 +119,20 @@ ...@@ -116,6 +119,20 @@
- (void)submitComment:(UIButton *)sender - (void)submitComment:(UIButton *)sender
{ {
NSNumber *count = [NSNumber numberWithInteger:_commentView.starBar.starNumber];
NSString *url = [NSString stringWithFormat:@"%@%@", kRedStarURL, kAddCommentURL];
NSLog(@"url = %@", url);
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url];
NSDictionary *parameters = @{@"entityType":@"question",
@"entityUuid":_question.uuid,
@"star":count,
@"comment":_commentView.contentTextView.text};
NSLog(@"parameters = %@", parameters);
[httpClient submitCommentWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"respo = %@, error = %@", response , error);
}];
[self closeBackGroundView]; [self closeBackGroundView];
} }
......
...@@ -48,8 +48,16 @@ ...@@ -48,8 +48,16 @@
self.alreadyLabel.text = [NSString stringWithFormat:@"%d", taskList.reportCount]; self.alreadyLabel.text = [NSString stringWithFormat:@"%d", taskList.reportCount];
self.allLabel.text = [NSString stringWithFormat:@"/%d", taskList.questionCount]; self.allLabel.text = [NSString stringWithFormat:@"/%d", taskList.questionCount];
self.multiplier = (CGFloat)taskList.reportCount / taskList.questionCount;
self.allView.backgroundColor = kProgressViewAllBackColor; self.allView.backgroundColor = kProgressViewAllBackColor;
if (taskList.reportCount == 0) {
self.multiplier = 0;
} else {
self.multiplier = (CGFloat)taskList.reportCount / taskList.questionCount;
}
UIImage *image = [UIImage imageNamed:@"progress-bar"]; UIImage *image = [UIImage imageNamed:@"progress-bar"];
image = [image resizableImageWithCapInsets:UIEdgeInsetsZero resizingMode:UIImageResizingModeTile]; image = [image resizableImageWithCapInsets:UIEdgeInsetsZero resizingMode:UIImageResizingModeTile];
self.alreadyView.image = image; self.alreadyView.image = image;
...@@ -280,6 +288,7 @@ ...@@ -280,6 +288,7 @@
_alreadyView.layer.cornerRadius = 3; _alreadyView.layer.cornerRadius = 3;
_alreadyView.layer.masksToBounds = YES; _alreadyView.layer.masksToBounds = YES;
_alreadyView.translatesAutoresizingMaskIntoConstraints = NO; _alreadyView.translatesAutoresizingMaskIntoConstraints = NO;
_alreadyView.tag = 9760001;
[self.allView addSubview:_alreadyView]; [self.allView addSubview:_alreadyView];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint constraintWithItem:_alreadyView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.allView attribute:NSLayoutAttributeTop multiplier:1.0 constant:1]; NSLayoutConstraint *overDateTop = [NSLayoutConstraint constraintWithItem:_alreadyView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.allView attribute:NSLayoutAttributeTop multiplier:1.0 constant:1];
......
...@@ -34,5 +34,7 @@ typedef void (^completionBlock) (id response, NSError *error); ...@@ -34,5 +34,7 @@ typedef void (^completionBlock) (id response, NSError *error);
// 获取口碑巡检明细 // 获取口碑巡检明细
- (void)getPraiseDetailWithParameters:(id)parameters completion:(completionBlock)completion; - (void)getPraiseDetailWithParameters:(id)parameters completion:(completionBlock)completion;
// 提交评论
- (void)submitCommentWithParameters:(id)parameters completion:(completionBlock)completion;
@end @end
...@@ -90,9 +90,6 @@ ...@@ -90,9 +90,6 @@
// password // password
NSString *passwordMD5 = [CommonFunc md5:password]; NSString *passwordMD5 = [CommonFunc md5:password];
// 参数 // 参数
// NSDictionary *dataDict = [[NSUserDefaults standardUserDefaults] objectForKey:@"loginData"];
// NSString *authenticode = dataDict[@"authenticode"];
NSDictionary *parameters = @{@"authenticode":@"211534962", NSDictionary *parameters = @{@"authenticode":@"211534962",
@"password":passwordMD5 @"password":passwordMD5
}; };
...@@ -148,4 +145,13 @@ ...@@ -148,4 +145,13 @@
}]; }];
} }
- (void)submitCommentWithParameters:(id)parameters completion:(completionBlock)completion
{
[self getParameters:parameters completion:^(id response, NSError *error) {
if (completion) {
completion (response, error);
}
}];
}
@end @end
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
- (void)showIndex:(NSInteger) index - (void)showIndex:(NSInteger) index
{ {
NSLog(@"self.buttons = %@", self.buttons);
[self touchDownForButton:[self.buttons objectAtIndex:index]]; [self touchDownForButton:[self.buttons objectAtIndex:index]];
[self touchUpForButton:[self.buttons objectAtIndex:index]]; [self touchUpForButton:[self.buttons objectAtIndex:index]];
} }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
@protocol ScreenTableDelegate <NSObject> @protocol ScreenTableDelegate <NSObject>
- (void)click; - (void)tableViewDidSelectRow:(NSInteger)row;
@end @end
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
- (void)setup - (void)setup
{ {
self.testArray = [NSArray arrayWithObjects:@"全部",@"未提交",@"已提交",@"调研中",@"已过期", @"未完成", nil]; self.testArray = [NSArray arrayWithObjects:@"全部", @"未处理",@"进行中",@"已上报",@"已评分", @"已发布", @"已过期",nil];
self.groupTabBar = [[GroupTabBar alloc] initWithFrame:CGRectMake(0, 0, 100, 180)]; self.groupTabBar = [[GroupTabBar alloc] initWithFrame:CGRectMake(0, 0, 100, 180)];
_groupTabBar.delegate = self; _groupTabBar.delegate = self;
[self addSubview:_groupTabBar]; [self addSubview:_groupTabBar];
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{ {
if (_delegate) { if (_delegate) {
[_delegate click]; [_delegate tableViewDidSelectRow:indexPath.row];
} }
} }
...@@ -166,15 +166,16 @@ ...@@ -166,15 +166,16 @@
_resetBtn = [[UIButton alloc] init]; _resetBtn = [[UIButton alloc] init];
_resetBtn.backgroundColor = [UIColor grayColor]; _resetBtn.backgroundColor = [UIColor grayColor];
_resetBtn.translatesAutoresizingMaskIntoConstraints = NO; _resetBtn.translatesAutoresizingMaskIntoConstraints = NO;
_resetBtn.layer.cornerRadius = 4.0;
[self.backView addSubview:_resetBtn]; [self.backView addSubview:_resetBtn];
NSLayoutConstraint *lineViewTop = [NSLayoutConstraint constraintWithItem:_resetBtn attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeTop multiplier:1.0 constant:5]; NSLayoutConstraint *lineViewTop = [NSLayoutConstraint constraintWithItem:_resetBtn attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeTop multiplier:1.0 constant:7.5];
[self.backView addConstraint:lineViewTop]; [self.backView addConstraint:lineViewTop];
NSLayoutConstraint *lineViewRight = [NSLayoutConstraint constraintWithItem:_resetBtn attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:-20]; NSLayoutConstraint *lineViewRight = [NSLayoutConstraint constraintWithItem:_resetBtn attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:-20];
[self.backView addConstraint:lineViewRight]; [self.backView addConstraint:lineViewRight];
NSLayoutConstraint *lineViewBottom = [NSLayoutConstraint constraintWithItem:_resetBtn attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-5]; NSLayoutConstraint *lineViewBottom = [NSLayoutConstraint constraintWithItem:_resetBtn attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-7.5];
[self.backView addConstraint:lineViewBottom]; [self.backView addConstraint:lineViewBottom];
NSLayoutConstraint *lineViewLeft = [NSLayoutConstraint constraintWithItem:_resetBtn attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20]; NSLayoutConstraint *lineViewLeft = [NSLayoutConstraint constraintWithItem:_resetBtn attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
...@@ -189,15 +190,16 @@ ...@@ -189,15 +190,16 @@
_submitBtn = [[UIButton alloc] init]; _submitBtn = [[UIButton alloc] init];
_submitBtn.backgroundColor = kNavigationBarColor; _submitBtn.backgroundColor = kNavigationBarColor;
_submitBtn.translatesAutoresizingMaskIntoConstraints = NO; _submitBtn.translatesAutoresizingMaskIntoConstraints = NO;
_submitBtn.layer.cornerRadius = 4.0;
[self.backView addSubview:_submitBtn]; [self.backView addSubview:_submitBtn];
NSLayoutConstraint *lineViewTop = [NSLayoutConstraint constraintWithItem:_submitBtn attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeTop multiplier:1.0 constant:5]; NSLayoutConstraint *lineViewTop = [NSLayoutConstraint constraintWithItem:_submitBtn attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeTop multiplier:1.0 constant:7.5];
[self.backView addConstraint:lineViewTop]; [self.backView addConstraint:lineViewTop];
NSLayoutConstraint *lineViewRight = [NSLayoutConstraint constraintWithItem:_submitBtn attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20]; NSLayoutConstraint *lineViewRight = [NSLayoutConstraint constraintWithItem:_submitBtn attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self.backView addConstraint:lineViewRight]; [self.backView addConstraint:lineViewRight];
NSLayoutConstraint *lineViewBottom = [NSLayoutConstraint constraintWithItem:_submitBtn attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-5]; NSLayoutConstraint *lineViewBottom = [NSLayoutConstraint constraintWithItem:_submitBtn attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-7.5];
[self.backView addConstraint:lineViewBottom]; [self.backView addConstraint:lineViewBottom];
NSLayoutConstraint *lineViewLeft = [NSLayoutConstraint constraintWithItem:_submitBtn attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:20]; NSLayoutConstraint *lineViewLeft = [NSLayoutConstraint constraintWithItem:_submitBtn attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:20];
......
...@@ -7,6 +7,14 @@ ...@@ -7,6 +7,14 @@
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#define kTAxisBtnTag 500232
@protocol TaxisViewDelegate <NSObject>
- (void)timeChange:(UIButton *)sender;
@end
@interface TaxisView : UIView @interface TaxisView : UIView
...@@ -14,4 +22,6 @@ ...@@ -14,4 +22,6 @@
@property (nonatomic, strong) UIButton *sequenceBtn; // 顺序 @property (nonatomic, strong) UIButton *sequenceBtn; // 顺序
@property (nonatomic, strong) UIButton *changeoverBtn; // 逆序 @property (nonatomic, strong) UIButton *changeoverBtn; // 逆序
@property (nonatomic, strong) id <TaxisViewDelegate> delegate;
@end @end
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
{ {
[self.defaultBtn setTitle:@"默认排序" forState:UIControlStateNormal]; [self.defaultBtn setTitle:@"默认排序" forState:UIControlStateNormal];
[self.sequenceBtn setTitle:@"时间顺序排序" forState:UIControlStateNormal]; [self.sequenceBtn setTitle:@"时间顺序排序" forState:UIControlStateNormal];
[self.changeoverBtn setTitle:@"时间逆序排序" forState:UIControlStateNormal]; [self.changeoverBtn setTitle:@"时间逆序排序" forState:UIControlStateNormal];
} }
...@@ -49,6 +48,9 @@ ...@@ -49,6 +48,9 @@
[_defaultBtn setTitleColor:kInspectSectionButtonTextColor forState:UIControlStateNormal]; [_defaultBtn setTitleColor:kInspectSectionButtonTextColor forState:UIControlStateNormal];
_defaultBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft ; _defaultBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft ;
_defaultBtn.titleLabel.font = [UIFont systemFontOfSize:14.0]; _defaultBtn.titleLabel.font = [UIFont systemFontOfSize:14.0];
[_defaultBtn addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
_defaultBtn.tag = kTAxisBtnTag + 1;
[self addSubview:_defaultBtn]; [self addSubview:_defaultBtn];
// 顶端 // 顶端
...@@ -81,6 +83,13 @@ ...@@ -81,6 +83,13 @@
[_sequenceBtn setTitleColor:kInspectSectionButtonTextColor forState:UIControlStateNormal]; [_sequenceBtn setTitleColor:kInspectSectionButtonTextColor forState:UIControlStateNormal];
_sequenceBtn.titleLabel.font = [UIFont systemFontOfSize:14.0]; _sequenceBtn.titleLabel.font = [UIFont systemFontOfSize:14.0];
_sequenceBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft ; _sequenceBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft ;
_sequenceBtn.imageEdgeInsets = UIEdgeInsetsMake(0, kScreenWidth - 30, 0, 0);
_sequenceBtn.titleEdgeInsets = UIEdgeInsetsMake(0, 20, 0, 0);
_sequenceBtn.imageView.contentMode = UIViewContentModeRight;
_sequenceBtn.titleLabel.contentMode = UIViewContentModeLeft;
[_sequenceBtn addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
_sequenceBtn.tag = kTAxisBtnTag + 2;
[self addSubview:_sequenceBtn]; [self addSubview:_sequenceBtn];
...@@ -114,6 +123,12 @@ ...@@ -114,6 +123,12 @@
_changeoverBtn.translatesAutoresizingMaskIntoConstraints = NO; _changeoverBtn.translatesAutoresizingMaskIntoConstraints = NO;
[_changeoverBtn setTitleColor:kInspectSectionButtonTextColor forState:UIControlStateNormal]; [_changeoverBtn setTitleColor:kInspectSectionButtonTextColor forState:UIControlStateNormal];
_changeoverBtn.titleLabel.font = [UIFont systemFontOfSize:14.0]; _changeoverBtn.titleLabel.font = [UIFont systemFontOfSize:14.0];
_changeoverBtn.imageEdgeInsets = UIEdgeInsetsMake(0, kScreenWidth - 30, 0, 0);
_changeoverBtn.titleEdgeInsets = UIEdgeInsetsMake(0, 20, 0, 0);
[_changeoverBtn addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
_changeoverBtn.tag = kTAxisBtnTag + 3;
[self addSubview:_changeoverBtn]; [self addSubview:_changeoverBtn];
// 顶端 // 顶端
...@@ -135,4 +150,11 @@ ...@@ -135,4 +150,11 @@
return _changeoverBtn; return _changeoverBtn;
} }
- (void)click:(UIButton *)sender
{
if (_delegate) {
[_delegate timeChange:sender];
}
}
@end @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