FSPagerView icon indicating copy to clipboard operation
FSPagerView copied to clipboard

OC使用Cocoapods导入无法加载FSPagerViewCell

Open Alfred-Cyan-Allen opened this issue 5 years ago • 1 comments

你好,OC使用Cocoapods导入FSPagerView时,FSPagerView可以正常编译,一旦使用到FSPagerViewCell就无法编译。以下是cocoapods文件: ` platform :ios, '9.0' use_frameworks! target 'ProjectName' do

pod 'FSPagerView'

end `

以下为控制器代码: ` #import "FSPagerView-Swift.h"

  • (void)viewDidLoad { // ..... // 不加cell注册以及datasource时可以正常编译 [self.pagerView registerClass:[FSPagerViewCell class] forCellWithReuseIdentifier:@"cell"]; self.pagerView.itemSize = self.pagerView.frame.size; }

  • (NSInteger)numberOfItemsInPagerView:(FSPagerView *)pagerView { return 6; }

  • (FSPagerViewCell *)pagerView:(FSPagerView *)pagerView cellForItemAtIndex:(NSInteger)index { FSPagerViewCell *cell = [pagerView dequeueReusableCellWithReuseIdentifier:@"cell" atIndex:index]; cell.imageView.image = [UIImage imageNamed:@"imageName"]; cell.imageView.contentMode = UIViewContentModeScaleAspectFill; cell.imageView.clipsToBounds = YES; cell.textLabel.text = [NSString stringWithFormat:@"%@%@",@(index),@(index)]; return cell; }

` 报错信息如下: Undefined symbols for architecture arm64: "OBJC_CLASS$__TtC11FSPagerView15FSPagerViewCell", referenced from: objc-class-ref in MyController.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

实在找不到解决办法了,求救!

Alfred-Cyan-Allen avatar Jul 08 '18 16:07 Alfred-Cyan-Allen

请问怎么解决的

ZeroJson avatar Dec 03 '20 08:12 ZeroJson