Comments (8)
i got the same issues. But i guess i managed to solve it by setting Top Bar = Opaque Navigation Bar
from kydrawercontroller.
@kohdesmond what do you mean set top bar? On which controller?
from kydrawercontroller.
@ColdLogical on the storyboard
from kydrawercontroller.
@kohdesmond Do you mean 'simulated metrics'? How can it affect for the running app?
from kydrawercontroller.
@psi-gh not quite sure but the simulated metrics affected my auto layout.
but it seems to only affect iOS 10 and it might be a "feature" with xcode 8
@ColdLogical does the weird fix works for you?
from kydrawercontroller.
+1
I have encountered the same issue.
Does anyone know how to fix it?
from kydrawercontroller.
As ColdLogical mentioned, we can avoid awkward moving by calling below
drawerController.setDrawerState(KYDrawerController.DrawerState.Opened, animated: false)
drawerController.setDrawerState(KYDrawerController.DrawerState.Closed, animated: false)
However, we could see warning also.
To avoid this.
Chage code a little bit
public func setDrawerState(_ state: DrawerState, animated: Bool) {
...
to
public func setDrawerState(_ state: DrawerState, animated: Bool, completion : (() -> ())? = nil) {
..
{ (finished: Bool) -> Void in
..
completion?()
}
And then call like this.
setDrawerState(KYDrawerController.DrawerState.opened, animated: false)
{
self.setDrawerState(KYDrawerController.DrawerState.closed, animated: false
}
You can avoid the warning.
from kydrawercontroller.
Note, calling:
drawerController.setDrawerState(KYDrawerController.DrawerState.Opened, animated: false)
drawerController.setDrawerState(KYDrawerController.DrawerState.Closed, animated: false)
Can cause an imbalance of calls to beginAppearanceTransition
/endAppearanceTransition
which can cause your app to stop presenting view controllers correctly.
Customising the KYDrawerController
to include a completion handler to 'resolve warnings' as suggested above helps to some degree (doesn't guarantee a balance of above mentioned calls).
The whole idea of opening and closing the drawer with no animation to fix a layout issue is a total hack.
@ykyouhei can you please look into this issue?
from kydrawercontroller.
Related Issues (20)
- Top most view controller ?
- swift4.2 HOT 2
- Getting black screen of main controller HOT 7
- How can i push other viewcontroller in drawercontroller? HOT 4
- Drawer won't reset to top
- KYDrawerController configure with only one tab of UITabController
- KYDrawerController's side menu no response when clicked from widget(today extension)
- Drawer View is not opening,When coming from another screen HOT 3
- It just makes my content black and top bar gray HOT 1
- Update to Swift 5.0 HOT 2
- How to disable pan gesture HOT 3
- Without storyboard
- Cannot invoke didSelectRow or canMoveRowAt in drawer viewController
- Pan Gesture has stopped working HOT 2
- preferredStatusBarStyle from child view controllers not working.
- how to stop refreshing my Home controller?
- Upgrade to latest swift version and support for SPM
- UITableView Layout issue HOT 1
- Navigating to a ViewController from AppDelegate
- UITableView layout issue.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kydrawercontroller.