2012-01-19 30 views
1

我正在使用配置文件來控制設置的深度嵌套Xcode項目。項目內的項目中有項目。是否有可能在配置文件中回顯東西?在試圖調試它的時候,我發現看看有些變量會是非常有用的。像BUNDLE_LOADER,HEADER_SEARCH_PATHS等。xcode 4 - 有沒有辦法在配置文件中回顯內容?

我知道我可以通過閱讀日誌文件來獲得一些這些東西。但這真是一種痛苦!

編輯:澄清,這些是由配置文件控制的編譯時間變量。

回答

0

你可以創建一個項目的警報視圖,並加載它..

- (void)viewDidLoad { 
    // get your vairables from the defaults 
    NSString *variable1 = [[NSUserDefaults standardUserDefaults] stringForKey:@"variable1"]; 
    NSString *variable2 = [[NSUserDefaults standardUserDefaults] stringForKey:@"variable2"]; 

    // build your alert mesage 
    NSString *alertMessage = [NSString stringWithFormat:@"the variables you are looking for are %@ and %@",variable1,variable2]; 

    // create the alert view for display 
    UIAlertView *alertmsg = [[UIAlertView alloc] initWithTitle:@"Variables:" message:alertMessage delegate:self cancelButtonTitle:@"ok" otherButtonTitles: nil]; 

    // display the alert 
    [alertmsg show]; 


    [super viewDidLoad]; 
} 
+0

我的初步意見是默認的變量,但你將不得不改變對變量的源代碼,也已經正在努力將其顯示在日誌中。 – Silvertiger 2012-01-19 00:35:09

+0

感謝您的迴應,但我希望在構建時回顯,顯示由配置文件確定的構建設置。 – 2012-01-19 06:06:00

相關問題