I have a problem with protocols. I have a class like this :
@class SideToolBarDelegate;
@interface AuthentificationViewController : UIViewController <ASIHTTPRequestDelegate, UITextFieldDelegate,SideToolBarDelegate> {
}
...
I would like that my class “AuthentificationViewController” conforms to the protocol “SideToolBarDelegate” just i am in the iPhone version and not to conform it i am in the iPad version. How i can declare this ? thanks.
You can make some defins set in project properties and use ifdefs. Like:
But this is old C way. It is a very bad idea to do this in program conforming to Object Oriented Application Design. In this case you have two more ways:
After all I suggest making two classes for viewControllers:
Just think of future debugging of your code!