Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
549 views
in Technique[技术] by (71.8m points)

ios - Want to create a cool static UI but : "Static table views are only valid..."

I'm creating a view like:

enter image description here

For this I'm trying to use a Storyboard in which I add 2 TableViews (both as 'Static Cells') and then I manually add my Cell content directly from the storyboard...

In my storyboard it looks great but when I build I get:

en.lproj/MainStoryboard.storyboard: error: Illegal Configuration: Static table views are only valid when embedded in UITableViewController instances

How can I fix this error?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I've also ran into an issue when changing an existing custom view controller, making it extends UITableViewController. XCode isn't smart enough and won't realize it already fits its requirements.

You can solve this problem by editing storyboard source code and changing <viewController ... to <tableViewController....

Original source: https://plus.google.com/108665969482300807329/posts/J4mCASMA3pZ


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...