I want to add two frameworks SWRevealViewController
and SLKTextViewController
but I get this weird error.
I read about this error but it seems confusing.
Redundant conformance of Viewcontroller to protocol UIGestureRecognizerDelegate
class Viewcontroller: SLKTextViewController,SWRevealViewControllerDelegate,UIGestureRecognizerDelegate {
// a lot of functions and code
}
The reason for the error is that you try to conform to the UIGestureRecognizerDelegate
two times. One time explictily be writing it in the beginning and the second time by extending SLKTextViewController
which already conforms to it - the source code of SLKTextViewController
consists of the following line:
NS_CLASS_AVAILABLE_IOS(7_0) @interface SLKTextViewController : UIViewController <UITextViewDelegate, UITableViewDelegate, UITableViewDataSource, UICollectionViewDelegate, UICollectionViewDataSource, UIGestureRecognizerDelegate, UIAlertViewDelegate>
which among other protocols already lists the UIGestureRecognizerDelegate
!
Solution: remove the UIGestureRecognizerDelegate
by changing your code to
class Viewcontroller : SLKTextViewController, SWRevealViewControllerDelegate {
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