You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It can take a lot of memory (about 400Mb) and CPU 50%, how I can delete magnetic when the user doesn't need it? magnetic!.removeAllChildren() magnetic!.removeFromParent() magnetView.removeFromSuperview()
It doesn't help https://imgur.com/a/Xy3NM5q screens after open view with magnetic views
And implementation of magnetic view (i have 4 magnetic views there, but user needs it only for a while, also i have this with tab bar so i'm not able to dismiss view) @IBOutlet weak var magneticView: UIView! @IBOutlet weak var nextMagneticButton: UIButton! weak var magnetic: Magnetic? var magnetView: MagneticView! func loadMagnetic(){ view.removeGestureRecognizer(tapGesture) magnetView = MagneticView(frame: self.magneticView.bounds) magnetView.backgroundColor = .clear magnetic = magnetView.magnetic magnetic!.magneticDelegate = self self.magneticView.addSubview(magnetView) self.magneticView.bringSubviewToFront(nextMagneticButton) magnetic!.backgroundColor = .clear for i in 0..<stylesText.count{ let node = Node(text: stylesText[i], image: nil, color: UIColor.init(hexFromString: "FFFFFF", alpha: 0.15), radius: 50) self.magnetic!.addChild(node) }
Environment
iOS Version: [13.3.1]
Device(s): [iPhone XS Max]
The text was updated successfully, but these errors were encountered:
New Issue Checklist
Issue Description
It can take a lot of memory (about 400Mb) and CPU 50%, how I can delete magnetic when the user doesn't need it?
magnetic!.removeAllChildren() magnetic!.removeFromParent() magnetView.removeFromSuperview()
It doesn't help
https://imgur.com/a/Xy3NM5q screens after open view with magnetic views
And implementation of magnetic view (i have 4 magnetic views there, but user needs it only for a while, also i have this with tab bar so i'm not able to dismiss view)
@IBOutlet weak var magneticView: UIView! @IBOutlet weak var nextMagneticButton: UIButton! weak var magnetic: Magnetic? var magnetView: MagneticView! func loadMagnetic(){ view.removeGestureRecognizer(tapGesture) magnetView = MagneticView(frame: self.magneticView.bounds) magnetView.backgroundColor = .clear magnetic = magnetView.magnetic magnetic!.magneticDelegate = self self.magneticView.addSubview(magnetView) self.magneticView.bringSubviewToFront(nextMagneticButton) magnetic!.backgroundColor = .clear for i in 0..<stylesText.count{ let node = Node(text: stylesText[i], image: nil, color: UIColor.init(hexFromString: "FFFFFF", alpha: 0.15), radius: 50) self.magnetic!.addChild(node) }
Environment
The text was updated successfully, but these errors were encountered: