Help tester111
Help tester111

Reputation: 9

Xcode 8.0 conversion issue

AS I have updated the XCode to 8, new version, the following code

func center(_ usePresentationLayer: Bool) -> CGPoint 
{
    if usePresentationLayer, let presentationLayer = layer.presentation() as! CALayer
    {
        return presentationLayer.position
    }
    return center
}

result in

Error -  Value of type 'CALayer' has no member 'presentation'

How can I fix this issue in XCode using swift 3.0?

Upvotes: 0

Views: 54

Answers (1)

Devran Cosmo Uenal
Devran Cosmo Uenal

Reputation: 6195

Edit: the question changed

Make sure request is of type URLRequest.

Don't upload screenshots of code - please edit your post so it contains code that's searchable.

Upvotes: 1

Related Questions