草庐IT

Union-Find

全部标签

iOS swift 'Could not find member executeFetchRequest'

在尝试将一些现有的小代码移植到Swift时,我遇到了一些问题。我可以在Objective-C中执行以下操作NSMutablArray*myMutableArray=[NSMutableArrayarray];myMutablArray=[self.managedObjectContextexecuteFetchRequest:fetchRequesterror:&error].mutableCopy;然而,在我尝试快速尝试这个时,我得到“找不到成员executeFetchRequest”classexampleTableViewController:UITableViewControl

swift -/usr/bin/ld : cannot find -lstdc++ for Ubuntu while trying to "swift build" Perfect2 project

描述:我已按照Swift3的安装步骤进行操作和Perfect2我克隆了PerfectTemplatePerfect提出的测试项目,我试过swiftbuild错误信息:warning:minimumrecommendedclangisversion3.6,otherwiseyoumayencounterlinkererrors.Linking./.build/debug/PerfectTemplate/usr/bin/ld:cannotfind-lstdc++clang:error:linkercommandfailedwithexitcode1(use-vtoseeinvocation

ios - swift 2 : error when try to find with indexOf

在全局变量部分我有这个声明varfriends:NSArray=NSMutableArray()//becauseiusethemtosharedataintotwosegues这是我的tableView函数的起始代码:overridefunctableView(tableView:UITableView,didSelectRowAtIndexPathindexPath:NSIndexPath){self.tableView.deselectRowAtIndexPath(indexPath,animated:true)letcell:UITableViewCell=tableView.

swift WKWebView : Can't find variable error when calling method

我正在尝试将GPS坐标传递给方法调用setIOSNativeAppLocation。我在下面有以下代码,但出现此错误:AJavaScriptexceptionoccurred"UserInfo={WKJavaScriptExceptionLineNumber=1,WKJavaScriptExceptionMessage=ReferenceError:Can'tfindvariable:setIOSNativeAppLocation,WKJavaScriptExceptionSourceURL=http://mywebsite.com,NSLocalizedDescription=AJa

xcode - swift 错误 : Cannot find an initializer for type 'Double' that accepts an argument list of type '(String)'

我正在尝试从标记为“temperatureTextField”的文本字段中获取数据并将其分配给“t”,这是一个Double。理想情况下,用户应该向temperatureTextField添加一个数字值。这是我的方法:@IBOutletweakvartemperatureTextField:UITextField!@IBActionfuncconvert(sender:AnyObject){lett=Double(temperatureTextField.text!)lettempM=TemperatureModel(temp:t!)temperatureTextField.text=S

ios - Swift 错误 : "Cannot find interface declaration for ' SKScene', 的父类(super class)”

免责声明:我通读了关于SO的类似问题,找不到解决我的问题的方法。我想将SKScene的子类添加到以前未使用SpriteKit的项目中。该项目是ObjC和Swift的混合体。子类是用Swift编写的。我做了什么:通过转到项目->构建阶段->添加了SpriteKit.Framework将二进制文件与库链接。我创建了一个swift类并拥有它继承自SKScene。这是新类:importSpriteKitclassSnowScene:SKScene{}请注意,该类未被代码中的其他任何地方引用。当我编译我的应用程序时,我在标题中收到错误。错误发生在我的-Swift.h文件中,该文件自动导出了新类(

ios - Xcode 6 Beta 5 swift Playground : Cannot find symbol for CGRectMake()

自从更新到Xcode6beta5后,我的Playground代码将不再编译/运行和记录:Playgroundexecutionfailed:error:Couldn'tlookupsymbols:_CGRectMake它应该足够简单并且在以前的版本上运行良好。到目前为止,我唯一运行的代码如下:importFoundationimportUIKitimportXCPlaygroundimportQuartzCoreletframeRect:CGRect=CGRectMake(0,0,500,500)varcustomView=UIView(frame:frameRect)只是想知道是否有

ios - Eroor 将 NSPredicate 与 Swift "Could not find an overload for ' init 中的 block 一起使用,它接受提供的参数”

我创建了一个条件block,只是为了用Block测试NSPredicate。我就是这样做的,如果你能在这里指导我,那将是一个很大的帮助。提前致谢。 最佳答案 您应该使用与NSPredicateblock所需的相同的函数签名。在您的情况下,您应该将代码更改为:varcondblock={(celInfo:AnyObject!,dic:NSDictionary!)->Boolinreturntrue}letpred=NSPredicate(block:condblock) 关于ios-Ero

开源 swift 项目的 Swift.org 问题。错误 : xcrun: error: unable to find utility "launch-with-toolchain", 不是开发人员工具或在 PATH 中

我正在尝试使用自定义工具链启动Xcode并启用它以使用Swift的开源版本。步骤取自Swift.org我收到这个错误:xcrun:error:unabletofindutility"launch-with-toolchain",notadevelopertoolorinPATH 最佳答案 来自https://swift.org/download/#apple-platforms的开源Swift工具链需要最新的Xcode7.2(当前:beta4)。xcrun等构建工具使用的developer目录位置必须设置为这个Xcode7.2。这可

vue3 setup + ts + vite 项目问题解决:Cannot find module ... or its corresponding type declarations.(ts2307)

昨日我尝试使用vue3setup+ts+vite进行vue3项目的实现,遇到此问题:Cannotfindmodule...oritscorrespondingtypedeclarations.(ts2307)文件报错类型以及ts官方错误说明:这里以别名"@"为例子://.vue文件importLoginApifrom'@/apis/loginApi';//(ts2307)import{getDate}from'@/utils/date';//(ts2307)//.ts文件importLoginApifrom'@/apis/loginApi';//(ts2307)2307错误Cannotfind