我有一张 map 和很多别针。我已经将图钉聚集在一起,当我放大以显示单个注释时,一切正常。 当我改为尝试缩小时,应用程序崩溃了。
我收到此错误消息,但我不是很了解这个问题。
我在谷歌和 StackOverflow 内部进行了搜索,但没有成功。
我已经看到了: iOS : App crashes when zooming out a map
谁能帮帮我? 预先感谢您能给我的所有答案。
* 由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:“* -[__NSDictionaryM setObject:forKey:]: key cannot be nil” *** 首先抛出调用栈: ( 0 CoreFoundation 0x000000010f98b1ab __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010a909f41 objc_exception_throw + 48
2 CoreFoundatio 0x000000010f9caf9c _CFThrowFormattedException + 194
3 CoreFoundation 0x000000010f89f918 -[__NSDictionaryM setObject:forKey:] + 952
4 MapKit 0x000000010be8007a -[MKNewAnnotationContainerView _existingClusterViewsForClusterID:] + 174
5 MapKit 0x000000010be7f79c -[MKNewAnnotationContainerView addAnnotationView:allowAnimation:] + 173
6 MapKit 0x000000010bdf99f0 -[MKMapView addAnnotationRepresentation:allowAnimation:] + 727
7 MapKit 0x000000010beb6420 -[MKAnnotationManager _addRepresentationForAnnotation:] + 838
8 MapKit 0x000000010beb45b2 -[MKAnnotationManager addRepresentationsForAnnotations:] + 494
9 MapKit 0x000000010bdf1661 -[MKMapView annotationContainer:requestAddingClusterForAnnotationViews:] + 675
10 MapKit 0x000000010be80260 -[MKNewAnnotationContainerView _updateClusterableAnnotationViews:withID:] + 461
11 CoreFoundation 0x000000010f90fea2 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 226
12 MapKit 0x000000010be8125e -[MKNewAnnotationContainerView updateAnnotationViewsForReason:] + 299
13 MapKit 0x000000010bf7b17a -[MKAnnotationContainerView finishAddingAnnotationViews] + 29
14 MapKit 0x000000010bdfa315 -[MKMapView annotationManager:didAddAnnotationRepresentations:] + 53
15 MapKit 0x000000010beb5737 -[MKAnnotationManager updateVisibleAnnotations] + 1876
16 MapKit 0x000000010bde81b2 -[MKMapView _didChangeRegionMidstream:] + 223
17 MapKit 0x000000010bded5a1 -[MKMapView mapLayer:didChangeRegionAnimated:] + 79
18 VectorKit 0x0000000113e09125 -[VKMapView map:didChangeRegionAnimated:] + 122
19 VectorKit 0x0000000113e84e3b __58-[VKMapCameraController zoom:withPoint:completionHandler:]_block_invoke.145 + 62
20 VectorKit 0x0000000113e3b97d -[VKAnimation stopAnimation:] + 109
21 VectorKit 0x0000000113e3bd65 -[VKTimedAnimation stopAnimation:] + 47
22 VectorKit 0x0000000113e3be47 -[VKTimedAnimation onTimerFired:] + 47
23 VectorKit 0x0000000113db5e46 _ZN2md16AnimationManager12onTimerFiredEd + 298
24 VectorKit 0x000000011405bff1 _ZN2md9MapEngine11layoutSceneEdb + 85
25 VectorKit 0x000000011405bf85 -[_MapEngineRenderQueueSource renderQueueForTimestamp:] + 27
26 VectorKit 0x000000011411d10c -[MDDisplayLayer drawToTexture:withTimestamp:completionHandler:prepareHandler:] + 139
27 VectorKit 0x000000011427222f __33-[GGLOpenGLESLayer onTimerFired:]_block_invoke + 87
28 VectorKit 0x0000000114279ad7 _ZN3ggl10OESContext17performWhileBoundEU13block_pointerFvvE + 163
29 VectorKit 0x0000000114271ff7 -[GGLOpenGLESLayer onTimerFired:] + 111
30 VectorKit 0x000000011405f031 _ZN2md9MapEngine11renderSceneEdNSt3__18functionIFvvEEE + 93
31 VectorKit 0x000000011405d8cc _ZN2md9MapEngine18onRenderTimerFiredEd + 158
32 VectorKit 0x00000001142750f8 _ZN3ggl11DisplayLink12onTimerFiredEd + 32
33 VectorKit 0x0000000114274ffa -[_GGLDisplayLinkTarget displayLinkFired:] + 81
34 QuartzCore 0x000000010c268778 _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 684
35 QuartzCore 0x000000010c3a4970 _ZL22display_timer_callbackP12__CFMachPortPvlS1_ + 248
36 CoreFoundation 0x000000010f91a9c9 __CFMachPortPerform + 169
37 CoreFoundation 0x000000010f91a909 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
38 CoreFoundation 0x000000010f91a871 __CFRunLoopDoSource1 + 465
39 CoreFoundation 0x000000010f912654 __CFRunLoopRun + 2596
40 CoreFoundation 0x000000010f9119b9 CFRunLoopRunSpecific + 409
41 GraphicsServices 0x0000000115b389c6 GSEventRunModal + 62
42 UIKit 0x000000010c523948 UIApplicationMain + 159
43 atriptoitaly 0x0000000109f3dfd7 main + 55
44 libdyld.dylib 0x0000000110ab7d81 start + 1) libc++abi.dylib: terminating with uncaught exception of type NSException
最佳答案
好吧,在寻找解决方案时我在 Apple Developer Forum 中找到了这个 https://forums.developer.apple.com/message/271061#271061
希望对大家有用
关于 swift : Crash when zoom out on map with cluster,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46880237/
当我将time.Now()编码到JSON对象时,它给出的结果为"2009-11-10T23:00:00Z"但打印时间。现在给出2009-11-1023:00:00+0000UTC。他们为什么不同。什么是T和Z。另外,如何根据this将其转换为swiftNSDate对象?表? 最佳答案 这些值的含义无关紧要,它们是该格式(ISO8601)的一部分。有几种方法可以解决这个问题。一种是为时间或您的结构定义自定义MarshalJSON()方法并使用它来格式化日期,另一种是首先在您的结构中将其表示为字符串,以便当默认实现执行你得到你正在寻找的
在C/C++/Java/Go中,我们使用,来分隔参数:(aint,bint)在ObjectiveC中,我们使用:来表示参数::(int)a:(int)b在Swift中,我们必须同时使用:和,:(a:int,b:int)是否需要冗余? 最佳答案 Swift可能有外部和内部参数名称:(externalinternal:Int)如果没有独特的分隔符,会产生很多歧义。 关于objective-c-为什么Swift函数定义语法是多余的?,我们在StackOverflow上找到一个类似的问题:
我的Swift应用程序与用Go编写的服务器通信。我希望使用Zlib压缩传输的数据,但压缩结果似乎与Swift和Go不同。这是Go版本:sourceString:="A-t-ellebesoind'autrespreuves?Acceptez-lapourleplaisir.J'aitantfaitquedelacueillir,Etc'estpresqueunefleur-des-veuves."//Compressionvarbbytes.Bufferwriter:=zlib.NewWriter(&b)writer.Write([]byte(sourceString))writer.
我正在使用rsaEncryptionOAEPSHA256AESGCM在iOS上使用SecKeyCreateEncryptedData加密一些数据,然后在golang后端解密相同的数据。我正在使用3072位rsa公钥来加密对称key。当我从iOS获取数据到后端时,我能够成功解密对称key,但gcm标签验证失败。我使用的是与iOS相同的16字节IV,但不知道iOS在加密时是否使用任何aad(附加身份验证数据)。有谁知道rsaEncryptionOAEPSHA256AESGCMforiOS是否使用了一些aad?这适用于iOS10+。我已经尝试过使用nil、空的16字节数组、aeskey本身、
我使用swiftyJSON从apiurl消费OData。这里的apiurl与VPN连接。并且apiurl看起来像http://192.xxx.xx.xx:8000/sap/opu/odata/sap/Z_SRV/PRListSetSet?$format=json当我在模拟器中运行时,我可以从odataapiurl获取数据,但是在设备中运行时,没有从odataapiurl接收到数据。由于没有vpn连接到移动设备。我如何以编程方式对我的VPN进行硬编码以在移动设备中接收数据?这是我如何从ODataapiurl获取数据:typealiasServiceResponse=(JSON,Error
我正在开发一个涉及一些XML解析的自定义框架,使用Kanna框架。每当我尝试将我的框架导入playground时,playground就会崩溃并出现以下错误:Playgroundexecutionfailed:expressionfailedtoparse,unknownerror*thread#1:tid=0x4e9448,0x00000001074bf360com.apple.dt.Xcode.PlaygroundStub-macosx`executePlayground,queue='com.apple.main-thread',stopreason=breakpoint1.1*
我尝试在Windows10上的Ubuntu上的bash上安装Swift4我的Ubuntu版本:我@DESKTOP:~$lsb_release-a没有可用的LSB模块。经销商ID:Ubuntu描述:Ubuntu16.04.3LTS发布:16.04代号:xenial我做了apt-getupgrade和apt-getupdate我遵循Linux步骤here:安装Swift4最终我得到了错误:我@DESKTOP:~$swift/home/me/swift4/swift-4.0.2-RELEASE-ubuntu16.04/usr/bin/lldb:加载共享库时出错:libpython2.7.so
概述音视频采集是直播架构的第一步音视频采集包括两部分视频采集音频采集iOS开发中,同音视频采集相关API都封装在AVFoundation中,导入该框架,即可实现音频、视频的同步采集采集步骤采集步骤文字描述导入框架同采集相关API在AVFoundation中,因此需要先导入框架创建捕捉会话(AVCaptureSession)会话:用于连接输入源、输出源输入源:摄像头、麦克风输出源:对应的视频、音频数据设置视频输入源、输出源输入源(AVCaptureDeviceInput):从摄像头输入(前置/后置)输出源(AVCaptureVideoDataOutput):可从代理方法中拿到数据将输入源、输出源
前言本期是Swift编辑组自主整理周报的第七期,每个模块已初步成型。各位读者如果有好的提议,欢迎在文末留言。欢迎投稿或推荐内容。目前计划每两周周一发布,欢迎志同道合的朋友一起加入周报整理。当你来到双水村以外的大世界,你的人生目标便不单单是一名庄稼人了。Swift社区陪你一起成长,一起创造更多可能!👊👊👊周报精选新闻和社区:【挑战上岛】适配实时活动和灵动岛提案:函数反向部署Swift论坛:围绕Swift6lock展开的讨论推荐博文:推荐500+款AppUI设计工具推荐:妙言话题讨论:如果您年龄超过35岁被裁员,再入职时能接受降薪吗?新闻和社区挑战上岛:适配实时活动和灵动岛Apple大中华区设计与
我的swiftmailer有问题,它没有向用户发送消息我将库提取到我网站的inc文件夹并创建了以下消息供swiftmailer发送:注意:如果您可以建议除SwiftMailer之外的其他解决方案,请发表评论。require_once'inc/lib/swift_required.php';//CreatetheTransport$transport=Swift_SmtpTransport::newInstance('mail.mywebsite.com',25)->setUsername('info@mywebsite.com')->setPassword('myPassword');