NSOpenPanel 讀檔視窗的用法

Leave a Comment

  
  
    NSOpenPanel *openPanel = [NSOpenPanel openPanel];   //簡單的宣告方式 不用release

    [openPanel setCanChooseDirectories:TRUE];   //  最後選擇的檔案可以是資料夾
    [openPanel setCanChooseFiles:TRUE];         //  最後選擇的檔案可以是檔案
  
    if ([openPanel runModal] == NSOKButton) {
        NSLog(@"%@",[openPanel URL]);
    }
   


Mac 螢幕截圖的方法

Leave a Comment

全螢幕:
Command + shift + 3

指定區域:
Command + shift + 4,用滑鼠選擇要截圖的區域。

指定視窗:
Command + shift + 4, 鬆開按鍵後再按下空白鍵可以選擇視窗。


截下來的圖片會存在桌面上。
技術提供:Blogger.