静态成员' isSupported'不能在类型' ARConfiguration'的实例上使用

时间:2018-02-13 17:55:33

标签: swift arkit

获得'静态成员' isSupported'不能在类型' ARConfiguration'的实例上使用'

import ARKit
    // Display Agumented button only if device supports it
    let session = ARSession()
    var sessionConfig: ARConfiguration = ARWorldTrackingConfiguration()
    if sessionConfig.isSupported {
        bottomBarView.leadingBarButtonItems = [ hButton, fButton, agumentedButton ] }
    else { bottomBarView.leadingBarButtonItems = [ hButton, fButton ] }

    bottomBarView.trailingBarButtonItems = [ aButton, bhButton, cButton ]
  }

我在这里做错了什么?

1 个答案:

答案 0 :(得分:0)

正如错误消息清楚地告诉您,您必须说

if ARWorldTrackingConfiguration.isSupported {