English 中文(简体)
Subview of NSView or CALayer?
原标题:Subview of NSView or CALayer?

今天,我决定设法利用医疗站显示一个直截了当的箱子,以压倒国家安全观察。 该层将包含一些案文,视显示变数案文的必要性而定,将予以改观。 我之所以要为此而利用医务室,是因为你可以轻松地与医疗家做事。 我执行了我的一层,并像一个药店一样工作。 然而,在利用我的“全球倡议”并多次点击各个纽州,使一层楼层倒塌,我所认为的等级似乎被 s笑。 我认为,必须把重点转向其他一些再次被拒发的NSView。 我基本上混淆了我在特定时间处理哪一层,我失去对观点等级的控制。

我的问题是:我是否应当使用NSView或CALayers的分辨率来表明申请中可能发生许多次的情况? 在我看来,很容易放松对你正在工作的那层的控制。 是否有办法用名称确定目前的层层,以便你能够重新利用层层,还是最好与层层合作,删除这些层,然后在你需要的时候重新造就层层?

感谢你们的时间。 Cheers, Trond

最佳回答

FWIW,

  1. 我经常非常迅速地将药房“on起.”,根本不存在问题。 如果你们想要!

  2. 将其删除并迅速重整,似乎不会引起任何问题。 (它不是一个大的资源使用者,我从未看到过这样做的任何其他问题。) 如果你想要!

  3. 我实际上不理解你所说的“命名”层——当然,是他们的名字的iVars! 页: 1

Here s a typical bit of production code (from a .h file):

CALayer         *rearLayer;
CALayer         *hugeBasket;        // holds everything for ez-on/off
CALayer         *theActualSkyline;  // nb, same name as similar UIView
CALayer         *someTrees;         // minor stuff
CALayer         *someBushes;        // overs

// for the stupid help basket..
CALayer         *LLDRear;
CALayer         *LLDArrowLeft;
CALayer         *LLDArrowRight;
CALayer         *LLDPointlessUpArrow;
CALayer         *LLDYetAnotherStupidShadow;

// etc etc..

And so on and on. I don t really see how you can "not" name them, you know!

Finally,

4, Don t forget layers are much "better" than NSViews, because: NSViews have shoddy/buggy relationship between overlapping siblings: they essentially don t work. Read about that here: port an iOS (iPhone) app to mac?

希望!

PS - 也可帮助疗养者......

实际应当做些什么?

CGLayer和CALayer的区别和兼容性是什么?

问题回答

暂无回答




相关问题
Asynchronous request to the server from background thread

I ve got the problem when I tried to do asynchronous requests to server from background thread. I ve never got results of those requests. Simple example which shows the problem: @protocol ...

objective-c: Calling a void function from another controller

i have a void, like -(void) doSomething in a specific controller. i can call it in this controller via [self doSomething], but i don t know how to call this void from another .m file. I want to call ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

NSUndoManager and runModalForWindow:

I have a simple Core Data app which displays a list of entities in the main window. To create or add new entities, I use a second modal window with a separate managed object context so changes can be ...

NSMutableArray values becoming "invalid"

I m trying to show a database information in a tableview and then the detailed information in a view my problem is as follow: I created a NSMutableArray: NSMutableArray *myArray = [[NSMutableArray ...

iPhone numberpad with decimal point

I am writing an iPhone application which requires the user to enter several values that may contain a decimal point (currency values, percentages etc.). The number of decimal places in the values ...

热门标签