Swift - SDWebImage / Duplicate WebCache Category Definition

When I imported the SDWebImage structure into my project.

I get 2 warning messages.

Everyone says 'Duplicate definition of category "WebCache" on interface "UIImageView" '

In addition, there is also the featured 'In module "WebImage" import from <built-in>:1: '

How to hide or make sure that it will no longer be displayed?

Note:

The Framework is imported and linked to binary files. And I use swift so that I also "#import 《SDWebImage/UIImageView+WebCache.h》 " bridge → "#import 《SDWebImage/UIImageView+WebCache.h》 "

+5
source share
1 answer

Use @import SDWebImage; instead of #import <SDWebImage/UIImageView+WebCache.h> (not only in the bridge file, but anywhere in your project).

+8
source

All Articles