草庐IT

resolve_expression

全部标签

ios - swift fatal error : 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=3840 "Garbage at end."

我的swift程序一直有这个错误,我正在使用PHP和MySQL作为数据库。我要将数据从数据库显示到TableView。之前是可以的,但是在模拟器上运行了几次之后,我一直遇到同样的错误classHome:UIViewController,UITableViewDelegate,UITableViewDataSource{@IBOutletweakvarbtnaddclass:UIButton!@IBOutletvartableView:UITableView!varvalues:NSArray=[]funcget(){leturl=NSURL(string:"http://localho

swift - "Type of expression is ambiguous without more context"尝试创建新变量以附加数组时

我是编码和Swift的新手,现在正在尝试创建一个小型应用程序。我创建了这部分代码:overridefunctableView(tableView:UITableView,didSelectRowAtIndexPathindexPath:NSIndexPath){tableView.deselectRowAtIndexPath(indexPath,animated:true)letcell=tableView.cellForRowAtIndexPath(indexPath)varselectedSubject=toBeAddedSubjects[indexPath.row]asSubje

javascript - 在 Https 上使用 Express.js 在 Node.js 上配置 ATS

我有一个node.js服务器,它必须从使用express管理路由器的node.js应用程序接收json调用,iOS应用程序调用路由器传递json值。我还补充说,如果我在http中工作,我没有任何问题!我的问题是我无法配置苹果ATS。我该怎么办?下面我输入了Info.plist相关的代码和信息。错误:ATSDefaultConnection2018-05-1808:54:14.070nscurl[7310:57407]NSURLSession/NSURLConnectionHTTPloadfailed(kCFStreamErrorDomainSSL,-9802)Result:FAIL--

ios - 调试控制台中的 Xcode 7.3.1 '<could not resolve type>'

我的Xcode7.3.1中的Debug模式有问题,当我想在控制台中打印一些东西时,它会打印“”,或者即使我想更深入地了解对象细节,我也无法展开任何内容:有趣的是,如果我想在pod库详细信息之一中查看某些内容,我可以让一切正常工作:感谢您的帮助;) 最佳答案 我找到了答案,我的问题出在Project-Bridging-Header文件中。我之前有:#import"DeepLinkKit.h"现在我有:#import一切都在打印中;) 关于ios-调试控制台中的Xcode7.3.1'',我们

swift - Codable - arrayPropety [AnyObject] : Reference to member 'data' cannot be resolved without a contextual type

设置Codable类。AnyObjects数组产生编译错误:Referencetomember'data'cannotberesolvedwithoutacontextualtypeclassClassA:NSObject,Codable{//MARK:-Propertieslettitle:Stringletdata:[T]//dataisanarrayofeitherCodableobjectsofClassBorClassC.//MARK:-KeyesprivateenumCodingKeys:String,CodingKey{casetitlecasedata}required

ios - 为什么我会收到此错误 : Result values in '? :' expression have mismatching types '[String]?' and 'String'

所以我是swift的新手,我正在尝试使用谷歌地图。我无法弄清楚为什么这条线有效:让state=p?.administrativeArea!=nil?p?.administrativeArea:"nil6"但不是这一行:让areaOfInterest=p?.areasOfInterest!=nil?p?.areasOfInterest:"nil7"我在areaOfInterest行收到此错误消息:'?中的结果值:'表达式有不匹配的类型'[String]?'和“字符串”提前致谢。CLGeocoder().reverseGeocodeLocation(userLocation){(place

ios - Swift 中的 Facebook 登录管理器 "expression is ambiguous"错误

我正在尝试使用Swift构建IOS游戏,但在添加自定义Facebook登录按钮时遇到了问题。我在touchesEnded函数中有以下代码:letloginManager=LoginManager()loginManager.logIn([.PublicProfile],viewController:self){loginResultinswitchloginResult{case.Failed(leterror):print(error)case.Cancelled:print("Usercancelledlogin.")case.Success(letgrantedPermissio

ios - 核心数据错误 : Unsupported expression type (11, SIZE)

当我尝试创建以下NSPredicate时发生错误:letpredicate=NSPredicate(format:"size=nil")错误如下:Unsupportedexpressiontype(11,SIZE) 最佳答案 这是因为size是CoreData中的保留字。这可以像这样修复:letpredicate=NSPredicate(format:"#size=nil") 关于ios-核心数据错误:Unsupportedexpressiontype(11,SIZE),我们在Stack

Swift for 循环 "Expression type ' [[String : String]]' is ambiguous without more context

我正在尝试从字典数组中访问以下项目,但我遇到了两个问题(都是不同的方法)。字典数组初始化如下:vartestingArray=[[String:String]()]testingArray.append(["name":"Ethiopia","url":"localhost:8088"])testingArray.append(["name":"Bugatti","url":"localhost:8088"])testingArray.append(["name":"Brazil","url":"localhost:8088"])testingArray.append(["name":

ios - swift 3 : expression pattern of type 'Int' cannot match values of type 'UnsafeMutableRawPointer'

我正在将一个应用程序迁移到Swift3,但Xcode对此函数抛出错误:错误是在casecondition("contentSize",MyObservationContext)我这样做是为了更新uiwebview的内容大小varMyObservationContext=0overridefuncobserveValue(forKeyPathkeyPath:String?,ofobject:Any?,change:[NSKeyValueChangeKey:Any]?,context:UnsafeMutableRawPointer?){guardletkeyPath=keyPathelse