Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 17, 2011, 06:24 PM   #1
darthtroll
macrumors newbie
 
Join Date: Aug 2010
Can I override documented private methods?

Here's a private method of UISearchDisplayController. I want to subclass this class and override a private method. I think I'm in the clear with what I want to do, but I just want to double-check...

- (void)setActiveBOOL)visible animatedBOOL)animated is documented at http://developer.apple.com/library/i...Reference.html.

Will my app be rejected if I override this method?

Darthtroll
darthtroll is offline   0 Reply With Quote
Old Jan 17, 2011, 06:59 PM   #2
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: 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.
__________________
dejo is online now   0 Reply With Quote
Old Jan 18, 2011, 11:02 AM   #3
darthtroll
Thread Starter
macrumors newbie
 
Join Date: Aug 2010
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.
darthtroll is offline   0 Reply With Quote
Old Jan 18, 2011, 11:32 AM   #4
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
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
robbieduncan is offline   0 Reply With Quote
Old Jan 19, 2011, 01:59 PM   #5
darthtroll
Thread Starter
macrumors newbie
 
Join Date: Aug 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,
Darthtroll
darthtroll is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
21 vs 27, diffs not documented in comparision table iMacLate2013 iMac 4 Jan 24, 2014 08:58 PM
New GUI feature not documented [as far as I know] rochford OS X 4 Oct 15, 2013 11:22 PM
Second Lock Screen Bypass in iOS 6.1 Documented MacRumors iOS Blog Discussion 41 Mar 1, 2013 02:09 AM
Class methods vs instance methods zijianz iPhone/iPad Programming 8 Jul 20, 2012 11:15 AM
Private class methods KarlJay iPhone/iPad Programming 9 Jun 12, 2012 07:29 AM

Forum Jump

All times are GMT -5. The time now is 05:37 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps