Makes total sense that you can't access myPrivateInt
. But myProtectedInt
is totally accessible here (compiles fine). So why's it got that annoying red strikethrough running through it?
Xcode 4.3.1 using iOS SDK 5.1.
Overriding a protected method in child a class with public access modifier is considered a compromising behavior by XCode. Even though your code is syntactically correct , that strikeout text is a simple warning for you to revise your code to make sure you're not exposing one of your internally important class method to outside world.
Edit: Seems like an Xcode bug.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With