What's a good way to split a tabbed UITableViewController into multiple files?
I've implemented a tabbed `UITableViewController`. There are some tabs on the top which reload the contents of the table. Based on the selected tab different cells are shown to the user. It all works nice, but I end up with a source file which contains 3 different implementations, and gets a little bit bulky and confusing, even using pragmas to mark sections of the source code.

I've thought of creating selectors at runtime from strings based on the selected tab, then splitting the `.m` file into several putting there the renamed methods, but then there's the forced `@end` and the end of a file and the compiler telling you that there are missing methods to be implemented.

Really, it looks like objective-c wasn't designed to split the source though several files. Is there any design pattern that can be used for this? Somehow I managed to emulate all this using `#include <otherfile.m>` before the `@end` of the main class, but it doesn't look pretty. Also, Xcode gets confused as hell if I try to include that file into the project, since it tries to compile it separately (at least I can include the files in the project and disable their inclusion in the target).
What's a good way to split a tabbed UITableViewController into multiple files?
===

I've implemented a tabbed `UITableViewController`. There are some tabs on the top which reload the contents of the table. Based on the selected tab different cells are shown to the user. It all works nice, but I end up with a source file which contains 3 different implementations, and gets a little bit bulky and confusing, even using pragmas to mark sections of the source code.

I've thought of creating selectors at runtime from strings based on the selected tab, then splitting the `.m` file into several putting there the renamed methods, but then there's the forced `@end` and the end of a file and the compiler telling you that there are missing methods to be implemented.

Really, it looks like objective-c wasn't designed to split the source though several files. Is there any design pattern that can be used for this? Somehow I managed to emulate all this using `#include <otherfile.m>` before the `@end` of the main class, but it doesn't look pretty. Also, Xcode gets confused as hell if I try to include that file into the project, since it tries to compile it separately (at least I can include the files in the project and disable their inclusion in the target).