Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crash when there's another tableview in controller #42

Closed
sameer4 opened this issue Mar 2, 2018 · 3 comments
Closed

App crash when there's another tableview in controller #42

sameer4 opened this issue Mar 2, 2018 · 3 comments

Comments

@sameer4
Copy link

sameer4 commented Mar 2, 2018

i had to use context menu on multiple screens so i made

@interface UIBaseControllerForMenu : UIViewController <UITableViewDelegate,UITableViewDataSource,YALContextMenuTableViewDelegate>

and added all menu code in this controller's m file.didn't make xib file for this controller file.

and where i needed to use it, i used
@interface UIMyAppointmentViewController : UIBaseControllerForMenu

and call the action button of UIBaseControllerForMenu from child controllers to show/init menu.it works fine in controllers without tableview of there own but crashes the app when there's a other tableview in them.issue is you are getting cell from visible cells function of tableview which returns the controller's own cell not the one belonging to menu. and try to call functions defined in YALContextMenuCell protocol and app crashes as other cells are not implementing this function.

any solution to this???

@sameer4
Copy link
Author

sameer4 commented Mar 2, 2018

sorry my mistake.i should have redirected tableview datasource calls to superview's implementations if tableview is not equal to controller's own

@sameer4 sameer4 closed this as completed Mar 2, 2018
@shraddha-patel-1891
Copy link

shraddha-patel-1891 commented Apr 7, 2019

@sameer4
i have same issue can you please give me brief answer?
Always called sub class cellfor row not called super class cellfor row.
Thanks

@shraddha-patel-1891
Copy link

@sameer4
i have same issue can you please give me brief answer?
Always called sub class cellfor row not called super class cellfor row.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants