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
52a40820
Commit
52a40820
authored
Dec 08, 2015
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改筛选框问题
parent
d9b53d05
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
258 additions
and
75 deletions
+258
-75
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
PictureViewController.m
...icture/PictureList/ViewController/PictureViewController.m
+186
-1
QuestionViewController.m
...tion/QuestionList/ViewController/QuestionViewController.m
+36
-39
InspectListViewController.m
...ct/InspectList/ViewController/InspectListViewController.m
+36
-35
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
52a40820
No preview for this file type
redstar/Classes/Module/Function/Picture/PictureList/ViewController/PictureViewController.m
View file @
52a40820
...
...
@@ -13,9 +13,26 @@
#import "PictureStoryViewController.h"
#import "AddPictureViewController.h"
#import "TaxisView.h"
#import "ScreenView.h"
#import "MenuView.h"
#define kPictureTableViewCell @"pictureTabelViewCell"
@interface
PictureViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@interface
PictureViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
ScreenTableDelegate
,
TaxisViewDelegate
,
InspectTableViewDelegate
>
@property
(
nonatomic
,
strong
)
MenuView
*
menuView
;
@property
(
nonatomic
,
strong
)
TaxisView
*
taxisView
;
@property
(
nonatomic
,
strong
)
ScreenView
*
screenView
;
@property
(
nonatomic
,
strong
)
MenuButton
*
selctedButton
;
@property
(
nonatomic
,
strong
)
UIView
*
bgView
;
@property
(
nonatomic
,
assign
)
NSInteger
selectRow
;
@property
(
nonatomic
,
assign
)
NSInteger
timeSelectNum
;
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
NSArray
*
test1Array
;
@property
(
nonatomic
,
strong
)
NSArray
*
test2Array
;
...
...
@@ -33,6 +50,14 @@
[
self
setupTableView
];
if
([[[
UIDevice
currentDevice
]
systemVersion
]
floatValue
]
>=
7
.
0
)
{
self
.
edgesForExtendedLayout
=
UIRectEdgeNone
;
self
.
extendedLayoutIncludesOpaqueBars
=
NO
;
self
.
modalPresentationCapturesStatusBarAppearance
=
NO
;
self
.
navigationController
.
navigationBar
.
translucent
=
NO
;
}
// 初始化
self
.
test1Array
=
[
NSArray
arrayWithObjects
:
@"【服务口碑现场】第二期"
,
@"讲述红星人自己的故事"
,
@"【服务口碑现场】第一期"
,
nil
];
self
.
test2Array
=
[
NSArray
arrayWithObjects
:
@"把第一次客户投诉变成商场服务提升的契机,变成商场服务提升的契机。"
,
@"变成商场服务提升的契机,变成商场服务提升的契机。"
,
@"把第一次客户投诉变成商场服务提升的契机,变成商场服务提升的契机。"
,
nil
];
...
...
@@ -84,6 +109,162 @@
[
self
.
navigationController
pushViewController
:
addPic
animated
:
YES
];
}
-
(
void
)
dropCilck
:
(
MenuButton
*
)
sender
{
sender
.
isDrop
=
!
sender
.
isDrop
;
if
(
_selctedButton
.
tag
==
sender
.
tag
)
{
if
(
sender
.
isDrop
)
{
if
(
sender
.
tag
==
4001
)
{
[
self
showRedView
];
}
else
{
[
self
showGreenView
];
}
sender
.
selected
=
YES
;
}
else
{
if
(
sender
.
tag
==
4001
)
{
[
self
closeRedView
];
}
else
{
[
self
closeGreenView
];
}
sender
.
selected
=
NO
;
}
}
else
{
// 前一次选中的按钮 选中状态置为NO
_selctedButton
.
selected
=
NO
;
_selctedButton
.
isDrop
=
NO
;
// 进行选中状态为NO 的操作
// 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
;
// 对选中按钮 进行相关操作
_selctedButton
=
(
MenuButton
*
)
sender
;
if
(
sender
.
tag
==
4001
)
{
[
self
showRedView
];
}
else
{
[
self
showGreenView
];
}
}
}
-
(
void
)
showRedView
{
if
(
!
_bgView
)
{
_bgView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
45
,
kScreenWidth
,
kScreenHeight
-
45
)];
UITapGestureRecognizer
*
tapGR
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
closeRedView
)];
[
_bgView
addGestureRecognizer
:
tapGR
];
}
if
(
!
_taxisView
)
{
_taxisView
=
[[
TaxisView
alloc
]
init
];
_taxisView
.
backgroundColor
=
[
UIColor
whiteColor
];
}
_taxisView
.
delegate
=
self
;
[
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
.
alpha
=
0
.
0
;
_taxisView
.
frame
=
toFrame
;
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_bgView
.
alpha
=
0
.
6
;
_taxisView
.
alpha
=
1
.
0
;
// _taxisView.frame = toFrame;
}];
}
-
(
void
)
closeRedView
{
_selctedButton
.
isDrop
=
NO
;
_selctedButton
.
selected
=
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;
_taxisView
.
alpha
=
0
.
0
;
}
completion
:^
(
BOOL
finished
)
{
[
_bgView
removeFromSuperview
];
[
_taxisView
removeFromSuperview
];
}];
}
-
(
void
)
showGreenView
{
if
(
!
_bgView
)
{
_bgView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
64
+
45
,
kScreenWidth
,
kScreenHeight
-
64
-
45
)];
UITapGestureRecognizer
*
tapGR
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
closeGreenView
)];
[
_bgView
addGestureRecognizer
:
tapGR
];
}
if
(
!
_screenView
)
{
_screenView
=
[[
ScreenView
alloc
]
initWithTitleArray
:[
NSArray
arrayWithObjects
:
@"待解决"
,
@"已解决"
,
@"已作废"
,
nil
]];
_screenView
.
delegate
=
self
;
_screenView
.
inspectTableView
.
inspectDelegate
=
self
;
_screenView
.
backgroundColor
=
[
UIColor
whiteColor
];
}
[
self
.
view
addSubview
:
_bgView
];
[
self
.
view
insertSubview
:
_screenView
aboveSubview
:
_bgView
];
_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
:
^
{
_bgView
.
alpha
=
0
.
6
;
_screenView
.
frame
=
toFrame
;
}];
}
-
(
void
)
closeGreenView
{
_selctedButton
.
isDrop
=
NO
;
_selctedButton
.
selected
=
NO
;
[
_selctedButton
setTitleColor
:
kInspectSectionButtonTextColor
forState
:
UIControlStateNormal
];
CGRect
fromFrame
=
CGRectMake
(
0
,
-
kScreenViewHeight
,
kScreenWidth
,
kScreenViewHeight
);
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_bgView
.
alpha
=
.
0
f
;
_screenView
.
frame
=
fromFrame
;
}
completion
:^
(
BOOL
finished
)
{
[
_bgView
removeFromSuperview
];
[
_screenView
removeFromSuperview
];
}];
}
#pragma mark - UITableView Delegate/DataSource
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
...
...
@@ -172,6 +353,10 @@
[
screenButton
setTitle
:
@"筛选"
forState
:
UIControlStateNormal
];
[
sectionView
addSubview
:
screenButton
];
taxiButton
.
tag
=
4001
;
[
taxiButton
addTarget
:
self
action
:
@selector
(
dropCilck
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
screenButton
addTarget
:
self
action
:
@selector
(
dropCilck
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
// taxiButton布局
NSLayoutConstraint
*
taxiButtonTop
=
[
NSLayoutConstraint
constraintWithItem
:
taxiButton
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
sectionView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
sectionView
addConstraint
:
taxiButtonTop
];
...
...
redstar/Classes/Module/Function/Question/QuestionList/ViewController/QuestionViewController.m
View file @
52a40820
...
...
@@ -88,20 +88,12 @@
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
[
super
viewWillAppear
:
animated
];
[
self
.
menuView
.
taxiButton
addTarget
:
self
action
:
@selector
(
dropCilck
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
menuView
.
screenButton
addTarget
:
self
action
:
@selector
(
dropCilck
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
self
.
tabBarController
.
tabBar
.
hidden
=
YES
;
[
self
requestQuestionList
];
}
-
(
void
)
viewWillDisappear
:
(
BOOL
)
animated
{
[
super
viewWillDisappear
:
animated
];
[
self
.
menuView
removeFromSuperview
];
self
.
menuView
=
nil
;
}
...
...
@@ -155,6 +147,8 @@
[
self
.
tableView
reloadData
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}
self
.
menuView
.
backgroundColor
=
kInspectSectionBackGroundColor
;
}];
}
...
...
@@ -193,7 +187,8 @@
}
else
{
[
self
.
tableView
.
footer
endRefreshing
];
}
self
.
menuView
.
backgroundColor
=
kInspectSectionBackGroundColor
;
[
self
.
tableView
reloadData
];
}];
...
...
@@ -316,7 +311,7 @@
-
(
void
)
showRedView
{
if
(
!
_bgView
)
{
_bgView
=
[[
UIView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
_bgView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
45
,
kScreenWidth
,
kScreenHeight
)
];
UITapGestureRecognizer
*
tapGR
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
closeRedView
)];
[
_bgView
addGestureRecognizer
:
tapGR
];
}
...
...
@@ -333,12 +328,11 @@
_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
:
^
{
_taxisView
.
frame
=
toFrame
;
_taxisView
.
alpha
=
0
.
0
;
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
_bgView
.
alpha
=
0
.
6
;
_taxisView
.
frame
=
toFrame
;
_taxisView
.
alpha
=
1
.
0
;
}];
}
...
...
@@ -348,10 +342,9 @@
_selctedButton
.
isDrop
=
NO
;
_selctedButton
.
selected
=
NO
;
[
_selctedButton
setTitleColor
:
kInspectSectionButtonTextColor
forState
:
UIControlStateNormal
];
CGRect
fromFrame
=
CGRectMake
(
0
,
-
kTaxisViewHeight
,
kScreenWidth
,
kTaxisViewHeight
);
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
_bgView
.
alpha
=
.
0
f
;
_taxisView
.
frame
=
fromFrame
;
_taxisView
.
alpha
=
0
.
0
;
}
completion
:^
(
BOOL
finished
)
{
[
_bgView
removeFromSuperview
];
[
_taxisView
removeFromSuperview
];
...
...
@@ -362,7 +355,7 @@
-
(
void
)
showGreenView
{
if
(
!
_bgView
)
{
_bgView
=
[[
UIView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
_bgView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
45
,
kScreenWidth
,
kScreenHeight
)
];
UITapGestureRecognizer
*
tapGR
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
closeGreenView
)];
[
_bgView
addGestureRecognizer
:
tapGR
];
}
...
...
@@ -385,12 +378,12 @@
_bgView
.
backgroundColor
=
[
UIColor
blackColor
];
CGRect
toFrame
=
CGRectMake
(
0
,
45
,
kScreenWidth
,
kMoreScreenViewHeight
);
CGRect
fromFrame
=
CGRectMake
(
0
,
-
kMoreScreenViewHeight
,
kScreenWidth
,
kMoreScreenViewHeight
)
;
_screenView
.
frame
=
fromFrame
;
_screenView
.
frame
=
toFrame
;
_screenView
.
alpha
=
0
.
0
;
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_bgView
.
alpha
=
0
.
6
;
_screenView
.
frame
=
toFrame
;
_screenView
.
alpha
=
1
.
0
;
}];
}
...
...
@@ -400,10 +393,9 @@
_selctedButton
.
isDrop
=
NO
;
_selctedButton
.
selected
=
NO
;
[
_selctedButton
setTitleColor
:
kInspectSectionButtonTextColor
forState
:
UIControlStateNormal
];
CGRect
fromFrame
=
CGRectMake
(
0
,
-
kMoreScreenViewHeight
,
kScreenWidth
,
kMoreScreenViewHeight
);
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_bgView
.
alpha
=
.
0
f
;
_screenView
.
frame
=
fromFrame
;
_screenView
.
alpha
=
0
.
0
;
}
completion
:^
(
BOOL
finished
)
{
[
_bgView
removeFromSuperview
];
[
_screenView
removeFromSuperview
];
...
...
@@ -593,6 +585,8 @@
[
MBProgressHUD
hideHUDForView
:
weakSelf
.
view
animated
:
YES
];
[
weakSelf
closeGreenView
];
}
self
.
menuView
.
backgroundColor
=
kInspectSectionBackGroundColor
;
}];
}
...
...
@@ -699,6 +693,8 @@
[
MBProgressHUD
hideHUDForView
:
weakSelf
.
view
animated
:
YES
];
[
weakSelf
closeGreenView
];
}
self
.
menuView
.
backgroundColor
=
kInspectSectionBackGroundColor
;
}];
...
...
@@ -752,21 +748,21 @@
if
(
!
_menuView
)
{
_menuView
=
[[
MenuView
alloc
]
init
];
_menuView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_menuView
.
backgroundColor
=
kInspectSectionBackGroundColor
;
UIWindow
*
window
=
[[
UIApplication
sharedApplication
].
windows
lastObject
];
[
windo
w
addSubview
:
_menuView
];
[
_menuView
.
taxiButton
addTarget
:
self
action
:
@selector
(
dropCilck
:
)
forControlEvents
:
UIControlEventTouchUpInside
]
;
[
_menuView
.
screenButton
addTarget
:
self
action
:
@selector
(
dropCilck
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
vie
w
addSubview
:
_menuView
];
NSLayoutConstraint
*
menuTop
=
[
NSLayoutConstraint
constraintWithItem
:
_menuView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
window
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
64
];
[
windo
w
addConstraint
:
menuTop
];
NSLayoutConstraint
*
menuLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_menuView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
windo
w
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
windo
w
addConstraint
:
menuLeft
];
NSLayoutConstraint
*
menuTop
=
[
NSLayoutConstraint
constraintWithItem
:
_menuView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
vie
w
addConstraint
:
menuTop
];
NSLayoutConstraint
*
menuLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_menuView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
vie
w
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
vie
w
addConstraint
:
menuLeft
];
NSLayoutConstraint
*
menuRight
=
[
NSLayoutConstraint
constraintWithItem
:
_menuView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
windo
w
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
windo
w
addConstraint
:
menuRight
];
NSLayoutConstraint
*
menuRight
=
[
NSLayoutConstraint
constraintWithItem
:
_menuView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
vie
w
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
vie
w
addConstraint
:
menuRight
];
NSLayoutConstraint
*
menuHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_menuView
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
45
];
[
windo
w
addConstraint
:
menuHeight
];
[
self
.
vie
w
addConstraint
:
menuHeight
];
}
return
_menuView
;
}
...
...
@@ -805,8 +801,9 @@
_searchBar
=
[[
SearchToolBar
alloc
]
init
];
_searchBar
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_searchBar
.
queryButton
addTarget
:
self
action
:
@selector
(
searchBarClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
insertSubview
:
_searchBar
atIndex
:
999
];
[
self
.
view
insertSubview
:
_searchBar
aboveSubview
:
_tableView
];
[
self
.
view
insertSubview
:
_searchBar
aboveSubview
:
_noDataView
];
NSLayoutConstraint
*
tableHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_searchBar
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
50
];
[
self
.
view
addConstraint
:
tableHeight
];
...
...
@@ -830,7 +827,7 @@
_noDataView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
view
addSubview
:
_noDataView
];
NSLayoutConstraint
*
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_noDataView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_noDataView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
45
];
[
self
.
view
addConstraint
:
tableTop
];
NSLayoutConstraint
*
tableLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_noDataView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
...
...
@@ -839,7 +836,7 @@
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_noDataView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableRight
];
NSLayoutConstraint
*
tableBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_noDataView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
-
4
0
];
NSLayoutConstraint
*
tableBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_noDataView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableBottom
];
}
return
_noDataView
;
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectList/ViewController/InspectListViewController.m
View file @
52a40820
...
...
@@ -102,8 +102,7 @@
[
super
viewWillAppear
:
animated
];
self
.
tabBarController
.
tabBar
.
hidden
=
YES
;
[
self
.
menuView
.
taxiButton
addTarget
:
self
action
:
@selector
(
dropCilck
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
menuView
.
screenButton
addTarget
:
self
action
:
@selector
(
dropCilck
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
}
-
(
void
)
viewWillDisappear
:
(
BOOL
)
animated
...
...
@@ -150,7 +149,8 @@
}
else
{
[
self
.
tableView
.
footer
endRefreshing
];
}
self
.
menuView
.
backgroundColor
=
kInspectSectionBackGroundColor
;
[
self
.
tableView
reloadData
];
}];
...
...
@@ -186,13 +186,14 @@
if
(
_taskListDataArray
.
count
==
0
)
{
self
.
noDataView
.
backgroundColor
=
[
UIColor
whiteColor
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}
else
{
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}
self
.
menuView
.
backgroundColor
=
kInspectSectionBackGroundColor
;
[
self
.
tableView
reloadData
];
}];
...
...
@@ -241,6 +242,7 @@
if
(
_taskListDataArray
.
count
==
0
)
{
self
.
noDataView
.
backgroundColor
=
[
UIColor
whiteColor
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
self
.
menuView
.
backgroundColor
=
kInspectSectionBackGroundColor
;
}
else
{
self
.
tableView
.
delegate
=
self
;
...
...
@@ -248,6 +250,8 @@
self
.
tableView
.
footer
=
[
MJRefreshAutoNormalFooter
footerWithRefreshingBlock
:
^
{
[
self
requestMoreList
];
}];
self
.
menuView
.
backgroundColor
=
kInspectSectionBackGroundColor
;
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}
...
...
@@ -319,7 +323,7 @@
-
(
void
)
showRedView
{
if
(
!
_bgView
)
{
_bgView
=
[[
UIView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
_bgView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
45
,
kScreenWidth
,
kScreenHeight
-
45
)
];
UITapGestureRecognizer
*
tapGR
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
closeRedView
)];
[
_bgView
addGestureRecognizer
:
tapGR
];
}
...
...
@@ -336,12 +340,11 @@
_bgView
.
backgroundColor
=
[
UIColor
blackColor
];
CGRect
toFrame
=
CGRectMake
(
0
,
45
,
kScreenWidth
,
kTaxisViewHeight
);
CGRect
fromFrame
=
CGRectMake
(
0
,
-
kTaxisViewHeight
,
kScreenWidth
,
kTaxisViewHeight
);
_taxisView
.
frame
=
fromFrame
;
_taxisView
.
alpha
=
0
.
0
;
_taxisView
.
frame
=
toFrame
;
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_bgView
.
alpha
=
0
.
6
;
_taxisView
.
frame
=
toFrame
;
_taxisView
.
alpha
=
1
.
0
;
}];
}
...
...
@@ -350,10 +353,9 @@
{
_selctedButton
.
isDrop
=
NO
;
_selctedButton
.
selected
=
NO
;
CGRect
fromFrame
=
CGRectMake
(
0
,
-
kTaxisViewHeight
,
kScreenWidth
,
kTaxisViewHeight
);
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_bgView
.
alpha
=
.
0
f
;
_taxisView
.
frame
=
fromFrame
;
_taxisView
.
alpha
=
0
.
0
;
}
completion
:^
(
BOOL
finished
)
{
[
_bgView
removeFromSuperview
];
[
_taxisView
removeFromSuperview
];
...
...
@@ -364,7 +366,7 @@
-
(
void
)
showGreenView
{
if
(
!
_bgView
)
{
_bgView
=
[[
UIView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
_bgView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
45
,
kScreenWidth
,
kScreenHeight
-
45
)
];
UITapGestureRecognizer
*
tapGR
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
closeGreenView
)];
[
_bgView
addGestureRecognizer
:
tapGR
];
}
...
...
@@ -385,12 +387,11 @@
_bgView
.
backgroundColor
=
[
UIColor
blackColor
];
CGRect
toFrame
=
CGRectMake
(
0
,
45
,
kScreenWidth
,
kScreenViewHeight
);
CGRect
fromFrame
=
CGRectMake
(
0
,
-
kScreenViewHeight
,
kScreenWidth
,
kScreenViewHeight
);
_screenView
.
frame
=
fromFrame
;
_screenView
.
alpha
=
0
.
0
;
_screenView
.
frame
=
toFrame
;
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_bgView
.
alpha
=
0
.
6
;
_screenView
.
frame
=
toFrame
;
_screenView
.
alpha
=
1
.
0
;
}];
}
...
...
@@ -400,10 +401,9 @@
_selctedButton
.
isDrop
=
NO
;
_selctedButton
.
selected
=
NO
;
[
_selctedButton
setTitleColor
:
kInspectSectionButtonTextColor
forState
:
UIControlStateNormal
];
CGRect
fromFrame
=
CGRectMake
(
0
,
-
kScreenViewHeight
,
kScreenWidth
,
kScreenViewHeight
);
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_bgView
.
alpha
=
.
0
f
;
_screenView
.
frame
=
fromFrame
;
_screenView
.
alpha
=
0
.
0
;
}
completion
:^
(
BOOL
finished
)
{
[
_bgView
removeFromSuperview
];
[
_screenView
removeFromSuperview
];
...
...
@@ -548,6 +548,8 @@
[
_tableView
removeFromSuperview
];
_tableView
=
nil
;
}
self
.
menuView
.
backgroundColor
=
kInspectSectionBackGroundColor
;
self
.
noDataView
.
backgroundColor
=
[
UIColor
whiteColor
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
[
self
closeGreenView
];
...
...
@@ -557,6 +559,8 @@
[
_noDataView
removeFromSuperview
];
_noDataView
=
nil
;
}
self
.
menuView
.
backgroundColor
=
kInspectSectionBackGroundColor
;
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
[
self
.
tableView
reloadData
];
...
...
@@ -635,6 +639,8 @@
[
_tableView
removeFromSuperview
];
_tableView
=
nil
;
}
self
.
menuView
.
backgroundColor
=
kInspectSectionBackGroundColor
;
self
.
noDataView
.
backgroundColor
=
[
UIColor
whiteColor
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
...
...
@@ -643,6 +649,7 @@
[
_noDataView
removeFromSuperview
];
_noDataView
=
nil
;
}
self
.
menuView
.
backgroundColor
=
kInspectSectionBackGroundColor
;
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
[
self
.
tableView
reloadData
];
...
...
@@ -691,12 +698,6 @@
[
self
.
navigationController
pushViewController
:
inspectTaskVC
animated
:
YES
];
}
//// cell的高度
//- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
//{
// return 145;
//}
// section高度
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
...
...
@@ -716,21 +717,21 @@
if
(
!
_menuView
)
{
_menuView
=
[[
MenuView
alloc
]
init
];
_menuView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_menuView
.
backgroundColor
=
kInspectSectionBackGroundColor
;
UIWindow
*
window
=
[[
UIApplication
sharedApplication
].
windows
lastObject
];
[
windo
w
addSubview
:
_menuView
];
[
_menuView
.
taxiButton
addTarget
:
self
action
:
@selector
(
dropCilck
:
)
forControlEvents
:
UIControlEventTouchUpInside
]
;
[
_menuView
.
screenButton
addTarget
:
self
action
:
@selector
(
dropCilck
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
vie
w
addSubview
:
_menuView
];
NSLayoutConstraint
*
menuTop
=
[
NSLayoutConstraint
constraintWithItem
:
_menuView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
window
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
64
];
[
windo
w
addConstraint
:
menuTop
];
NSLayoutConstraint
*
menuTop
=
[
NSLayoutConstraint
constraintWithItem
:
_menuView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
vie
w
addConstraint
:
menuTop
];
NSLayoutConstraint
*
menuLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_menuView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
windo
w
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
windo
w
addConstraint
:
menuLeft
];
NSLayoutConstraint
*
menuLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_menuView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
vie
w
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
vie
w
addConstraint
:
menuLeft
];
NSLayoutConstraint
*
menuRight
=
[
NSLayoutConstraint
constraintWithItem
:
_menuView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
windo
w
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
windo
w
addConstraint
:
menuRight
];
NSLayoutConstraint
*
menuRight
=
[
NSLayoutConstraint
constraintWithItem
:
_menuView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
vie
w
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
vie
w
addConstraint
:
menuRight
];
NSLayoutConstraint
*
menuHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_menuView
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
45
];
[
windo
w
addConstraint
:
menuHeight
];
[
self
.
vie
w
addConstraint
:
menuHeight
];
}
return
_menuView
;
}
...
...
@@ -769,7 +770,7 @@
_noDataView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
view
addSubview
:
_noDataView
];
NSLayoutConstraint
*
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_noDataView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_noDataView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
45
];
[
self
.
view
addConstraint
:
tableTop
];
NSLayoutConstraint
*
tableLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_noDataView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
...
...
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