Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CRMNetDetect
Overview
Overview
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
oc
CRMNetDetect
Commits
af056d30
Commit
af056d30
authored
Oct 18, 2024
by
GuoJianPeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
5e13f85e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletions
+29
-1
CRMNetDetect/Classes/CRMNetDetectView.m
+29
-1
No files found.
CRMNetDetect/Classes/CRMNetDetectView.m
View file @
af056d30
...
@@ -29,8 +29,11 @@
...
@@ -29,8 +29,11 @@
[
self
_initBaseCellData
];
[
self
_initBaseCellData
];
_service
=
[[
CRMNetDetectService
alloc
]
initWithDelegate
:
self
];
_service
=
[[
CRMNetDetectService
alloc
]
initWithDelegate
:
self
];
_tableView
=
[[
UITableView
alloc
]
initWithFrame
:
frame
];
_tableView
=
[[
UITableView
alloc
]
initWithFrame
:
frame
];
_tableView
.
backgroundColor
=
UIColor
.
groupTableViewBackgroundColor
;
_tableView
.
dataSource
=
self
;
_tableView
.
dataSource
=
self
;
_tableView
.
rowHeight
=
44
;
_tableView
.
rowHeight
=
44
;
_tableView
.
tableFooterView
=
[
self
_footView
];
_tableView
.
tableHeaderView
=
[
self
_headView
];
[
self
addSubview
:
_tableView
];
[
self
addSubview
:
_tableView
];
}
return
self
;
}
return
self
;
}
}
...
@@ -61,6 +64,7 @@
...
@@ -61,6 +64,7 @@
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
{
CRMNetDetectCell
*
cell
=
[[
CRMNetDetectCell
alloc
]
initWithFrame
:
CGRectZero
];
CRMNetDetectCell
*
cell
=
[[
CRMNetDetectCell
alloc
]
initWithFrame
:
CGRectZero
];
cell
.
backgroundColor
=
UIColor
.
whiteColor
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
[
cell
updateData
:
_cellDatas
[
indexPath
.
row
]];
[
cell
updateData
:
_cellDatas
[
indexPath
.
row
]];
return
cell
;
return
cell
;
...
@@ -111,7 +115,7 @@
...
@@ -111,7 +115,7 @@
-
(
UIButton
*
)
checkButton
-
(
UIButton
*
)
checkButton
{
{
if
(
!
_checkButton
){
if
(
!
_checkButton
){
_checkButton
=
[[
UIButton
alloc
]
init
WithFrame
:
CGRectMake
(
20
,
40
,
self
.
bounds
.
size
.
width
-
40
,
40
)
];
_checkButton
=
[[
UIButton
alloc
]
init
];
_checkButton
.
layer
.
cornerRadius
=
3
;
_checkButton
.
layer
.
cornerRadius
=
3
;
_checkButton
.
backgroundColor
=
UIColor
.
orangeColor
;
_checkButton
.
backgroundColor
=
UIColor
.
orangeColor
;
[
_checkButton
setTitle
:
@"重新检测"
forState
:
UIControlStateNormal
];
[
_checkButton
setTitle
:
@"重新检测"
forState
:
UIControlStateNormal
];
...
@@ -120,4 +124,28 @@
...
@@ -120,4 +124,28 @@
[
_checkButton
addTarget
:
self
action
:
@selector
(
startsChecking
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_checkButton
addTarget
:
self
action
:
@selector
(
startsChecking
)
forControlEvents
:
UIControlEventTouchUpInside
];
}
return
_checkButton
;
}
return
_checkButton
;
}
}
-
(
UIView
*
)
_footView
{
CGFloat
marginTop
=
50
;
CGFloat
marginBottom
=
20
;
CGFloat
btnHeight
=
40
;
UIButton
*
btn
=
self
.
checkButton
;
UIView
*
view
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
self
.
bounds
.
size
.
width
,
marginTop
+
marginBottom
+
btnHeight
)];
[
view
addSubview
:
btn
];
btn
.
frame
=
CGRectMake
(
20
,
marginTop
,
view
.
bounds
.
size
.
width
-
40
,
btnHeight
);
return
view
;
}
-
(
UIView
*
)
_headView
{
CGFloat
marginTop
=
20
;
CGFloat
marginBottom
=
30
;
CGFloat
btnHeight
=
60
;
CGFloat
seperateHeight
=
15
;
UIView
*
view
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
self
.
bounds
.
size
.
width
,
marginTop
+
marginBottom
+
btnHeight
)];
view
.
backgroundColor
=
UIColor
.
whiteColor
;
UIView
*
seperateView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
view
.
bounds
.
size
.
height
-
seperateHeight
,
view
.
bounds
.
size
.
width
,
seperateHeight
)];
seperateView
.
backgroundColor
=
UIColor
.
groupTableViewBackgroundColor
;
[
view
addSubview
:
seperateView
];
return
view
;
}
@end
@end
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