目前,我对YTPLayerView有一个奇怪的问题。我已经有一个同时包含Objective-C和Swift代码的项目。所以,我需要在Objective-c中使用Youtube播放器。问题是,当我在Bridging-Header中声明Objective-c View Controller时,Objective-C头文件会出现错误"'YTPlayerView.h‘file not found",但是当我的桥头为空时,这个错误就不会发生。也许我忘了一些东西包括idk。有人能帮我吗?这是我的桥接头代码:
#import "CameraViewController.h";这是我的CameraViewController.h文件:
@import UIKit;
#import "YTPlayerView.h"
@interface CameraViewController : UIViewController<YTPlayerViewDelegate>
@property(nonatomic, strong) IBOutlet YTPlayerView *playerView;
@end我已经为youtube播放器安装了podfile:
use_frameworks!
target 'MyApp' do
pod 'youtube-ios-player-helper', '~> 0.1.4'
end提前谢谢你!
发布于 2018-07-26 20:44:00
试着去做:
#import <youtube_ios_player_helper/YTPlayerView.h>https://stackoverflow.com/questions/51532819
复制相似问题