Quantcast
Viewing all articles
Browse latest Browse all 5

Answer by Anders Zommarin for Whether C# interfaces and objective c @prototypes are same?

1) I assume you mean protocols. Protocols are close to interfaces in C# (and Java) but the semantics differ in that the method receiving the message does not need to implement the method. Then the message is ignored. Also sending messages (i.e. calling methods in C#) can be done on nil (i.e. null in C#) and nothing will happen.

2) @property(nonatmoic, retain) is the declaration of a property (which is a pair of methods, one getter and one setter). They can be automatically implemented using the @synthesize keyword. nonatomic is that no thread safety should be implemented. retain is that the objects reference count should be incremented/decremented in the setter.


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>