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
3ad1ceee
Commit
3ad1ceee
authored
Jan 04, 2016
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉商场搜索
parent
e818d8b4
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
77 additions
and
3 deletions
+77
-3
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Contents.json
...r/Assets.xcassets/white_background.imageset/Contents.json
+22
-0
white_background@2x.png
...cassets/white_background.imageset/white_background@2x.png
+0
-0
white_background@3x.png
...cassets/white_background.imageset/white_background@3x.png
+0
-0
TreeNodeCell.h
...es/Module/Function/OnLine/SelectStore/Cell/TreeNodeCell.h
+1
-0
TreeNodeCell.m
...es/Module/Function/OnLine/SelectStore/Cell/TreeNodeCell.m
+33
-0
TreeView.m
...lasses/Module/Function/OnLine/SelectStore/View/TreeView.m
+18
-2
SelectStoreViewController.m
...ne/SelectStore/ViewController/SelectStoreViewController.m
+3
-1
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
3ad1ceee
No preview for this file type
redstar/Assets.xcassets/white_background.imageset/Contents.json
0 → 100644
View file @
3ad1ceee
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
,
"filename"
:
"white_background@2x.png"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
,
"filename"
:
"white_background@3x.png"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
redstar/Assets.xcassets/white_background.imageset/white_background@2x.png
0 → 100644
View file @
3ad1ceee
200 Bytes
redstar/Assets.xcassets/white_background.imageset/white_background@3x.png
0 → 100644
View file @
3ad1ceee
303 Bytes
redstar/Classes/Module/Function/OnLine/SelectStore/Cell/TreeNodeCell.h
View file @
3ad1ceee
...
...
@@ -41,4 +41,5 @@
@property
(
nonatomic
,
weak
)
id
<
TreeNodeDelegate
>
nodeDelegate
;
@property
(
nonatomic
)
UIButton
*
foldButton
;
@property
(
nonatomic
)
CheckBoxButton
*
titleButton
;
@property
(
nonatomic
,
strong
)
UIImageView
*
arrowImageView
;
@end
redstar/Classes/Module/Function/OnLine/SelectStore/Cell/TreeNodeCell.m
View file @
3ad1ceee
...
...
@@ -135,6 +135,39 @@
NSLayoutConstraint
*
tableBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_titleButton
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
tableBottom
];
if
(
_arrowImageView
)
{
[
_arrowImageView
removeFromSuperview
];
_arrowImageView
=
nil
;
}
self
.
arrowImageView
=
[[
UIImageView
alloc
]
init
];
_arrowImageView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
addSubview
:
_arrowImageView
];
if
(
self
.
nodeData
.
levelDeep
==
1
)
{
_arrowImageView
.
image
=
[
UIImage
imageNamed
:
@"arrow_down"
];
NSLayoutConstraint
*
arrowWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_arrowImageView
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
12
.
5
];
[
self
addConstraint
:
arrowWidth
];
}
else
if
(
self
.
nodeData
.
levelDeep
==
2
)
{
_arrowImageView
.
image
=
[
UIImage
imageNamed
:
@"grey-trilateral_down"
];
NSLayoutConstraint
*
arrowWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_arrowImageView
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
11
];
[
self
addConstraint
:
arrowWidth
];
}
else
if
(
self
.
nodeData
.
levelDeep
==
3
){
//_arrowImageView.image = [UIImage imageNamed:@"white_background"];
_arrowImageView
.
hidden
=
YES
;
NSLayoutConstraint
*
arrowWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_arrowImageView
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
15
];
[
self
addConstraint
:
arrowWidth
];
}
NSLayoutConstraint
*
arrowTop
=
[
NSLayoutConstraint
constraintWithItem
:
_arrowImageView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
21
.
5
];
[
self
addConstraint
:
arrowTop
];
NSLayoutConstraint
*
arrowRight
=
[
NSLayoutConstraint
constraintWithItem
:
_arrowImageView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
addConstraint
:
arrowRight
];
NSLayoutConstraint
*
arrowHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_arrowImageView
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
7
.
5
];
[
self
addConstraint
:
arrowHeight
];
}
...
...
redstar/Classes/Module/Function/OnLine/SelectStore/View/TreeView.m
View file @
3ad1ceee
...
...
@@ -10,6 +10,8 @@
#import "TreeNodeCell.h"
#import "SelectYetTableViewCell.h"
#define kTreeNodeCell @"nodelCell"
@interface
TreeView
()
<
SelectYetDelegate
>
@property
(
nonatomic
)
NSArray
*
nodeArray
;
@end
...
...
@@ -51,6 +53,7 @@
-
(
void
)
configSelf
{
self
.
dataSource
=
self
;
self
.
delegate
=
self
;
[
self
registerClass
:[
TreeNodeCell
class
]
forCellReuseIdentifier
:
kTreeNodeCell
];
self
.
rowHeight
=
UITableViewAutomaticDimension
;
self
.
estimatedRowHeight
=
50
.
0
;
}
...
...
@@ -93,9 +96,10 @@
cell
.
textLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
return
cell
;
}
else
{
TreeNodeCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"nodeCell"
];
TreeNodeCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kTreeNodeCell
];
if
(
cell
==
nil
)
{
cell
=
[[
TreeNodeCell
alloc
]
initWithStyle
:
UITableViewCellStyleDefault
reuseIdentifier
:
@"nodeCell"
];
cell
=
[[
TreeNodeCell
alloc
]
initWithStyle
:
UITableViewCellStyleDefault
reuseIdentifier
:
kTreeNodeCell
];
}
cell
.
nodeDelegate
=
self
;
...
...
@@ -128,9 +132,21 @@
}
// 用插入和删除函数就会产生动画
if
(
node
.
nodeData
.
isExpand
==
NO
)
{
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
node
.
arrowImageView
.
transform
=
CGAffineTransformIdentity
;
node
.
arrowImageView
.
transform
=
CGAffineTransformMakeRotation
(
0
);
}];
[
self
deleteRowsAtIndexPaths
:
indexArray
withRowAnimation
:(
UITableViewRowAnimationTop
)];
}
else
{
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
node
.
arrowImageView
.
transform
=
CGAffineTransformIdentity
;
node
.
arrowImageView
.
transform
=
CGAffineTransformMakeRotation
(
-
M_PI
);
}];
[
self
insertRowsAtIndexPaths
:
indexArray
withRowAnimation
:(
UITableViewRowAnimationBottom
)];
}
...
...
redstar/Classes/Module/Function/OnLine/SelectStore/ViewController/SelectStoreViewController.m
View file @
3ad1ceee
...
...
@@ -218,7 +218,9 @@
if
(
!
_treeView
)
{
_treeView
=
[[
TreeView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kScreenWidth
,
kScreenHeight
-
64
-
70
)];
_treeView
.
treeDelegate
=
self
;
_treeView
.
tableHeaderView
=
self
.
headerView
;
// _treeView.tableHeaderView = self.headerView;
_treeView
.
tableFooterView
=
[
UIView
new
];
[
self
.
view
addSubview
:
_treeView
];
}
return
_treeView
;
...
...
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