Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shopify_iossdk
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
cemarose
shopify_iossdk
Commits
8e062cb6
Commit
8e062cb6
authored
Oct 09, 2015
by
Rune Madsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix inset issue when presented with a navigation controller toolbar and/or tab bar
parent
cc556543
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
BUYProductView.m
Mobile Buy SDK/Mobile Buy SDK/Product View/BUYProductView.m
+2
-2
BUYProductViewController.m
...DK/Mobile Buy SDK/Product View/BUYProductViewController.m
+5
-0
No files found.
Mobile Buy SDK/Mobile Buy SDK/Product View/BUYProductView.m
View file @
8e062cb6
...
...
@@ -173,7 +173,7 @@
options
:
0
metrics
:
nil
views:
NSDictionaryOfVariableBindings
(
_productViewFooter
)]];
[
self
addConstraints
:[
NSLayoutConstraint
constraintsWithVisualFormat
:
@"V:[_productViewFooter]|"
[
self
addConstraints
:[
NSLayoutConstraint
constraintsWithVisualFormat
:
@"V:[_productViewFooter]
-
|"
options
:
0
metrics
:
nil
views:
NSDictionaryOfVariableBindings
(
_productViewFooter
)]];
...
...
@@ -203,7 +203,7 @@
-
(
void
)
layoutSubviews
{
[
super
layoutSubviews
];
[
self
setInsets
:
UIEdgeInsetsMake
(
self
.
tableView
.
contentInset
.
top
,
self
.
tableView
.
contentInset
.
left
,
CGRectGetHeight
(
self
.
productViewFooter
.
frame
),
self
.
tableView
.
contentInset
.
right
)
appendToCurrentInset
:
NO
];
[
self
setInsets
:
UIEdgeInsetsMake
(
self
.
tableView
.
contentInset
.
top
,
self
.
tableView
.
contentInset
.
left
,
CGRectGetHeight
(
self
.
bounds
)
-
CGRectGetMinY
(
self
.
productViewFooter
.
frame
),
self
.
tableView
.
contentInset
.
right
)
appendToCurrentInset
:
NO
];
}
-
(
void
)
setTheme
:
(
BUYTheme
*
)
theme
...
...
Mobile Buy SDK/Mobile Buy SDK/Product View/BUYProductViewController.m
View file @
8e062cb6
...
...
@@ -90,6 +90,7 @@ CGFloat const BUYMaxProductViewHeight = 640.0;
{
self
=
[
super
initWithClient
:
client
];
if
(
self
)
{
self
.
theme
=
theme
?
:
[[
BUYTheme
alloc
]
init
];
self
.
modalPresentationStyle
=
UIModalPresentationCustom
;
...
...
@@ -177,6 +178,10 @@ CGFloat const BUYMaxProductViewHeight = 640.0;
[
super
viewWillAppear
:
animated
];
[
self
setupNavigationBarAppearance
];
[
self
.
navigationController
setNavigationBarHidden
:
self
.
isLoading
];
CGFloat
bottomMargin
=
0
;
bottomMargin
+=
self
.
tabBarController
?
CGRectGetHeight
(
self
.
tabBarController
.
tabBar
.
bounds
)
:
0
;
bottomMargin
+=
self
.
navigationController
.
isToolbarHidden
?
0
:
CGRectGetHeight
(
self
.
navigationController
.
toolbar
.
bounds
);
_productView
.
layoutMargins
=
UIEdgeInsetsMake
(
self
.
productView
.
layoutMargins
.
top
,
self
.
productView
.
layoutMargins
.
left
,
bottomMargin
,
self
.
productView
.
layoutMargins
.
right
);
}
-
(
void
)
viewDidLayoutSubviews
...
...
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