日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

      歡迎訪問 生活随笔!

      生活随笔

      當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

      编程问答

      关于application title一直是untitled的问题

      發布時間:2023/12/10 编程问答 22 豆豆
      生活随笔 收集整理的這篇文章主要介紹了 关于application title一直是untitled的问题 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
      建立了一個cocoa?application項目,在Interface Builder中修改了title,在運行時標題始終是“Untitled”。

      這是我在http://stackoverflow.com/questions/4720030/cocoa-mac-application-title-says-untitled上找的解決方法。

      I have created a document based?Mac?OSX application, and when I'm editing in Interface Builder, the title is correct (I filled out that portion of the inspector) but once the program runs, the application title is 'Untitled'. How can I change it? In my IB Doc Window, I have instances of Files Owner, First Responder, NSApplication, and NSWindow. There is no view?controller, is that the issue? I'm new to Cocoa..

      -> It will probably change to the name of your document once you save it (or open one). – zneak Jan 18 at 3:07

      -> Naming a new, unsaved document “untitled” is the correct way according to the HIG.?http://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGWindows/XHIGWindows.html#//apple_ref/doc/uid/20000961-CHDHBCGE?Why do you want to violate that convention? – Peter Hosey Jan 18 at 5:17

      下面是比較暫時比較好的解決方法:覆蓋NSDocument的-displayName方法

      One solution is to override -displayName in your NSDocument subclass:

      - (NSString *)displayName {
      ????if (![self fileURL])
      ????????return @"Some custom untitled string";

      ????return [super displayName];
      }


      You can also check out NSWindowController's -windowTitleForDocumentDisplayName: if you're using custom window controllers.

      如果有好的建議,歡迎提供,多謝~

      轉載于:https://www.cnblogs.com/aquariusgx/archive/2011/03/17/1986849.html

      創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

      總結

      以上是生活随笔為你收集整理的关于application title一直是untitled的问题的全部內容,希望文章能夠幫你解決所遇到的問題。

      如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。