2011-11-14 30 views
2

是否可以在#pragma mark -指令之前/之後添加一些空行? 如果這很重要,我指的是objC中的Xcode 4.2和iOS開發。如何在使用uncrustify的#pragma標記之前添加新行?

[編輯]我的意思是像下面這樣:

// Some code here, and then 1 empty line 

#pragma mark - Whatever 

// Some other code here, after 1 empty line 

成爲使用uncrustify:

// Some code here, and then 2 empty lines 


#pragma mark - Whatever 


// Some other code here, after 2 empty lines 
+0

你有沒有找到這個解決方案? –

回答

0

我不認爲這是可能的。不是因爲Uncrustify的限制,而是因爲XCode的限制。

這兩個塊的行爲相同XCode中:

#pragma mark 
#pragma mark 
#pragma mark 
#pragma mark - 

// MARK: 
// MARK: 
// MARK: 
// MARK: 
// MARK: - 

嘗試插入幾那些線的上方插入任何源代碼文件。您可以很快看到XCode爲每個空行#pragma mark行顯示下劃線。

+0

感謝您的回答。我不確定我最初的問題是否足夠清楚,編輯後請仔細檢查一下? – phi

相關問題