Ios 在Swift中访问目标NSC字典值

Ios 在Swift中访问目标NSC字典值,ios,objective-c,swift,mindwave,Ios,Objective C,Swift,Mindwave,我正在使用Neurosky MindWave创建一个IOS应用程序。我正在使用ThinkGear SDK for IOS,可在以下位置获得: 该项目从MindWave设备读取值,并将其存储在Objective C实现文件中的NSDictionary中。我正在尝试访问Swift文件中的这些值,以控制SceneKit中的3D动画 以下是头文件中的设置: // the eSense values typedef struct { int attention; int meditation; } ES

我正在使用Neurosky MindWave创建一个IOS应用程序。我正在使用ThinkGear SDK for IOS,可在以下位置获得:

该项目从MindWave设备读取值,并将其存储在Objective C实现文件中的NSDictionary中。我正在尝试访问Swift文件中的这些值,以控制SceneKit中的3D动画

以下是头文件中的设置:

// the eSense values
typedef struct {
int attention;
 int meditation;
} ESenseValues;

// the EEG power bands
typedef struct {
int delta;
int theta;
int lowAlpha;
int highAlpha;
int lowBeta;
int highBeta;
int lowGamma;
int highGamma;
} EEGValues;

@interface RootViewController : UITableViewController        <TGAccessoryDelegate> {
short rawValue;
int rawCount;
int buffRawCount;
int blinkStrength;
int poorSignalValue;
int heartRate;
float respiration;
int heartRateAverage;
int heartRateAcceleration;

ESenseValues eSenseValues;
EEGValues eegValues;

bool logEnabled;
NSFileHandle * logFile;
NSString * output;

UIView * loadingScreen;

NSThread * updateThread;
}

// TGAccessoryDelegate protocol methods
- (void)accessoryDidConnect:(EAAccessory *)accessory;
- (void)accessoryDidDisconnect;
- (void)dataReceived:(NSDictionary *)data;

- (UIImage *)updateSignalStatus;

- (void)initLog;
- (void)writeLog;

@property (nonatomic, retain) IBOutlet UIView * loadingScreen;
每当我尝试获取这些值中的任何一个时,都会出现“使用未解析标识符”或类似错误。我试图在SceneKit中将它们显示为3D文本:

    override func viewDidLoad() {
    super.viewDidLoad()


    // Create Scene
    let scene = SCNScene()


    let myText = SCNText(string: attention , extrusionDepth: 5)
    myText.font = UIFont(name: "Optima", size: 1)
    let myTextNode = SCNNode(geometry: myText)
    myTextNode.position = SCNVector3(x: -2, y: -1, z: -7)
    myTextNode.orientation = SCNQuaternion(x: 0.1, y: 0, z: 0.5, w: 0)
    scene.rootNode.addChildNode(myTextNode)



}

我对IOS开发非常陌生,并且已经研究了近一周了。如果您能提供任何有关访问这些值的线索,我们将不胜感激。

请将您的swift代码张贴在您试图访问这些值的地方。
eegValues
?并且,正如@dan提到的,发布实际给出编译时错误的代码。或者此Objective-C代码中是否生成了错误?请将代码编辑到您的question@DavidBerry当我试图访问目标C文件中的值时,错误出现在Swift文件中。
    override func viewDidLoad() {
    super.viewDidLoad()


    // Create Scene
    let scene = SCNScene()


    let myText = SCNText(string: attention , extrusionDepth: 5)
    myText.font = UIFont(name: "Optima", size: 1)
    let myTextNode = SCNNode(geometry: myText)
    myTextNode.position = SCNVector3(x: -2, y: -1, z: -7)
    myTextNode.orientation = SCNQuaternion(x: 0.1, y: 0, z: 0.5, w: 0)
    scene.rootNode.addChildNode(myTextNode)



}