1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Can I override documented private methods?

Discussion in 'iPhone/iPad Programming' started by darthtroll, Jan 17, 2011.

  1. macrumors newbie

  2. Moderator


    Staff Member

    What makes you think that method is private? Seems awfully public to me, given that it's published in the class reference.
  3. macrumors newbie

    Whoops...you're 100% right. I found an article talking about it and it had mentioned it was a private method. It must have been a typo. I should have been convinced otherwise after reading the documentation but I blame sleep deprivation!

    Thanks again dejo.
  4. Moderator


    Staff Member

    As an answer to the generic question though I would say it's highly undesirable to do so for a couple of reasons:

    1) Apple may choose to make the method public in future
    2) Apple will, most likely, reject your app for using private methods as they scan for the method name
  5. macrumors newbie

    Thanks robbieduncan, that was the general feeling I was getting. Fortunately for me that the method I needed was actually public, because there is no other way to do what I wanted to do.

    Thanks both of you,

Share This Page