Skip to content

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

@shraddha-patel-1891

Description

@shraddha-patel-1891

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

@interface navigationMenu : 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 : navigationMenu

and call the action button of navigationMenu 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???

i have applied many solutions but current view controller data source and delegate reference not remove when load context menu again and tableview datasouce as well delegate method call of child view controller not parent view controller.

please help me it's urgent.

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions