2010-04-21 46 views
4

當我在NSSplitView中放置一個NSOpenglView時,拖動拆分器時出現問題。 openGLView和SplitView異步調整大小。我發現蘋果郵件列表線程中的解決方案http://developer.apple.com/mac/library/samplecode/GLChildWindowDemo/Introduction/Intro.htmlNSSplitView中的NSOpenGLView

我發現了一些碳調用的解決方案。但現在我得到鏈接錯誤(只在發佈模式)。

所以我有兩個問題 - 有沒有可可方法來修復分離器 - gl問題? 如果沒有 - 我如何解決發佈模式中的碳鏈接器錯誤?

+0

可能不推薦使用的碳包裝正在發送鏈接錯誤。另一方面,我讀到OpenGL和UIKit元素只是不能正確播放......我會推薦使用單個框架。 – 2010-04-21 21:56:09

+0

這裏沒有UIKit,這是一個Cocoa/Mac的問題。 – 2010-04-22 00:15:20

回答

4

我找到了答案。

的正確方法是實現您的mywindow的thees方法:NSWindow

​​

和NSSplitterView委託實施

#pragma mark NSSplitView Delegate 
-(void)splitViewWillResizeSubviews:(NSNotification *)notification 
{ 
    [window disableUpdatesUntilFlush]; 
} 

我的問題是,我試圖用碳電話:

DisableScreenUpdates(); 
EnableScreenUpdates(); 

而不是可可:

NSDisableScreenUpdates(); 
NSEnableScreenUpdates(); 
+0

只想說感謝您謝謝您。你搖滾。 – Morgan 2011-03-16 07:48:28

+0

爲了清楚的抖動,我會寫: - (無效)disableUpdatesUntilFlush { 如果(!needsEnableUpdate){ NSDisableScreenUpdates(); needsEnableUpdate = YES; } } – 2011-06-04 12:56:54