Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
Opple-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
张杰
Opple-iOS
Commits
ec76ba6c
Commit
ec76ba6c
authored
May 07, 2016
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
禁止某些控制器的右滑返回
parent
ef2a915b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
0 deletions
+42
-0
ClientViewController.m
Lighting/Class/ClientViewController.m
+22
-0
ShoppingViewController.m
Lighting/Class/Shoppingcart/ShoppingViewController.m
+20
-0
No files found.
Lighting/Class/ClientViewController.m
View file @
ec76ba6c
...
...
@@ -22,6 +22,28 @@
[
self
uiConfigAction
];
}
-
(
void
)
viewDidAppear
:
(
BOOL
)
animated
{
[
super
viewDidAppear
:
animated
];
// 禁用 iOS7 返回手势
if
([
self
.
navigationController
respondsToSelector
:
@selector
(
interactivePopGestureRecognizer
)])
{
self
.
navigationController
.
interactivePopGestureRecognizer
.
enabled
=
NO
;
}
}
-
(
void
)
viewWillDisappear
:
(
BOOL
)
animated
{
[
super
viewWillDisappear
:
animated
];
// 开启
if
([
self
.
navigationController
respondsToSelector
:
@selector
(
interactivePopGestureRecognizer
)])
{
self
.
navigationController
.
interactivePopGestureRecognizer
.
enabled
=
YES
;
}
}
#pragma mark -布局
-
(
void
)
uiConfigAction
{
...
...
Lighting/Class/Shoppingcart/ShoppingViewController.m
View file @
ec76ba6c
...
...
@@ -44,6 +44,26 @@
}
-
(
void
)
viewDidAppear
:
(
BOOL
)
animated
{
[
super
viewDidAppear
:
animated
];
// 禁用 iOS7 返回手势
if
([
self
.
navigationController
respondsToSelector
:
@selector
(
interactivePopGestureRecognizer
)])
{
self
.
navigationController
.
interactivePopGestureRecognizer
.
enabled
=
NO
;
}
}
-
(
void
)
viewWillDisappear
:
(
BOOL
)
animated
{
[
super
viewWillDisappear
:
animated
];
// 开启
if
([
self
.
navigationController
respondsToSelector
:
@selector
(
interactivePopGestureRecognizer
)])
{
self
.
navigationController
.
interactivePopGestureRecognizer
.
enabled
=
YES
;
}
}
#pragma mark - UI
-
(
void
)
uiConfigAction
...
...
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