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
11b26e92
Commit
11b26e92
authored
9 years ago
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善在线抽查权限
parent
e0627ecd
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
159 additions
and
55 deletions
+159
-55
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
LookOnLineDetailViewController.m
...ineDetail/ViewController/LookOnLineDetailViewController.m
+48
-0
HomeViewController.m
...r/Classes/Module/Home/ViewController/HomeViewController.m
+111
-55
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
11b26e92
No preview for this file type
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/OnLine/LookOnLineDetail/ViewController/LookOnLineDetailViewController.m
View file @
11b26e92
...
@@ -321,12 +321,18 @@
...
@@ -321,12 +321,18 @@
cell
.
photoButton2
.
tag
=
22011
;
cell
.
photoButton2
.
tag
=
22011
;
[
cell
.
photoButton2
addTarget
:
self
action
:
@selector
(
createImagePicker
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
photoButton2
addTarget
:
self
action
:
@selector
(
createImagePicker
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
// UILongPressGestureRecognizer *longGR = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longClick:)];
// [cell.photoButton1 addGestureRecognizer:longGR];
// cell.contentView.backgroundColor = [UIColor orangeColor];
return
cell
;
return
cell
;
}
else
{
}
else
{
InspectAddCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kOnLineInspectAddCell
];
InspectAddCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kOnLineInspectAddCell
];
if
(
!
cell
)
{
if
(
!
cell
)
{
cell
=
[[
InspectAddCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kOnLineInspectAddCell
];
cell
=
[[
InspectAddCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kOnLineInspectAddCell
];
}
}
cell
.
photoButton
.
tag
=
22001
;
cell
.
photoButton
.
tag
=
22001
;
[
cell
.
photoButton
addTarget
:
self
action
:
@selector
(
createImagePicker
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
photoButton
addTarget
:
self
action
:
@selector
(
createImagePicker
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
...
@@ -347,6 +353,8 @@
...
@@ -347,6 +353,8 @@
cell
.
photoButton1
.
tag
=
1118
+
(
indexPath
.
row
)
*
2
;
cell
.
photoButton1
.
tag
=
1118
+
(
indexPath
.
row
)
*
2
;
[
cell
.
photoButton1
setImage
:
image00
forState
:
UIControlStateNormal
];
[
cell
.
photoButton1
setImage
:
image00
forState
:
UIControlStateNormal
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
NSString
*
imageName1
=
_imageNameArray
[(
indexPath
.
row
)
*
2
+
1
];
NSString
*
imageName1
=
_imageNameArray
[(
indexPath
.
row
)
*
2
+
1
];
NSString
*
fullPath1
=
[[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Documents"
]
stringByAppendingPathComponent
:
imageName1
];
NSString
*
fullPath1
=
[[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Documents"
]
stringByAppendingPathComponent
:
imageName1
];
...
@@ -355,6 +363,13 @@
...
@@ -355,6 +363,13 @@
[
cell
.
photoButton2
addTarget
:
self
action
:
@selector
(
showLookOnLinePic
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
photoButton2
addTarget
:
self
action
:
@selector
(
showLookOnLinePic
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
cell
.
photoButton2
.
tag
=
1118
+
(
indexPath
.
row
)
*
2
+
1
;
cell
.
photoButton2
.
tag
=
1118
+
(
indexPath
.
row
)
*
2
+
1
;
[
cell
.
photoButton2
setImage
:
image11
forState
:
UIControlStateNormal
];
[
cell
.
photoButton2
setImage
:
image11
forState
:
UIControlStateNormal
];
// UILongPressGestureRecognizer *longGR = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longClick:)];
//
// [cell.photoButton1 addGestureRecognizer:longGR];
// [cell.photoButton2 addGestureRecognizer:longGR];
return
cell
;
return
cell
;
}
}
...
@@ -362,6 +377,39 @@
...
@@ -362,6 +377,39 @@
}
}
-
(
void
)
longClick
:
(
UIGestureRecognizer
*
)
longGR
{
if
(
longGR
.
state
==
UIGestureRecognizerStateBegan
)
{
// 获取到点击的显示图片的按钮
UIButton
*
showButton
=
(
UIButton
*
)
longGR
.
view
;
// 创建长按删除的按钮
UIButton
*
deleteButton
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
deleteButton
.
tag
=
5521
+
(
showButton
.
tag
-
1118
);
deleteButton
.
backgroundColor
=
[
UIColor
redColor
];
deleteButton
.
bounds
=
CGRectMake
(
0
,
0
,
20
,
20
);
[
deleteButton
addTarget
:
self
action
:
@selector
(
deletePicture
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
deleteButton
.
frame
=
CGRectMake
(
showButton
.
frame
.
size
.
width
-
deleteButton
.
frame
.
size
.
width
,
0
,
deleteButton
.
frame
.
size
.
width
,
deleteButton
.
frame
.
size
.
height
);
[
showButton
addSubview
:
deleteButton
];
}
}
// 删除图片
-
(
void
)
deletePicture
:
(
UIButton
*
)
button
{
// 从存放所有Image的数组里移除当前点击的Image
[
self
.
imageNameArray
removeObjectAtIndex
:(
button
.
tag
-
5521
)];
if
((
_imageNameArray
.
count
+
1
)
%
2
==
0
)
{
_rowNumber
--
;
[
self
.
tableView
reloadData
];
}
else
{
[
self
.
tableView
reloadData
];
}
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
{
return
CGFLOAT_MIN
;
return
CGFLOAT_MIN
;
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Home/ViewController/HomeViewController.m
View file @
11b26e92
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