gpt4 book ai didi

objective-c - 使用 MWPhotoBrownser 时出错

转载 作者:行者123 更新时间:2023-12-03 08:12:07 24 4
gpt4 key购买 nike

我在使用 MWPhotoBrownser 时遇到了这个错误,我不知道如何修复它。

语义问题“找不到 SDWebImageDecoderDelegate 的协议(protocol)声明”

在文件 MWPhoto.h

#import <Foundation/Foundation.h>
#import "MWPhotoProtocol.h"
#import "SDWebImageDecoder.h"
#import "SDWebImageManager.h"

// This class models a photo/image and it's caption
// If you want to handle photos, caching, decompression
// yourself then you can simply ensure your custom data model
// conforms to MWPhotoProtocol
@interface MWPhoto : NSObject <MWPhoto, SDWebImageManagerDelegate, SDWebImageDecoderDelegate>

// Properties
@property (nonatomic, retain) NSString *caption;

// Class
+ (MWPhoto *)photoWithImage:(UIImage *)image;
+ (MWPhoto *)photoWithFilePath:(NSString *)path;
+ (MWPhoto *)photoWithURL:(NSURL *)url;

// Init
- (id)initWithImage:(UIImage *)image;
- (id)initWithFilePath:(NSString *)path;
- (id)initWithURL:(NSURL *)url;

@end

this the error

this the app test that I made to test the MWPhotoBrownser

我希望你们能帮助我。我会很高兴的。

谢谢。

最佳答案

我认为您尚未将 SDWebImage 文件导入到您的项目中。 MWPhoto.h 文件中提到了它们:

#import "SDWebImageDecoder.h"
#import "SDWebImageManager.h"

复制 MWPhotoBrowser/Libraries/SDWebImage 文件夹下的所有文件,从中克隆 MWPhotoBrowser 的 git 存储库。

关于objective-c - 使用 MWPhotoBrownser 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16743627/

24 4 0
文章推荐: microdata - schema.org/microdata - 产品还是优惠?
文章推荐: javascript - Angularjs 假后端 REST API
文章推荐: angularjs - 如何将 ng-model 绑定(bind)到 ng-checked 框
文章推荐: javascript - 如何在渲染
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com