【问题标题】:run scene (scene kit )?运行场景(场景工具包)?
【发布时间】:2015-05-19 12:47:36
【问题描述】:

是否可以在 Apple Watch 上运行此代码:

 SCNScene *scene = [SCNScene sceneNamed:@"art.scnassets/ship.dae"];        
    // retrieve the ship node
    SCNNode *ship = [scene.rootNode childNodeWithName:@"ship" recursively:YES];

    // animate the 3d object
    [ship runAction:[SCNAction repeatActionForever:[SCNAction rotateByX:0 y:2 z:0 duration:1]]];

    // retrieve the SCNView
    SCNView *scnView = (SCNView *)self.view;

    // set the scene to the view
    scnView.scene = scene;

    // allows the user to manipulate the camera
    scnView.allowsCameraControl = YES;

    // show statistics such as fps and timing information
    scnView.showsStatistics = YES;

我无法在主控制器上放置场景。

SCNView *scnView = (SCNView *)self.view;

请帮忙。

【问题讨论】:

    标签: ios scenekit apple-watch


    【解决方案1】:

    为 Apple Watch 制作应用程序的唯一方法是 WatchKit。 WatchKit 不包含在手表上呈现任何 iOS 视图的能力,仅包含在 WatchKit 框架中定义的特定 UI 控件集。有关详细信息,请参阅WatchKit Programming Guide

    【讨论】:

      猜你喜欢
      • 2013-11-28
      • 2014-07-05
      • 1970-01-01
      • 2018-01-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-17
      • 2018-10-08
      相关资源
      最近更新 更多