CoderMJLee / MJRefresh

An easy way to use pull-to-refresh.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Duplicate interface definition for class 'MJRefreshHeader'

HebeTienCoder opened this issue · comments

Duplicate interface definition for class 'MJRefreshHeader'

使用Cocoapods安装,最新版3.7.5,编译出现这个,开启了 use_frameworks!,3.7.2没有这个问题

# Uncomment the next line to define a global platform for your project
platform :ios, '11.0'
inhibit_all_warnings!

source 'https://github.com/CocoaPods/Specs.git'

target 'LY_Intelligence' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  use_frameworks!

  # Pods for LY_Intelligence
  pod 'ReactiveObjC'
  pod 'Masonry'
  pod 'WCDB'
  pod 'MJRefresh'
  pod 'AFNetworking'
  pod 'SDWebImage'
  pod 'CTNetworking'
  pod 'JLRoutes'
  pod 'YYModel'
  pod 'AMap3DMap'
  pod 'AMapLocation'
  pod 'IQKeyboardManager'
  pod 'UMCommon'
  pod 'UMDevice'
  pod 'UMAPM'
  pod 'UMPush'
  pod 'Shimmer'
  pod 'UMShare/Social/WeChat'
  pod 'UMShare/Social/QQ'
  pod 'UMLink'
  pod 'LookinServer', :configurations => ['Debug']

end
commented

方便传个 Demo 吗? 我这边好像不能复现这个问题
不管加还是不加 use_frameworks!

找到问题了,创建MJRefreshHeader的子类TestRefreshHeader,
以前可以#import "MJRefreshHeader.h"
现在需要#import <MJRefresh/MJRefresh.h>或#import <MJRefresh.h>

commented

直接 @import MJRefresh; 即可

项目里用了WCDB,不能用@import MJRefresh;这种写法