Comments (6)
If I remember correctly, the reason I got the retain cycle was that the FloatingPanelLayout and the parent VC were one and the same, i.e. I didn't create a separate class that implemented FloatingPanelLayout, but instead had my parent VC implement that protocol.
from floatingpanel.
Great! It's no big deal, once I figured out why it happened :)
from floatingpanel.
I think I figured out the issue. I'm returning my VC in the FloatingPanelControllerDelegate method floatingPanel(_ vc: FloatingPanelController, layoutFor newCollection: UITraitCollection). My VC is then retained by the FloatingPanel's layoutAdapter property, which probably creates the retain cycle.
So, the solution seems to be to NOT use the parent VC as FloatingPanelLayout... I did this, since I needed some properties and logic located in my VC in my FloatingPanelLayout instance, but that wasn't a good idea...
from floatingpanel.
Thank you for your helpful report! I appreciate it π
I will try to fix the retain cycle issue.
from floatingpanel.
I might misunderstood your comments. On the master branch(head: cb54a2a
), I think this issue could be solved by that FloatingPanelLayout instance has a weak reference to a parent vc.
from floatingpanel.
Oh, now I understand. Unfortunately, it's a defect in the library design ..π
But the library will be able to notice the retain cycle on the case when a user add a panel to a parent view controller applying FloatingPanelLayout.
I'm going to add a code to print the warning when the case is detected.
from floatingpanel.
Related Issues (20)
- UIRefreshControl and FloatingPanel HOT 2
- There is an extra safe area scroll for table view HOT 2
- how to presented modally ViewController on floating panel
- Question about how to change the animation when displaying
- Issues after migrating to 2.0 HOT 1
- Transition to layout with a single anchor breaks panel behavior HOT 2
- Dismiss action does not remove contentViewController? HOT 2
- I can't find version 2.8.0 in pod search
- Extend or override backdropview HOT 5
- cannot respond to the didSelectItemAt | didSelectRowAt method
- Change backdropAlpha for FloatingPanelLayout blocks parent ViewController
- Small Devices (iPhone SE) Library won't add space for grabber HOT 3
- Second floating panel doesn't update to width of landscape view HOT 3
- SWIFTUI supports
- Is it possible to disable attraction between anchors? HOT 1
- Any support of Privacy Manifest? HOT 2
- γFixedγiPhone SE 2nd scroll lock HOT 1
- [SwiftUI] UIViewControllerRepresentable HOT 1
- Adaptive Layout doesn't work with compositional layout of collection view HOT 4
- Tracking WebView is broken in iOS 17.4.x HOT 5
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 floatingpanel.