2

How to implement like JAVA ‘Protect’ function in Object-C?I wanna access father class method in subclass,but i don`t konw how to implement it use Ojbect-C.

2 Answers2

1

You have the answer of your question here:

What is the Objective-C equivalent of a public get/protected set property in C#

Or here:

Objective-C - Private vs Protected vs Public

I hope it helps!

Community
  • 1
  • 1
Antonio MG
  • 20,382
  • 3
  • 43
  • 62
0

You can just call

[super myMethod];

to access the parent method

Amit Shah
  • 4,176
  • 2
  • 22
  • 26