相关疑难解决方法(0)

错误:使用未解析的标识符'kCGBlendModeMultiply'

我最近更新到Xcode 7,beta 3.

而且我遇到了一些问题,我似乎无法在SO上找到任何问题.

当我运行我的应用程序时,我得到3个错误:

使用未解析的标识符'kCGBlendModeMultiply'

使用未解析的标识符'kCGLineCapRound'

使用未解析的标识符'kCGLineJoinMiter'

然而,后两个,消失了,虽然我认为它们将在第一个修复后出现(因此我将其包括在这个问题中).

我没有在发行说明中看到有关这些被删除的内容?所以我有点不知所措.我当然尝试重写这些行,但我使用的3件事不再显示为选项.如果他们刚刚使用最新的Swift 2.0,我可以使用什么呢?

这是第一个错误的代码.

    func alpha(value:CGFloat)->UIImage
{
    UIGraphicsBeginImageContextWithOptions(self.size, false, 0.0)

    let ctx = UIGraphicsGetCurrentContext()
    let area = CGRect(x: 0, y: 0, width: self.size.width, height: self.size.height)

    CGContextScaleCTM(ctx, 1, -1);
    CGContextTranslateCTM(ctx, 0, -area.size.height)
    CGContextSetBlendMode(ctx, kCGBlendModeMultiply)
    CGContextSetAlpha(ctx, value)
    CGContextDrawImage(ctx, area, self.CGImage)

    let newImage = UIGraphicsGetImageFromCurrentImageContext()
    UIGraphicsEndImageContext()

    return newImage;
}
Run Code Online (Sandbox Code Playgroud)

这是后两个错误的代码:

for layer in [ self.top, self.middle, self.bottom ] {
        layer.fillColor = nil
        layer.strokeColor = UIColor.whiteColor().CGColor
        layer.lineWidth = 4
        layer.miterLimit = 4
        layer.lineCap = kCALineCapRound
        layer.masksToBounds …
Run Code Online (Sandbox Code Playgroud)

xcode swift xcode7 swift2 xcode7-beta2

10
推荐指数
1
解决办法
5371
查看次数

Swift Error - 使用未解析的标识符'kGMSMarkerAnimationPop'

我收到了这个错误

使用未解析的标识符'kGMSMarkerAnimationPop'

当我在Swift 3中使用以下代码时:

let camera = GMSCameraPosition.camera(withLatitude: location.coordinate.latitude, longitude: location.coordinate.longitude, zoom: 14)
mapView = GMSMapView.map(withFrame: CGRect.zero, camera: camera)
mapView?.isMyLocationEnabled = true
mapView?.settings.myLocationButton = true
view = mapView
let marker = GMSMarker()
marker.position = CLLocationCoordinate2D(latitude: location.coordinate.latitude, longitude: location.coordinate.longitude)
marker.title = "Sydney"
marker.snippet = "Australia"
marker.appearAnimation = kGMSMarkerAnimationPop // the error is occurring in this line
marker.map = mapView
locationManager.stopUpdatingLocation()
Run Code Online (Sandbox Code Playgroud)

我该如何解决?

google-maps ios gmsmapview swift3 xcode8

6
推荐指数
1
解决办法
2187
查看次数

标签 统计

gmsmapview ×1

google-maps ×1

ios ×1

swift ×1

swift2 ×1

swift3 ×1

xcode ×1

xcode7 ×1

xcode7-beta2 ×1

xcode8 ×1