Friend-LGA / LGSideMenuController

iOS view controller which manages left and right side views
MIT License
2.05k stars 331 forks source link

Infinite loop when we reload leftmenu tableview #175

Closed bejgumshirisha closed 3 years ago

bejgumshirisha commented 5 years ago

To reload the content in leftside tableview. I added tableview reload in viewWillLayoutSubviews method but it it going to infinte loop.Any solution for left menu content reload

iDevelopper commented 5 years ago

I don't know the framework but I guess you can achieve that in a delegate method like:

- (void)willShowLeftView:(nonnull UIView *)leftView sideMenuController:(nonnull LGSideMenuController *)sideMenuController;
Friend-LGA commented 3 years ago

It is not a good idea to reload data inside viewWillLayoutSubviews method. Inside this method you should update layout of your views. You should reload data of your tableView only when it is needed for your needs, outside of render pipeline.