gpt4 book ai didi

objective-c - 我该如何解决 'Semantic Issue'

转载 作者:太空宇宙 更新时间:2023-11-03 23:02:05 25 4
gpt4 key购买 nike

我已经下载了一个模板 here

我有 XCode 4.6 当我运行它时我得到以下信息:

 + (UIImage *)imageWithCVMat:(const cv::Mat&)cvMat orientation:(UIImageOrientation)orientation
{
return [[UIImage alloc] initWithCVMat:cvMat orientation:orientation];
}

+ (UIImage *)imageWithCVMat:(const cv::Mat&)cvMat
{
return [[UIImage alloc] initWithCVMat:cvMat orientation:0];
}

我得到了错误

Cannot initialize a parameter of type 'UIImageOrientation' with an value of type 'int'

我该如何解决?也许有人知道

最佳答案

错误是关于在您的第二个便捷方法中使用 0

当没有给出时选择默认方向

+ (UIImage *)imageWithCVMat:(const cv::Mat&)cvMat {
return [[UIImage alloc] initWithCVMat:cvMat orientation:UIImageOrientationUp];
}

关于objective-c - 我该如何解决 'Semantic Issue',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15091436/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com