简体   繁体   中英

Cannot find protocol declaration for UIScrollViewDelegate

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.

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

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

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM