Can I override documented private methods?

Discussion in 'iOS Programming' started by darthtroll, Jan 17, 2011.

  1. macrumors newbie

    Aug 24, 2010
  2. Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    What makes you think that method is private? Seems awfully public to me, given that it's published in the class reference.
  3. thread starter macrumors newbie

    Aug 24, 2010
    #3'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 emeritus


    Jul 24, 2002
    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. thread starter macrumors newbie

    Aug 24, 2010
    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