0
我有我從CFDictionaryRef
拉着一個值,你在這裏看到:如何將字典中的對象設置爲字符串值以更新查看文本字段?
CFDictionaryRef GPS = (CFDictionaryRef)CFDictionaryGetValue((__bridge CFDictionaryRef)(mutableMetadata), kCGImagePropertyGPSDictionary);
NSDictionary *gps_dict = (__bridge NSDictionary*)GPS;
NSLog(@"gps_dict: %@",gps_dict);
然後我從字典中值拉latitudeValue
。我宣佈latitudeValue
爲,並在頭文件NSString
財產和合成它@implementation
:
latitudeValue = [gps_dict objectForKey:@"Latitude"];
在這一點上,我想取值latitudeValue
並將其更新視圖中的文本字段。該文本字段標題爲latValue
,並在頭文件中作爲IBOutlet
連接。我已經嘗試了不少latValue.text = latitudeValue;
的變體,但是當我運行該程序時,它們都會導致線程錯誤。什麼是我建立這種聯繫的最佳方式?謝謝你的時間。
謝謝您的及時答覆!它現在肯定有效。我不知道爲什麼,但Xcode讓我改變它''self> latValue.text = [self.latitudeValue stringValue];'我將不得不研究'.'語法與' - >'' – Presto