{"id":261,"date":"2016-02-29T22:46:27","date_gmt":"2016-02-29T14:46:27","guid":{"rendered":"http:\/\/www.yusian.com\/blog\/?p=261"},"modified":"2016-07-13T16:47:51","modified_gmt":"2016-07-13T08:47:51","slug":"bmkgradient-generatecolormapresultcolormap-unrecognized-selector-sent-to-instance-0x7fae64f32260","status":"publish","type":"post","link":"https:\/\/www.yusian.com\/blog\/analysis\/2016\/02\/29\/224627261.html","title":{"rendered":"[BMKGradient generateColorMap:resultColorMap:]: unrecognized selector sent to instance 0x7fae64f32260"},"content":{"rendered":"<p><strong>[BMKGradient generateColorMap:resultColorMap:]: unrecognized selector sent to instance 0x7fae64f32260<\/strong><\/p>\n<p>\u5982\u9898\uff0c\u8fd9\u4e48\u6076\u5fc3\u7684\u4e00\u4e2a\u95ee\u9898\uff0c\u627e\u4e86\u597d\u4e45\uff0c\u767e\u5ea6\u4e0a\u4e5f\u627e\u4e0d\u5230\u76f8\u5173\u7b54\u6848\uff0c\u6700\u540e\u8fd8\u662f\u95eeGoogle\u95ee\u51fa\u6765\u7684\uff01<\/p>\n<p><strong><span style=\"color: red;\">\u89e3\u51b3\u65b9\u6848\u662f\u5728Build Settings&#8211;Linking&#8211;[Other Linker Flags]\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u201c-ObjC\u201d,\u5373\u53ef\u641e\u5b9a\uff01<\/span><\/strong><\/p>\n<p>\u9644\u52a0\u767e\u5ea6\u6dfb\u52a0\u70ed\u529b\u56fe\u7684demo\u65b9\u6cd5\uff1a<!--more--><\/p>\n<pre lang=\"objc\" line=\"1\">BMKHeatMap* heatMap = [[BMKHeatMap alloc] init];\nNSMutableArray* data = [NSMutableArray array];\nint num = 1000;\nfor(int i = 0; i<num; i++)\n{\n????\/\/\u521b\u5efaBMKHeatMapNode\n????BMKHeatMapNode* heapmapnode_test = [[BMKHeatMapNode alloc] init];\n????\/\/\u6b64\u5904\u793a\u4f8b\u4e3a\u968f\u673a\u751f\u6210\u7684\u5750\u6807\u70b9\u5e8f\u5217\uff0c\u5f00\u53d1\u8005\u4f7f\u7528\u81ea\u6709\u6570\u636e\u5373\u53ef\n????CLLocationCoordinate2D coor;\n????float random = (arc4random()%1000)*0.001;\n????float random2 = (arc4random()%1000)*0.003;\n????float random3 = (arc4random()%1000)*0.015;\n????float random4 = (arc4random()%1000)*0.016;\n????if(i%2==0){\n????????coor.latitude = 39.915+random;\n????????coor.longitude = 116.403+random2;\n????}else{\n????????coor.latitude = 39.915-random3;\n????????coor.longitude = 116.403-random4;\n????}\n????heapmapnode_test.pt = coor;\n????\/\/\u968f\u673a\u751f\u6210\u70b9\u5f3a\u5ea6\n????heapmapnode_test.intensity = arc4random()*900;\n????\/\/\u6dfb\u52a0BMKHeatMapNode\u5230\u6570\u7ec4\n????[data addObject:heapmapnode_test];\n}\n\/\/\u5c06\u70b9\u6570\u636e\u8d4b\u503c\u5230\u70ed\u529b\u56fe\u6570\u636e\u7c7b\nheatMap.mData = data;\n\/\/\u8c03\u7528mapView\u4e2d\u7684\u65b9\u6cd5\u6839\u636e\u70ed\u529b\u56fe\u6570\u636e\u6dfb\u52a0\u70ed\u529b\u56fe\n[self.mapView addHeatMap:heatMap];<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>[BMKGradient generateColorMap:resultColorMap:]: unrecognized selector sent to instance 0x7fae64f32260 \u5982\u9898\uff0c\u8fd9\u4e48\u6076\u5fc3\u7684\u4e00\u4e2a\u95ee\u9898\uff0c\u627e\u4e86\u597d\u4e45\uff0c\u767e\u5ea6\u4e0a\u4e5f\u627e\u4e0d\u5230\u76f8\u5173\u7b54\u6848\uff0c\u6700\u540e\u8fd8\u662f\u95eeGoogle\u95ee\u51fa\u6765\u7684\uff01 \u89e3\u51b3\u65b9\u6848\u662f\u5728Build Settings&#8211;Linking&#8211;[Other Linker Flags]\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u201c-ObjC\u201d,\u5373\u53ef\u641e\u5b9a\uff01 \u9644\u52a0\u767e\u5ea6\u6dfb\u52a0\u70ed\u529b\u56fe\u7684demo\u65b9\u6cd5\uff1a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-261","post","type-post","status-publish","format-standard","hentry","category-analysis"],"_links":{"self":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/comments?post=261"}],"version-history":[{"count":0,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/261\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/media?parent=261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/categories?post=261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/tags?post=261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}