English 中文(简体)
我知道,什么时候把我的财产和方法放在了档案中,什么时候把他们放在桌面上?
原标题:How do I know when do put my properties and methods in the .h file and when to put them in the .m interface?

我知道,什么时候把我的财产和电文放在.档案中,什么时候把他们放在.里?

我指的是公众喜欢的信息,应当放在档案中。 描述类别(例如组合类型)的特性是什么。

最佳回答

当你想要限制任何财产的使用时,你可以确定,在m档案中,使用等级延长等。

没有关于将财产放入.或 file立档案的规定,你需要检查你想要进入哪类财产(即:h)以及你确实希望到场外(m.define)。

问题回答

rel=“nofollow”> 根据 Apple果(,在“@interface”(h)文档中宣布了特性。 如果你只想有私人用途的变量,那么这些变量被称为微粒,你将综合使用这些变量。

私人财产(或“property redeclaration” in the docs)可在类延伸或议定书等物品中使用。





相关问题
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 ...

热门标签