fahidattique55 / FAPanels

FAPanels - Swift
Apache License 2.0
851 stars 90 forks source link

Side Menu Not Updating Value While App Runing #77

Open Sulemanali511 opened 4 years ago

Sulemanali511 commented 4 years ago

When ever i change the profile image or username from profile section response successful and change the name on all place except on left side menu i replace the username text of UILabel in view did load of side menu

venkateshaelegenie commented 3 years ago

I am also facing this issue,My values are not updating in side menu.For the first time only it's fetching values later it's not updating.

venkateshaelegenie commented 3 years ago

Finally i found the solution that We need to add leftPanelVC?.viewWillAppear(true) in FAPanel+Animations.swift under the loadLeftPanel() like this

if isLeftPanelOnFront { leftPanelVC?.viewWillAppear(true) view.bringSubviewToFront(leftPanelContainer) }

rizwanadev commented 3 years ago

you can use delegate method to update UI when leftvc will appear like this

import FAPanels

class MenuViewController : FAPanelStateDelegate{
    override func viewDidLoad() {
        super.viewDidLoad()
        panel?.delegate = self
    }

    func leftPanelWillBecomeActive() {
        self.setData() //update ui
    }
}