2

Appreciate any help with this. What I'm trying to do seems like it should be straightforward - I would like to combine a UITableView with static cells and an ADBannerView together in one scene. Unfortunately, if I attempt to use the standard "container" technique to encapsulate the UITableView and ADBannerView (as subviews in a UIViewController's view) together in one view, I receive the following error:

MainStoryboard_iPhone.storyboard: error: Illegal Configuration: Static table views are only valid when embedded in UITableViewController instances.

Any ideas on how I can get this to work? At this point I'm thinking I might have to abandon Storyboards and go back to using Nibs.

Thanks.

Admagistrator
  • 63
  • 1
  • 6

1 Answers1

0

Have you tried to add a UIView as a header or footer to your UITableView and then drag your ADBannerView into it?

Rob
  • 4,149
  • 5
  • 34
  • 48
  • Thanks for the suggestion; however, my understanding of the guidelines is that adding an ad banner as a subview of a scroll view or related subclass (such as a table view) will get your app rejected. In this case, the ADBannerView can only be a sibling of the table view. – Admagistrator Jan 25 '12 at 21:33
  • Interesting. I've not built anything with iAD so that is good to know. After a quick experiment I found my idea crashes. This may not be much help since you've probably thought about this already but you could use a UIView in the storyboard with the iAd and a UITableView in the normal "delegated" way but construct your "data" so that it works like a static. Sorry I could be of more help. – Rob Jan 26 '12 at 11:07
  • Yeah, as you mentioned the easiest way is simply to abandon the new static table view functionality and go with the old, sucky way of creating static table views. The only alternative I found is to implement a custom container controller (also new in ios5) but the documentation and sample code for this is sparse, and ultimately this approach become more trouble than simply implementing the static table programmatically. – Admagistrator Jan 27 '12 at 23:23
  • I agree, it doesn't sound like you a lot to choose from. – Rob Jan 28 '12 at 04:18