Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
红
红星美凯龙管理在线APP IOS
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
红星美凯龙管理在线APP IOS
Commits
c285d9ac
Commit
c285d9ac
authored
9 years ago
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成排序 筛选下拉菜单
parent
4776d0ee
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
599 additions
and
90 deletions
+599
-90
project.pbxproj
redstar.xcodeproj/project.pbxproj
+18
-6
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Constant.h
redstar/Classes/Macro/Constant.h
+3
-0
QuestionViewController.m
...tion/QuestionList/ViewController/QuestionViewController.m
+125
-67
InspectSettleViewController.m
...nspectDetail/ViewController/InspectSettleViewController.m
+1
-1
InspectListViewController.m
...ct/InspectList/ViewController/InspectListViewController.m
+1
-1
RankDetailTableCell.h
...WordOfMouth/Ranking/RankDetail/Cell/RankDetailTableCell.h
+5
-0
RankDetailViewController.m
...king/RankDetail/ViewController/RankDetailViewController.m
+72
-8
RankingListViewController.m
...ng/RankingList/ViewController/RankingListViewController.m
+1
-1
LoginViewController.m
...Classes/Module/Login/ViewController/LoginViewController.m
+1
-0
MenuButton.h
redstar/Classes/Tools/Menu/MenuButton.h
+2
-0
MenuButton.m
redstar/Classes/Tools/Menu/MenuButton.m
+0
-0
MenuView.m
redstar/Classes/Tools/Menu/MenuView.m
+0
-2
GroupItems.h
redstar/Classes/Tools/Menu/Screen/View/GroupItems.h
+17
-0
GroupItems.m
redstar/Classes/Tools/Menu/Screen/View/GroupItems.m
+23
-0
GroupTabBar.h
redstar/Classes/Tools/Menu/Screen/View/GroupTabBar.h
+32
-0
GroupTabBar.m
redstar/Classes/Tools/Menu/Screen/View/GroupTabBar.m
+86
-0
ScreenView.h
redstar/Classes/Tools/Menu/Screen/View/ScreenView.h
+19
-0
ScreenView.m
redstar/Classes/Tools/Menu/Screen/View/ScreenView.m
+174
-1
TaxisView.m
redstar/Classes/Tools/Menu/Taxis/View/TaxisView.m
+19
-3
No files found.
redstar.xcodeproj/project.pbxproj
View file @
c285d9ac
This diff is collapsed.
Click to expand it.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
c285d9ac
No preview for this file type
This diff is collapsed.
Click to expand it.
redstar/Classes/Macro/Constant.h
View file @
c285d9ac
...
...
@@ -31,6 +31,7 @@
#define kLoginButtonBackGroundColor [UIColor colorWithRed:0 / 255.0 green:111 / 255.0 blue:188 / 255.0 alpha:1.0]
// #dddddd
#define kSeparateLineColor [UIColor colorWithRed:221 / 255.0 green:221 / 255.0 blue:221 / 255.0 alpha:1.0]
#define kSeparateLineCGColor [[UIColor colorWithRed:221 / 255.0 green:221 / 255.0 blue:221 / 255.0 alpha:1.0] CGColor]
// ----- Home -----
// #bbbbbb
...
...
@@ -126,6 +127,8 @@
#define kCommentViewHeight 335
#define kTaxisViewHeight 150
#define kScreenViewHeight 240
#import "UIView+Extension.h"
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/Question/QuestionList/ViewController/QuestionViewController.m
View file @
c285d9ac
...
...
@@ -21,7 +21,7 @@
#define kQuestionListCell @"questionListTableViewCell"
@interface
QuestionViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@interface
QuestionViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
ScreenTableDelegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allQuestionArray
;
...
...
@@ -29,11 +29,11 @@
@property
(
nonatomic
,
strong
)
MenuView
*
menuView
;
@property
(
nonatomic
,
strong
)
TaxisView
*
taxisView
;
@property
(
nonatomic
,
strong
)
UIView
*
taxisBackGround
View
;
@property
(
nonatomic
,
strong
)
ScreenView
*
screen
View
;
@property
(
nonatomic
,
strong
)
UIView
*
bgView
;
@property
(
nonatomic
,
strong
)
MenuButton
*
selctedButton
;
@property
(
nonatomic
,
strong
)
ScreenView
*
screenView
;
@property
(
nonatomic
,
strong
)
UIView
*
screenBackGroundView
;
@end
@implementation
QuestionViewController
...
...
@@ -106,7 +106,7 @@
[
httpClient
getQuestionListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSDictionary
*
dataDict
=
(
NSDictionary
*
)
response
[
@"data"
];
NSDictionary
*
recordsDict
=
(
NSDictionary
*
)
dataDict
[
@"records"
];
NSLog
(
@"recods = %@"
,
recordsDict
);
NSLog
(
@"
问题与知识列表
recods = %@"
,
recordsDict
);
for
(
NSDictionary
*
questionDict
in
recordsDict
)
{
QuestionModel
*
question
=
[[
QuestionModel
alloc
]
init
];
[
question
setValuesForKeysWithDictionary
:
questionDict
];
...
...
@@ -146,118 +146,176 @@
[
self
.
navigationController
pushViewController
:
addQuestionVC
animated
:
YES
];
}
-
(
void
)
dropCilck
:
(
UI
Button
*
)
sender
-
(
void
)
dropCilck
:
(
Menu
Button
*
)
sender
{
sender
.
selected
=
!
sender
.
selected
;
[
self
closeScreenBackGroundView
];
[
self
closeTaxisBackGroundView
];
sender
.
isDrop
=
!
sender
.
isDrop
;
if
(
_selctedButton
.
tag
==
sender
.
tag
)
{
if
(
sender
.
isDrop
)
{
if
(
sender
.
tag
==
4001
)
{
if
(
sender
.
selected
)
{
[
self
showTaxisBackGroundView
];
[
self
showRedView
];
}
else
{
[
self
closeTaxisBackGround
View
];
[
self
showGreen
View
];
}
[
sender
setTitleColor
:[
UIColor
orangeColor
]
forState
:
UIControlStateNormal
];
}
else
{
if
(
sender
.
tag
==
4001
)
{
[
self
closeRedView
];
}
else
{
if
(
sender
.
selected
)
{
[
self
showScreenBackGroundView
];
[
self
closeGreenView
];
}
[
sender
setTitleColor
:
kInspectSectionButtonTextColor
forState
:
UIControlStateNormal
];
}
}
else
{
[
self
closeScreenBackGroundView
];
// 前一次选中的按钮 选中状态置为NO
_selctedButton
.
selected
=
NO
;
_selctedButton
.
isDrop
=
NO
;
// 进行选中状态为NO 的操作
// 1.将发生“选中”->“未选中”状态变化的按钮文字由Orange->White
[
_selctedButton
setTitleColor
:
kInspectSectionButtonTextColor
forState
:
UIControlStateNormal
];
// 2.判断当前是否有bgView 有->移除, 没有->跳过
if
(
_bgView
)
{
// _bgView存在
[
_bgView
removeFromSuperview
];
_bgView
=
nil
;
}
if
(
_taxisView
)
{
[
_taxisView
removeFromSuperview
];
_taxisView
=
nil
;
}
if
(
_screenView
)
{
[
_screenView
removeFromSuperview
];
_screenView
=
nil
;
}
// 将当前选中的按钮设置 选中状态为YES;
sender
.
selected
=
YES
;
// 对选中按钮 进行相关操作
// 1.将选中按钮的文字设置为Orange
[
sender
setTitleColor
:[
UIColor
orangeColor
]
forState
:
UIControlStateNormal
];
_selctedButton
=
(
MenuButton
*
)
sender
;
if
(
sender
.
tag
==
4001
)
{
[
self
showRedView
];
}
else
{
[
self
showGreenView
];
}
}
}
-
(
void
)
showTaxisBackGroundView
-
(
void
)
showRedView
{
if
(
!
_
taxisBackGround
View
)
{
_
taxisBackGround
View
=
[[
UIView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
UITapGestureRecognizer
*
tapGR
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
close
TaxisBackGroun
dView
)];
[
_
taxisBackGround
View
addGestureRecognizer
:
tapGR
];
if
(
!
_
bg
View
)
{
_
bg
View
=
[[
UIView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
UITapGestureRecognizer
*
tapGR
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
close
Re
dView
)];
[
_
bg
View
addGestureRecognizer
:
tapGR
];
}
if
(
!
_taxisView
)
{
_taxisView
=
[[
TaxisView
alloc
]
init
];
_taxisView
.
backgroundColor
=
[
UIColor
whiteColor
];
}
[
self
.
view
insertSubview
:
_taxisBackGroundView
atIndex
:
555
];
[
self
.
view
insertSubview
:
_taxisView
aboveSubview
:
_taxisBackGroundView
];
_taxisBackGroundView
.
alpha
=
0
;
_taxisBackGroundView
.
backgroundColor
=
[
UIColor
blackColor
];
[
self
.
view
addSubview
:
_bgView
];
[
self
.
view
insertSubview
:
_taxisView
aboveSubview
:
_bgView
];
_bgView
.
alpha
=
0
;
_bgView
.
backgroundColor
=
[
UIColor
blackColor
];
CGRect
toFrame
=
CGRectMake
(
0
,
45
,
kScreenWidth
,
kTaxisViewHeight
);
CGRect
fromFrame
=
CGRectMake
(
0
,
-
kTaxisViewHeight
,
kScreenWidth
,
kTaxisViewHeight
);
_taxisView
.
frame
=
fromFrame
;
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_
taxisBackGround
View
.
alpha
=
0
.
6
;
_
bg
View
.
alpha
=
0
.
6
;
_taxisView
.
frame
=
toFrame
;
}];
}
-
(
void
)
showScreenBackGroun
dView
-
(
void
)
closeRe
dView
{
if
(
!
_screenBackGroundView
)
{
_screenBackGroundView
=
[[
UIView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
UITapGestureRecognizer
*
tapGR
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
closeScreenBackGroundView
)];
[
_screenBackGroundView
addGestureRecognizer
:
tapGR
];
_selctedButton
.
isDrop
=
NO
;
[
_selctedButton
setTitleColor
:
kInspectSectionButtonTextColor
forState
:
UIControlStateNormal
];
CGRect
fromFrame
=
CGRectMake
(
0
,
-
kTaxisViewHeight
,
kScreenWidth
,
kTaxisViewHeight
);
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_bgView
.
alpha
=
.
0
f
;
_taxisView
.
frame
=
fromFrame
;
}
completion
:^
(
BOOL
finished
)
{
[
_bgView
removeFromSuperview
];
[
_taxisView
removeFromSuperview
];
}];
}
-
(
void
)
showGreenView
{
if
(
!
_bgView
)
{
_bgView
=
[[
UIView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
UITapGestureRecognizer
*
tapGR
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
closeGreenView
)];
[
_bgView
addGestureRecognizer
:
tapGR
];
}
if
(
!
_screenView
)
{
_screenView
=
[[
ScreenView
alloc
]
init
];
_screenView
.
delegate
=
self
;
_screenView
.
backgroundColor
=
[
UIColor
whiteColor
];
}
[
self
.
view
insertSubview
:
_screenBackGroundView
atIndex
:
555
];
[
self
.
view
insertSubview
:
_screenView
aboveSubview
:
_screenBackGroundView
];
_screenBackGroundView
.
alpha
=
0
;
_screenBackGroundView
.
backgroundColor
=
[
UIColor
blackColor
];
[
self
.
view
addSubview
:
_bgView
]
;
[
self
.
view
insertSubview
:
_screenView
aboveSubview
:
_bgView
];
CGRect
toFrame
=
CGRectMake
(
0
,
45
,
kScreenWidth
,
kTaxisViewHeight
);
CGRect
fromFrame
=
CGRectMake
(
0
,
-
kTaxisViewHeight
,
kScreenWidth
,
kTaxisViewHeight
);
_bgView
.
alpha
=
0
;
_bgView
.
backgroundColor
=
[
UIColor
blackColor
];
CGRect
toFrame
=
CGRectMake
(
0
,
45
,
kScreenWidth
,
kScreenViewHeight
);
CGRect
fromFrame
=
CGRectMake
(
0
,
-
kScreenViewHeight
,
kScreenWidth
,
kScreenViewHeight
);
_screenView
.
frame
=
fromFrame
;
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_
screenBackGround
View
.
alpha
=
0
.
6
;
_
bg
View
.
alpha
=
0
.
6
;
_screenView
.
frame
=
toFrame
;
}];
}
-
(
void
)
closeTaxisBackGroundView
{
if
(
_taxisBackGroundView
)
{
CGRect
fromFrame
=
CGRectMake
(
0
,
-
kTaxisViewHeight
,
kScreenWidth
,
kTaxisViewHeight
);
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_taxisBackGroundView
.
alpha
=
.
0
f
;
_taxisView
.
frame
=
fromFrame
;
}
completion
:^
(
BOOL
finished
)
{
[
_taxisBackGroundView
removeFromSuperview
];
[
_taxisView
removeFromSuperview
];
}];
}
}
-
(
void
)
close
ScreenBackGround
View
-
(
void
)
close
Green
View
{
if
(
_screenBackGroundView
)
{
CGRect
fromFrame
=
CGRectMake
(
0
,
-
kTaxisViewHeight
,
kScreenWidth
,
kTaxisViewHeight
);
_selctedButton
.
isDrop
=
NO
;
[
_selctedButton
setTitleColor
:
kInspectSectionButtonTextColor
forState
:
UIControlStateNormal
];
CGRect
fromFrame
=
CGRectMake
(
0
,
-
kScreenViewHeight
,
kScreenWidth
,
kScreenViewHeight
);
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_screenBackGround
View
.
alpha
=
.
0
f
;
_bg
View
.
alpha
=
.
0
f
;
_screenView
.
frame
=
fromFrame
;
}
completion
:^
(
BOOL
finished
)
{
[
_screenBackGround
View
removeFromSuperview
];
[
_bg
View
removeFromSuperview
];
[
_screenView
removeFromSuperview
];
}];
}
}
-
(
void
)
searchBarClick
:
(
UIButton
*
)
sender
{
NSLog
(
@"%@"
,
self
.
searchBar
.
searchTextFiled
.
text
);
}
#pragma mark - ScreenTableDelegate
-
(
void
)
click
{
NSLog
(
@"点一下"
);
[
self
closeGreenView
];
}
#pragma mark - UItableView Delegate/DataSource
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/ViewController/InspectSettleViewController.m
View file @
c285d9ac
...
...
@@ -55,7 +55,7 @@
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
httpClient
getPraiseDetailWithParameters
:
nil
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"PraiseDetail = %@"
,
response
);
NSLog
(
@"
口碑巡检明细
PraiseDetail = %@"
,
response
);
}];
// NSDictionary *paramr = @{@"uuid":@"5a74170150dba4ed0150dbad2e4d0001",
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectList/ViewController/InspectListViewController.m
View file @
c285d9ac
...
...
@@ -85,7 +85,7 @@
@"pageSize"
:
@
(
10
)
};
[
httpCilent
getInspectListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"respone = %@"
,
response
);
NSLog
(
@"
巡检列表
respone = %@"
,
response
);
}];
}
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/Cell/RankDetailTableCell.h
View file @
c285d9ac
...
...
@@ -10,8 +10,13 @@
@interface
RankDetailTableCell
:
UITableViewCell
@property
(
nonatomic
,
assign
)
BOOL
isDrop
;
// 判断是否drop
@property
(
nonatomic
,
strong
)
UIImageView
*
arrowImageView
;
@property
(
nonatomic
,
strong
)
UIButton
*
mainTitleBtn
;
@property
(
nonatomic
,
strong
)
UILabel
*
scoreLabel
;
@property
(
nonatomic
,
strong
)
UIScrollView
*
scrollView
;
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/ViewController/RankDetailViewController.m
View file @
c285d9ac
...
...
@@ -22,9 +22,8 @@
@property
(
nonatomic
,
strong
)
NSArray
*
workData
;
@property
(
nonatomic
,
strong
)
NSArray
*
test1Array
;
@property
(
nonatomic
,
strong
)
NSArray
*
test2Array
;
@property
(
nonatomic
,
strong
)
NSArray
*
test3Array
;
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
selectedIndexes
;
// 存放二次展开的cell
@end
...
...
@@ -45,9 +44,8 @@
// 添加tableView
[
self
addTableView
];
self
.
test1Array
=
[
NSArray
arrayWithObjects
:
@"全员服务"
,
@"15分钟退单"
,
@"送货跟单"
,
@"企划环境升级"
,
@"物业环境改造"
,
nil
];
self
.
test2Array
=
[
NSArray
arrayWithObjects
:
@
(
100
),
@
(
100
),
@
(
99
),
@
(
100
),
@
(
98
),
nil
];
self
.
test3Array
=
[
NSArray
arrayWithObjects
:
@
(
1
),
@
(
1
),
@
(
2
),
@
(
1
),
@
(
3
),
nil
];
// 初始化容器
self
.
selectedIndexes
=
[[
NSMutableDictionary
alloc
]
init
];
}
...
...
@@ -75,6 +73,65 @@
[
self
.
tableView
registerClass
:[
RankDetailTableCell
class
]
forCellReuseIdentifier
:
kRankDetailCell
];
}
-
(
void
)
showScrollView
:
(
UIButton
*
)
sender
{
RankDetailTableCell
*
cell
=
(
RankDetailTableCell
*
)[[
sender
superview
]
superview
];
cell
.
isDrop
=
!
cell
.
isDrop
;
NSIndexPath
*
path
=
[
self
.
tableView
indexPathForCell
:
cell
];
[
_tableView
deselectRowAtIndexPath
:
path
animated
:
TRUE
];
BOOL
isSelected
=
!
[
self
cellIsSelected
:
path
];
NSNumber
*
selectedIndex
=
[
NSNumber
numberWithBool
:
isSelected
];
[
_selectedIndexes
setObject
:
selectedIndex
forKey
:
path
];
if
(
cell
.
isDrop
)
{
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
cell
.
arrowImageView
.
transform
=
CGAffineTransformIdentity
;
cell
.
arrowImageView
.
transform
=
CGAffineTransformMakeRotation
(
M_PI
/
2
);
}];
cell
.
scrollView
=
[[
UIScrollView
alloc
]
init
];
cell
.
scrollView
.
backgroundColor
=
[
UIColor
lightGrayColor
];
cell
.
scrollView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
cell
.
contentView
addSubview
:
cell
.
scrollView
];
NSLayoutConstraint
*
someoneTop
=
[
NSLayoutConstraint
constraintWithItem
:
cell
.
scrollView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
cell
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
45
];
[
cell
.
contentView
addConstraint
:
someoneTop
];
NSLayoutConstraint
*
someoneLeft
=
[
NSLayoutConstraint
constraintWithItem
:
cell
.
scrollView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
cell
.
contentView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
20
];
[
cell
.
contentView
addConstraint
:
someoneLeft
];
NSLayoutConstraint
*
someoneRight
=
[
NSLayoutConstraint
constraintWithItem
:
cell
.
scrollView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
cell
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
cell
.
contentView
addConstraint
:
someoneRight
];
NSLayoutConstraint
*
someoneHeight
=
[
NSLayoutConstraint
constraintWithItem
:
cell
.
scrollView
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
65
];
[
cell
.
contentView
addConstraint
:
someoneHeight
];
}
else
{
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
cell
.
arrowImageView
.
transform
=
CGAffineTransformIdentity
;
cell
.
arrowImageView
.
transform
=
CGAffineTransformMakeRotation
(
0
);
}];
if
(
cell
.
scrollView
)
{
[
cell
.
scrollView
removeFromSuperview
];
cell
.
scrollView
=
nil
;
}
}
[
_tableView
beginUpdates
];
[
_tableView
endUpdates
];
}
-
(
BOOL
)
cellIsSelected
:
(
NSIndexPath
*
)
indexPath
{
// Return whether the cell at the specified index path is selected or not
NSNumber
*
selectedIndex
=
[
_selectedIndexes
objectForKey
:
indexPath
];
return
selectedIndex
==
nil
?
FALSE
:
[
selectedIndex
boolValue
];
}
#pragma mark - UITableView DataSource/Delegate
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
...
...
@@ -99,9 +156,12 @@
WorkModel
*
workModel
=
_workData
[
indexPath
.
section
];
NSDictionary
*
dict
=
workModel
.
Info
[
indexPath
.
row
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
[
cell
.
mainTitleBtn
setTitle
:[
NSString
stringWithFormat
:
@"%d、%@"
,
(
int
)(
indexPath
.
row
+
1
),
dict
[
@"titles"
]]
forState
:
UIControlStateNormal
];
cell
.
scoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@分"
,
dict
[
@"scroes"
]];
// 按钮点击事件
[
cell
.
mainTitleBtn
addTarget
:
self
action
:
@selector
(
showScrollView
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
return
cell
;
...
...
@@ -116,7 +176,11 @@
// cell的高度
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
return
45
;
if
([
self
cellIsSelected
:
indexPath
])
{
return
130
;
}
return
44
;
}
// section高度
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/ViewController/RankingListViewController.m
View file @
c285d9ac
...
...
@@ -75,7 +75,7 @@
[
httpCilent
getRankingListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"response = %@"
,
response
);
NSLog
(
@"
口碑排名
response = %@"
,
response
);
}];
}
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Login/ViewController/LoginViewController.m
View file @
c285d9ac
...
...
@@ -74,6 +74,7 @@
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithLogin
];
[
httpClient
loginWithUsername
:
username
password
:
password
completion
:^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"登陆 respo = %@"
,
response
);
if
([
response
[
@"message"
]
isEqualToString
:
@"ok"
])
{
// 保存登陆信息
NSUserDefaults
*
userDefault
=
[
NSUserDefaults
standardUserDefaults
];
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/
Module/Function/WordOfMouth/Inspect/InspectList/Cell
/MenuButton.h
→
redstar/Classes/
Tools/Menu
/MenuButton.h
View file @
c285d9ac
...
...
@@ -10,4 +10,6 @@
@interface
MenuButton
:
UIButton
@property
(
nonatomic
,
assign
)
BOOL
isDrop
;
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/
Module/Function/WordOfMouth/Inspect/InspectList/Cell
/MenuButton.m
→
redstar/Classes/
Tools/Menu
/MenuButton.m
View file @
c285d9ac
File moved
This diff is collapsed.
Click to expand it.
redstar/Classes/Tools/Menu/MenuView.m
View file @
c285d9ac
...
...
@@ -50,7 +50,6 @@
_taxiButton
.
tag
=
4001
;
_taxiButton
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_taxiButton
setTitleColor
:
kInspectSectionButtonTextColor
forState
:
UIControlStateNormal
];
[
_taxiButton
setTitleColor
:[
UIColor
orangeColor
]
forState
:
UIControlStateHighlighted
];
_taxiButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
14
.
0
];
[
_taxiButton
setTitle
:
@"排序"
forState
:
UIControlStateNormal
];
[
self
addSubview
:
_taxiButton
];
...
...
@@ -78,7 +77,6 @@
_screenButton
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_screenButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
14
.
0
];
[
_screenButton
setTitleColor
:
kInspectSectionButtonTextColor
forState
:
UIControlStateNormal
];
[
_screenButton
setTitleColor
:[
UIColor
orangeColor
]
forState
:
UIControlStateHighlighted
];
[
_screenButton
setTitle
:
@"筛选"
forState
:
UIControlStateNormal
];
[
self
addSubview
:
_screenButton
];
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Tools/Menu/Screen/View/GroupItems.h
0 → 100644
View file @
c285d9ac
//
// GroupItems.h
// 垂直TabBar
//
// Created by admin on 15/11/14.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface
GroupItems
:
NSObject
@property
(
nonatomic
,
strong
)
NSString
*
title
;
@property
(
nonatomic
,
strong
)
UIView
*
view
;
-
(
instancetype
)
initWithTitle
:(
NSString
*
)
title
view
:(
UIView
*
)
view
;
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Tools/Menu/Screen/View/GroupItems.m
0 → 100644
View file @
c285d9ac
//
// GroupItems.m
// 垂直TabBar
//
// Created by admin on 15/11/14.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "GroupItems.h"
@implementation
GroupItems
-
(
instancetype
)
initWithTitle
:(
NSString
*
)
title
view
:(
UIView
*
)
view
{
self
=
[
super
init
];
if
(
self
)
{
self
.
view
=
view
;
self
.
title
=
title
;
}
return
self
;
}
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Tools/Menu/Screen/View/GroupTabBar.h
0 → 100644
View file @
c285d9ac
//
// GroupTabBar.h
// 垂直TabBar
//
// Created by admin on 15/11/14.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol
GroupTabBarDelegate
<
NSObject
>
// 选中view
-
(
void
)
switchView
:
(
UIView
*
)
view
;
@end
@interface
GroupTabBar
:
UIView
@property
(
nonatomic
,
strong
)
UIButton
*
stateBtn
;
// 状态
@property
(
nonatomic
,
strong
)
UIButton
*
titleBtn
;
// 标题
@property
(
nonatomic
,
strong
)
UIButton
*
sigleBtn
;
// 单号
@property
(
nonatomic
,
assign
)
id
<
GroupTabBarDelegate
>
delegate
;
// 设置代理
@property
(
nonatomic
,
strong
)
NSArray
*
items
;
-
(
void
)
showIndex
:(
NSInteger
)
index
;
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Tools/Menu/Screen/View/GroupTabBar.m
0 → 100644
View file @
c285d9ac
//
// GroupTabBar.m
// 垂直TabBar
//
// Created by admin on 15/11/14.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "GroupTabBar.h"
#import "GroupItems.h"
#define kScreenWidth [UIScreen mainScreen].bounds.size.width
#define kScreenHeight [UIScreen mainScreen].bounds.size.height
#define kSelfWidth self.frame.size.width
#define kSelfHeight self.frame.size.height
@interface
GroupTabBar
()
@property
(
strong
)
NSMutableArray
*
buttons
;
// 存放所有button的数组
@end
@implementation
GroupTabBar
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
self
.
buttons
=
[
NSMutableArray
array
];
}
return
self
;
}
-
(
void
)
setItems
:(
NSArray
*
)
items
{
_items
=
items
;
CGFloat
buttonHeight
=
kSelfHeight
/
_items
.
count
;
for
(
int
i
=
0
;
i
<
_items
.
count
;
i
++
)
{
GroupItems
*
item
=
_items
[
i
];
UIButton
*
button
=
[[
UIButton
alloc
]
init
];
button
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
[
button
setTitleColor
:
kLightBlack
forState
:
UIControlStateNormal
];
button
.
frame
=
CGRectMake
(
0
,
i
*
buttonHeight
,
kSelfWidth
,
buttonHeight
);
[
button
setTitle
:
item
.
title
forState
:
UIControlStateNormal
];
[
button
addTarget
:
self
action
:
@selector
(
touchDownForButton
:
)
forControlEvents
:
UIControlEventTouchDown
];
[
button
addTarget
:
self
action
:
@selector
(
touchUpForButton
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
addSubview
:
button
];
[
self
.
buttons
addObject
:
button
];
}
}
-
(
void
)
showIndex
:(
NSInteger
)
index
{
NSLog
(
@"self.buttons = %@"
,
self
.
buttons
);
[
self
touchDownForButton
:[
self
.
buttons
objectAtIndex
:
index
]];
[
self
touchUpForButton
:[
self
.
buttons
objectAtIndex
:
index
]];
}
-
(
void
)
touchDownForButton
:
(
UIButton
*
)
button
{
button
.
selected
=
YES
;
NSInteger
i
=
[
self
.
buttons
indexOfObject
:
button
];
UIView
*
view
=
[[
self
.
items
objectAtIndex
:
i
]
view
];
if
(
_delegate
)
{
[
_delegate
switchView
:
view
];
}
for
(
UIButton
*
b
in
self
.
buttons
)
{
b
.
selected
=
NO
;
}
}
-
(
void
)
touchUpForButton
:
(
UIButton
*
)
button
{
for
(
UIButton
*
b
in
self
.
buttons
)
{
b
.
selected
=
NO
;
b
.
backgroundColor
=
kSectionBackGroundColor
;
}
button
.
selected
=
YES
;
button
.
backgroundColor
=
[
UIColor
whiteColor
];
}
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Tools/Menu/Screen/View/ScreenView.h
View file @
c285d9ac
...
...
@@ -7,7 +7,26 @@
//
#import <UIKit/UIKit.h>
#import "GroupTabBar.h"
@protocol
ScreenTableDelegate
<
NSObject
>
-
(
void
)
click
;
@end
@interface
ScreenView
:
UIView
@property
(
nonatomic
,
strong
)
GroupTabBar
*
groupTabBar
;
// 重置
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
UITextView
*
textView
;
@property
(
nonatomic
,
strong
)
UIView
*
cyanView
;
@property
(
nonatomic
,
strong
)
UIButton
*
resetBtn
;
// 重置
@property
(
nonatomic
,
strong
)
UIButton
*
submitBtn
;
// 提交
@property
(
nonatomic
,
weak
)
id
<
ScreenTableDelegate
>
delegate
;
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Tools/Menu/Screen/View/ScreenView.m
View file @
c285d9ac
...
...
@@ -7,6 +7,18 @@
//
#import "ScreenView.h"
#import "GroupItems.h"
#define SELECTED_VIEW_CONTROLLER_TAG 98456345
#define kScreenTabelViewCell @"screenTableViewCell"
@interface
ScreenView
()
<
GroupTabBarDelegate
,
UITableViewDelegate
,
UITableViewDataSource
,
UITextViewDelegate
>
@property
(
nonatomic
,
strong
)
UILabel
*
placeholderLabel1
;
@property
(
nonatomic
,
strong
)
NSArray
*
testArray
;
@property
(
nonatomic
,
strong
)
UIView
*
backView
;
@end
@implementation
ScreenView
...
...
@@ -30,7 +42,168 @@
-
(
void
)
setup
{
self
.
backgroundColor
=
[
UIColor
greenColor
];
self
.
testArray
=
[
NSArray
arrayWithObjects
:
@"全部"
,
@"未提交"
,
@"已提交"
,
@"调研中"
,
@"已过期"
,
@"未完成"
,
nil
];
self
.
groupTabBar
=
[[
GroupTabBar
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
100
,
180
)];
_groupTabBar
.
delegate
=
self
;
[
self
addSubview
:
_groupTabBar
];
self
.
tableView
=
[[
UITableView
alloc
]
init
];
_tableView
.
delegate
=
self
;
_tableView
.
dataSource
=
self
;
GroupItems
*
tableItem
=
[[
GroupItems
alloc
]
initWithTitle
:
@"状态等于"
view
:
_tableView
];
self
.
textView
=
[[
UITextView
alloc
]
init
];
_textView
.
delegate
=
self
;
self
.
placeholderLabel1
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
5
,
0
,
100
,
30
)];
self
.
placeholderLabel1
.
text
=
@"请输入标题..."
;
self
.
placeholderLabel1
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
self
.
placeholderLabel1
.
textColor
=
kOnLineCellDetailColor
;
[
self
.
textView
addSubview
:
self
.
placeholderLabel1
];
GroupItems
*
textItem
=
[[
GroupItems
alloc
]
initWithTitle
:
@"标题类似于"
view
:
_textView
];
self
.
cyanView
=
[[
UIView
alloc
]
init
];
GroupItems
*
cyanItem
=
[[
GroupItems
alloc
]
initWithTitle
:
@"单号等于"
view
:
_cyanView
];
[
self
insertSubview
:
_tableView
belowSubview
:
_groupTabBar
];
[
self
insertSubview
:
_textView
belowSubview
:
_groupTabBar
];
[
self
insertSubview
:
_cyanView
belowSubview
:
_groupTabBar
];
_groupTabBar
.
items
=
@[
tableItem
,
textItem
,
cyanItem
];
[
_groupTabBar
showIndex
:
0
];
self
.
backView
.
backgroundColor
=
[
UIColor
whiteColor
];
[
self
.
resetBtn
setTitle
:
@"重置"
forState
:
UIControlStateNormal
];
[
self
.
submitBtn
setTitle
:
@"提交"
forState
:
UIControlStateNormal
];
}
#pragma mark - UITextView Delegate
-
(
BOOL
)
textView
:
(
UITextView
*
)
textView
shouldChangeTextInRange
:
(
NSRange
)
range
replacementText
:
(
NSString
*
)
text
{
if
(
!
[
text
isEqualToString
:
@""
])
{
_placeholderLabel1
.
hidden
=
YES
;
}
if
([
text
isEqualToString
:
@""
]
&&
range
.
location
==
0
&&
range
.
length
==
1
)
{
_placeholderLabel1
.
hidden
=
NO
;
}
return
YES
;
}
#pragma mark - UITabelViewDelgate / DataSource
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
_testArray
.
count
;
}
// cell显示的内容
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kScreenTabelViewCell
];
if
(
!
cell
)
{
cell
=
[[
UITableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kScreenTabelViewCell
];
}
cell
.
textLabel
.
text
=
_testArray
[
indexPath
.
row
];
cell
.
textLabel
.
font
=
[
UIFont
systemFontOfSize
:
14
.
0
];
return
cell
;
}
// cell的点击事件
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
_delegate
)
{
[
_delegate
click
];
}
}
-
(
void
)
switchView
:
(
UIView
*
)
view
{
UIView
*
currentView
=
[
self
viewWithTag
:
SELECTED_VIEW_CONTROLLER_TAG
];
[
currentView
removeFromSuperview
];
currentView
=
nil
;
view
.
frame
=
CGRectMake
(
self
.
groupTabBar
.
frame
.
size
.
width
,
0
,
kScreenWidth
-
self
.
groupTabBar
.
frame
.
size
.
width
,
self
.
groupTabBar
.
size
.
height
);
view
.
tag
=
SELECTED_VIEW_CONTROLLER_TAG
;
[
self
insertSubview
:
view
belowSubview
:
_groupTabBar
];
}
-
(
UIView
*
)
backView
{
if
(
!
_backView
)
{
_backView
=
[[
UIView
alloc
]
init
];
_backView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
addSubview
:
_backView
];
NSLayoutConstraint
*
lineViewTop
=
[
NSLayoutConstraint
constraintWithItem
:
_backView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
groupTabBar
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
lineViewTop
];
NSLayoutConstraint
*
lineViewRight
=
[
NSLayoutConstraint
constraintWithItem
:
_backView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
lineViewRight
];
NSLayoutConstraint
*
lineViewBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_backView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
lineViewBottom
];
NSLayoutConstraint
*
lineViewLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_backView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
lineViewLeft
];
}
return
_backView
;
}
-
(
UIButton
*
)
resetBtn
{
if
(
!
_resetBtn
)
{
_resetBtn
=
[[
UIButton
alloc
]
init
];
_resetBtn
.
backgroundColor
=
[
UIColor
grayColor
];
_resetBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
backView
addSubview
:
_resetBtn
];
NSLayoutConstraint
*
lineViewTop
=
[
NSLayoutConstraint
constraintWithItem
:
_resetBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
backView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
5
];
[
self
.
backView
addConstraint
:
lineViewTop
];
NSLayoutConstraint
*
lineViewRight
=
[
NSLayoutConstraint
constraintWithItem
:
_resetBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
backView
attribute
:
NSLayoutAttributeCenterX
multiplier
:
1
.
0
constant
:-
20
];
[
self
.
backView
addConstraint
:
lineViewRight
];
NSLayoutConstraint
*
lineViewBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_resetBtn
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
backView
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:-
5
];
[
self
.
backView
addConstraint
:
lineViewBottom
];
NSLayoutConstraint
*
lineViewLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_resetBtn
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
backView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
20
];
[
self
.
backView
addConstraint
:
lineViewLeft
];
}
return
_resetBtn
;
}
-
(
UIButton
*
)
submitBtn
{
if
(
!
_submitBtn
)
{
_submitBtn
=
[[
UIButton
alloc
]
init
];
_submitBtn
.
backgroundColor
=
kNavigationBarColor
;
_submitBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
backView
addSubview
:
_submitBtn
];
NSLayoutConstraint
*
lineViewTop
=
[
NSLayoutConstraint
constraintWithItem
:
_submitBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
backView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
5
];
[
self
.
backView
addConstraint
:
lineViewTop
];
NSLayoutConstraint
*
lineViewRight
=
[
NSLayoutConstraint
constraintWithItem
:
_submitBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
backView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
.
backView
addConstraint
:
lineViewRight
];
NSLayoutConstraint
*
lineViewBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_submitBtn
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
backView
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:-
5
];
[
self
.
backView
addConstraint
:
lineViewBottom
];
NSLayoutConstraint
*
lineViewLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_submitBtn
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
backView
attribute
:
NSLayoutAttributeCenterX
multiplier
:
1
.
0
constant
:
20
];
[
self
.
backView
addConstraint
:
lineViewLeft
];
}
return
_submitBtn
;
}
/*
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Tools/Menu/Taxis/View/TaxisView.m
View file @
c285d9ac
...
...
@@ -31,12 +31,9 @@
-
(
void
)
setup
{
[
self
.
defaultBtn
setTitle
:
@"默认排序"
forState
:
UIControlStateNormal
];
self
.
defaultBtn
.
backgroundColor
=
[
UIColor
orangeColor
];
[
self
.
sequenceBtn
setTitle
:
@"时间顺序排序"
forState
:
UIControlStateNormal
];
self
.
sequenceBtn
.
backgroundColor
=
[
UIColor
orangeColor
];
[
self
.
changeoverBtn
setTitle
:
@"时间逆序排序"
forState
:
UIControlStateNormal
];
self
.
changeoverBtn
.
backgroundColor
=
[
UIColor
orangeColor
];
}
...
...
@@ -45,7 +42,13 @@
{
if
(
!
_defaultBtn
)
{
_defaultBtn
=
[[
UIButton
alloc
]
init
];
_defaultBtn
.
layer
.
borderWidth
=
0
.
5
;
_defaultBtn
.
titleEdgeInsets
=
UIEdgeInsetsMake
(
0
,
20
,
0
,
0
);
_defaultBtn
.
layer
.
borderColor
=
kSeparateLineCGColor
;
_defaultBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_defaultBtn
setTitleColor
:
kInspectSectionButtonTextColor
forState
:
UIControlStateNormal
];
_defaultBtn
.
contentHorizontalAlignment
=
UIControlContentHorizontalAlignmentLeft
;
_defaultBtn
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
14
.
0
];
[
self
addSubview
:
_defaultBtn
];
// 顶端
...
...
@@ -71,7 +74,14 @@
{
if
(
!
_sequenceBtn
)
{
_sequenceBtn
=
[[
UIButton
alloc
]
init
];
_sequenceBtn
.
titleEdgeInsets
=
UIEdgeInsetsMake
(
0
,
20
,
0
,
0
);
_sequenceBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_sequenceBtn
.
layer
.
borderColor
=
kSeparateLineCGColor
;
_sequenceBtn
.
layer
.
borderWidth
=
0
.
5
;
[
_sequenceBtn
setTitleColor
:
kInspectSectionButtonTextColor
forState
:
UIControlStateNormal
];
_sequenceBtn
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
14
.
0
];
_sequenceBtn
.
contentHorizontalAlignment
=
UIControlContentHorizontalAlignmentLeft
;
[
self
addSubview
:
_sequenceBtn
];
// 顶端
...
...
@@ -97,7 +107,13 @@
{
if
(
!
_changeoverBtn
)
{
_changeoverBtn
=
[[
UIButton
alloc
]
init
];
_changeoverBtn
.
layer
.
borderColor
=
kSeparateLineCGColor
;
_changeoverBtn
.
layer
.
borderWidth
=
0
.
5
;
_changeoverBtn
.
titleEdgeInsets
=
UIEdgeInsetsMake
(
0
,
20
,
0
,
0
);
_changeoverBtn
.
contentHorizontalAlignment
=
UIControlContentHorizontalAlignmentLeft
;
_changeoverBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_changeoverBtn
setTitleColor
:
kInspectSectionButtonTextColor
forState
:
UIControlStateNormal
];
_changeoverBtn
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
14
.
0
];
[
self
addSubview
:
_changeoverBtn
];
// 顶端
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment