I have been using the VKSideMenu library for implementing slide menu. I have a created a button click for animating the same. The code was working perfectly before iOS 11 but since when I updated my iPhone to iOS11 the app gets crashed whenever I clicked on the button. Adding an exception breakpoint helped me to find out where the cause is but I could not found the reason for that cause anywhere .
In the VKSideMenu.m
file, I got the issue at
[self.view addSubview:self.tableView];
where the self.tableView
indicates the tableview for displaying the menu.
But the tableview
was not nil.
After hours of sitting, I finally got the solution. Replace this line
[self.view addSubview:self.tableView];
with
[[(UIVisualEffectView *)self.view contentView] addSubview:self.tableView];
If you want to add a subview ( for e.g., a subview named subViewName) to that view, you have to add this:
[[(UIVisualEffectView *)self.view contentView] addSubview:subViewName];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With