Questions tagged [objective-c-protocol]

Protocols declare methods that can be implemented by any class. They can be used to force the implementation of necessarily used methods to assure the proper execution.

Protocols declare methods that can be implemented by any class. Protocols are useful in at least three situations:

  • To declare methods that others are expected to implement
  • To declare the interface to an object while concealing its class
  • To capture similarities among classes that are not hierarchically related

Protocols can be made optional specifically, otherwise the implementation is required for compiling successfully.

Developer Documentation for further information and usage

48 questions
-1
votes
1 answer

Protocol does not responds to selector

I have a problem with Objective-C protocols. I have defined protocol: @protocol PlayerProfileSectionProReviewDelegate - (void)didReceivedPlayerProfileSectionProReviewData; @end @interface PlayerProfileSectionProReviewModel :…
Jacob Jones
  • 501
  • 2
  • 6
  • 22
-2
votes
1 answer

assigning protocol parameter to object member

In my header file i am defining a class member: id* testSuite; Later i want to assign this variable using this function: - (void) setTestSuite:(id)_testSuite { if(testSuite == nil) { testSuite = _testSuite; …
Michael A
  • 5,770
  • 16
  • 75
  • 127
-2
votes
3 answers

Objective C class declaration syntax

I need some help with understanding the class declaration syntax in Objective C, or to be more specific @interface SomeViewController : UITableViewController what does…
Anoop
  • 5,540
  • 7
  • 35
  • 52
1 2 3
4