how to get id and and another parameter from @selector?? , im trying by this but not working!
-(void)displayContent:(UIViewController *)currentView sender:(id)sender{}
and
[button addTarget:self action:@selector(displayContent:self:) forControlEvents:UIControlEventTouchUpInside];
From Cocoa Fundamentals Guide: Communicating with Objects: Target-Action in UIKit
Your method
-displayContent:sender:does not match any of those signatures, so it is not valid for passing to-[UIControl addTarget:action:forControlEvents:]. You’ll have to find another way of gettingcurrentViewinto your action, probably by using an instance variable to keep track of the current view.