草庐IT

date_found

全部标签

ios - "Unexpectedly found nil"但已使用 "print"成功检查该值。 swift

收到“意外发现nil”错误,但在检查值时-它在那里:overridefuncviewDidLoad(){super.viewDidLoad()ifwhichLink=="officiallink"{leturlStr=videoGame.offLink!leturl=NSURL(string:urlStr)!letrequest=NSURLRequest(URL:url)webView.loadRequest(request)}elseifwhichLink=="mobygamelink"{print("yoyoyo,valueishere!\(videoGame.mgLink)")l

swift - `swift test` 产生 "symbol(s) not found for architecture x86_64"链接器错误

我目前正在尝试将对Swift包管理器的支持添加到side-projectI'vebeenworkingon在尝试运行我为该项目进行的单元测试时遇到了麻烦。在XCode中运行它们时,我可以毫无问题地构建和运行我的所有单元测试;但是,当我尝试使用swifttest通过包管理器运行测试时,出现以下链接器错误:ld:symbol(s)notfoundforarchitecturex86_64:0:error:linkcommandfailedwithexitcode1(use-vtoseeinvocation) 最佳答案 我结束了figur

ios - 更新到 Xcode 10.2、Swift 5 后 `' NBPhoneNumberDesc.h ' file not found`

我正在使用podchronotruck/FlagPhoneNumber我刚刚从HighSierra/Xcode10.1/Swift4.2/Cocoapoodsv-1.5.3更新到Mojave10.14.15/Xcode10.2.1/Swift5/Cocoapoodsv-1.7.3并且我无法构建,因为在NBRegExMatcher.m文件中出现错误'NBPhoneNumberDesc.h'filenotfound升级前一切正常,我从未遇到过任何这些错误。Podfile.lock里面有这个:-FlagPhoneNumber(0.7.6):-FlagPhoneNumber/libPhoneN

g2o报错found NaN in error for edge NaN within Jacobian for edge 0x7fab3876cd10 for vertex 0

computeActiveErrors():foundNaNinerrorforedge0x7fab384f0cc0computeActiveErrors():foundNaNinerrorforedge0x7fab384f18c0computeActiveErrors():foundNaNinerrorforedge0x7fab384f1ac0computeActiveErrors():foundNaNinerrorforedge0x7fab384f26c0computeActiveErrors():foundNaNinerrorforedge0x7fab384f28c0buildSyste

uitableview - swift - 错误 : unexpectedly found nil while unwrapping an optional value

我一直在用Swift制作应用程序,但我的TableViewController类中一直出现错误。我找不到任何方法来解决此问题并不断收到此错误:overridefunctableView(tableView:UITableView?,cellForRowAtIndexPathindexPath:NSIndexPath!)->UITableViewCell!{letcell:TextTableViewCell=tableView!.dequeueReusableCellWithIdentifier("Cell",forIndexPath:indexPath!)asTextTableView

swift - 从 Parse.com 检索 PFFile 时为 "unexpectedly found nil while unwrapping an Optional value"

我在检索存储在Parse.com中的PFFile时遇到问题letuser=PFUser.currentUser()letuserImageFile=user["profileImage"]asPFFileuserImageFile.getDataInBackgroundWithBlock{(imageData:NSData!,error:NSError!)->Voidiniferror==nil{ifimageData!=nil{letimage=UIImage(data:imageData)self.profileImage.image=image}}}错误从第二行开始。“profi

ios - 在 Swift ios 中使用 vImageBuffer_initWithCGImage 时出现 "fatal error: unexpectedly found nil while unwrapping an Optional value"

我正在使用SwiftiOS8并尝试将UIImage转换为vImage_Buffer以使用Accelerate.framework执行操作。我正在尝试使用vImageBuffer_initWithCGImage进行转换,这是我尝试过的代码:funcinitvImageBufferwithUIImage(image:UIImage)->vImage_Buffer{varCGImg:CGImageRef=sunset.CGImagevarinProvider:CGDataProviderRef=CGImageGetDataProvider(CGImg)varinBitmapData:CFDa

swift - 在 swift 中解析 JSON 抛出 'fatal error: unexpectedly found nil while unwrapping an Optional value'

我正在尝试获取json对象,但无法获取这是我的代码funcloadShots(completion:((AnyObject)->Void)!){varurlString="http://ip.jsontest.com/";letsession=NSURLSession.sharedSession()letshotsUrl=NSURL(string:urlString)vartask=session.dataTaskWithURL(shotsUrl!){(data,response,error)->Voidiniferror!=nil{println(error.localizedDes

ios - Xcode - IB 可设计 : Failed to render and update auto layout (no suitable image found)

我正在尝试从.xib文件实现自定义UIView,我希望能够在我的Storyboard之一中检查该文件。但是,我收到构建时错误:IBDesignables:FailedtorenderandupdateautolayoutstatusforLoginViewController(BYZ-38-t0r):dlopen(App.app,1):nosuitableimagefound.Didfind:App.app:can'tmapunslidablesegment__TEXTto0x100000000withsize0x268000我正在使用CocoaPods,并且读到这是由于1.5版中的一

swift - 将 Etc/GMT 时间转换为 Swift Date() 全局时间

我正在尝试将日期从苹果收据转换为快速的全局日期和时间。但是我没有成功,购买时间(设备):2019-08-3022:23:44America/Los_Angeles购买时间(服务器):2019-08-3105:23:44Etc/GMT过期时间(服务器):2019-08-3105:28:44Etc/GMT当我使用Date()获取日期时,它与我的设备和上面的日期和时间完全或几乎相差几个小时。我想将今天的Date()与过期时间进行比较。我使用了下面的代码但没有成功,extensionDate{staticfuncfromAppleServer(dateString:String)->Date?