Swift: Redundant Viewcontroller Compliance with UIGestureRecognizerDelegate

I want to add two frames SWRevealViewControllerand SLKTextViewController, but I get this strange error.

I read about this error, but it seems confusing.

Redundant Viewcontroller Compliance with UIGestureRecognizerDelegate

class Viewcontroller: SLKTextViewController,SWRevealViewControllerDelegate,UIGestureRecognizerDelegate {

    // a lot of functions and code

}
+4
source share
1 answer

The cause of the error is that you are trying to match UIGestureRecognizerDelegatetwice. Once explicitly wrote it at the beginning and the second time, expanding SLKTextViewController, which already corresponds to it - the source codeSLKTextViewController consists of the following line:

NS_CLASS_AVAILABLE_IOS(7_0) @interface SLKTextViewController : UIViewController <UITextViewDelegate, UITableViewDelegate, UITableViewDataSource, UICollectionViewDelegate, UICollectionViewDataSource, UIGestureRecognizerDelegate, UIAlertViewDelegate>

UIGestureRecognizerDelegate!

: UIGestureRecognizerDelegate,

class Viewcontroller : SLKTextViewController, SWRevealViewControllerDelegate {
+10

Source: https://habr.com/ru/post/1607097/


All Articles