Cannot find protocol declaration for UIScrollViewDelegate

456 views Asked by At

Whenever I try to compile my Xcode project I get error cannot find protocol declaration for UIScrollViewDelegate

I have cleaned my project multiple times but nothing seems to solve the issue.

Also I have an error could not build module UIKit I am unable to fix the issue for long as my project does not build.

3

There are 3 answers

0
Ronak Chaniyara On

Try following may be it will help:

  1. Removing and adding UIKit.framework in Build Phases -> Link Binary With Libraries.

  2. Check that you have not typed anything or modified anything in UIKit.framework header files.

    May be in UIKit.framework-->Headers-->UIScrollView.h in your case.

1
shallowThought On

To be able to build UIKit again, Clean derived data.

Once it has been build the delegate will be found also.

0
Ketan Parmar On

Make sure that you haven't made any changes in Foundation framework accidentally!!! I mean in any class of UIKit!!

If above is not the case then full clean and deleting derived data should work!

You couldn't building UIKIt so you are unable to find UIScrollViewDelegate I think, but it's depends on another cases also!