草庐IT

Annotation

全部标签

IDEA弹出`Lombok requires enabled annotation processing`错误信息

问题背景项目启动时,弹出一个报错窗口问题原因当您使用Lombok库时,您可能会遇到Lombokrequiresenabledannotationprocessing的错误消息。这是因为Lombok库使用了Java注解处理器(annotationprocessor),而在默认情况下,Java编译器不会启用注解处理器。为了解决这个问题,您需要在您的项目中启用注解处理器。在IntelliJIDEA中,您可以按照以下步骤启用注解处理器:打开项目结构(ProjectStructure)对话框,可以通过菜单栏中的File>ProjectStructureFile>ProjectStructureFile>

ios - 无法创建自定义 MKAnnotationView

我很难显示自定义注释View。具体来说,我正在尝试将名为“pin”的图像设置为新的map图钉。默认引脚始终显示。几个小时以来,我一直在做一些小改动,但都无济于事,例如将“pin”更改为“pin.png”并更改mapView:viewFor方法的结构。这就是我所拥有的。能否请您看一下,看看是否有什么突出的地方?感谢您的帮助!注解类:classAnnotation:NSObject,MKAnnotation{dynamicvarcoordinate:CLLocationCoordinate2Dvartitle:String?varsubtitle:String?init(locationc

swift - 自定义 MKAnnotationView swift : func mapView does nothing

我正在尝试使用MapKit在map上设置图像而不是图钉。我知道我必须设置自定义MKAnnotationView。因此我应该执行以下几行:funcmapView(mapView:MKMapView!,viewForAnnotationannotation:MKAnnotation!)->MKAnnotationView!{if!(annotationisCustomPointAnnotation){returnnil}letreuseId="test"varanView=mapView.dequeueReusableAnnotationViewWithIdentifier(reuseId

ios - swift MapKit注解拖动状态图标

我遇到了一个小问题。我正在尝试为我的mapView注释使用自定义图标。问题在于,当用户拖动图标时,它总是变回默认图标。我在我的mapView委托(delegate)中设置了图标图像,这样可以设置图标。//MARK:-MapAnnotationsfuncmapView(mapView:MKMapView!,viewForAnnotationannotation:MKAnnotation!)->MKAnnotationView!{ifannotationisMKUserLocation{returnnil}letreuseId="pin"varpinView=mapView.dequeue

ios - 如何在 MKMapView swift 中添加覆盖路径

我想在mapView中的多个坐标之间添加一个叠加路径。我试过下面的代码,但它显示错误“无法使用类型为((CLLocation)->CLLocationCoordinate2D)的参数列表调用‘map’”。请让我知道我该如何解决这个问题?我的ViewController.swift文件importUIKitimportMapKitclassViewController:UIViewController,MKMapViewDelegate{@IBOutletweakvarmapView:MKMapView!overridefuncviewDidLoad(){super.viewDidLoa

swift - iOS 11 PDFKit 不更新注释位置

我正在构建一个在iPad上编辑PDF的应用。我正在尝试使用添加到PDFView的superView的panGesture识别器来实现注释的拖动。问题是注释的新矩形边界已分配,但更改未反射(reflect)在屏幕上。这是我的代码:@objcfunchandlePanGesture(panGesture:UIPanGestureRecognizer){lettouchLocation=panGesture.location(in:pdfView)guardletpage=pdfView.page(for:touchLocation,nearest:true)else{return}letl

ios - 围绕 x 轴旋转 BezierPath 用于 PDF 注释 Swift 4 iOS

我正在尝试使用UIBezierPath在我的应用程序中使用类型.ink注释PDF。我在下面包含了一段相关代码(可以添加整个示例,但问题仅在于旋转路径)。问题是当我应用这条路径时,它绕x轴旋转了180度,所以基本上它是上下颠倒的。我希望能够将这条路径围绕x轴旋转180度,使其看起来像最初预期的那样。我见过绕z轴旋转但没有绕x轴旋转的示例。任何帮助将不胜感激!letrect=CGRect(x:110,y:100,width:400,height:300)letannotation=PDFAnnotation(bounds:rect,forType:.ink,withProperties:n

java: Annotation processing is not supported for module cycles. Please ensure that all modules......

1.提示:java:Annotationprocessingisnotsupportedformodulecycles.Pleaseensurethatallmodulesfromcycle[bpm-point-service-api,bpm-point-service-domain]areexcludedfromannotationprocessing2.上面问题翻译是:出现了依赖循环错误来自于[bpm-point-service-api,bpm-point-service-domain]这两个文件,所以接下来我们要对这两个依赖进行分析。3.进行依赖分析,找到对应的文件bpm-point-s

swift - 调用中参数 'completionHandler' 缺少参数

我使用了geocodeAddressString函数,它在swift1.0中有效,但在swift2中无效。谁能告诉我我的代码有什么问题以及如何解决这个问题?谢谢!geocoder.geocodeAddressString(address,{(placemarks:[AnyObject],error:NSError)->Voidin//Error:Missingargumentforparameter'completionHandler'incallifletplacemark=placemarks?[0]as?CLPlacemark{letannotation=MKPointAnnot

ios - 如何获得可立即拖动的 MKAnnotationView?

下面的代码有效并为我提供了一个可拖动的注释View。但是,我注意到注释View从一开始就不可拖动,只有手指在注释View上停留片刻后才能拖动。当直接进入拖动运动时,拖动不会影响注释View,而是平移map。它当然不像拖放。在设备和模拟器中。ViewController(MapView的委托(delegate))overridefuncviewDidLoad(){///...letgestureRecognizer=UILongPressGestureRecognizer(target:self,action:#selector(addPin))mapView.addGestureRec