Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-09-2012, 11:01 AM   #1 (permalink)
User Interface expert
 
_Mac's Avatar
 
Join Date: May 2009
Location: Sweden
Posts: 141
_Mac is on a distinguished road
Question App goes black when choosing subitem? Multiple VCs

Stuck on a basic thing...
I've missed some simple connection and can't figure it out now, I'm stuck & my brain is fried... Please see attached example.

Worked:
Used Storyboard to add a navigationcontroller w UITableView + 3 sub VC's UIviews. Connected them and it worked ok. I could walk around in the app, back and forth to the subVC's.

Don't work (attached simple example):
Then I tried to give each one there own vc.h/vc.m files (ViewController1, 2, 3). Yes, I did hook it up in the Inspector. But now when I tap a selection in the TableView "VC1", "VC2" or "V3" it reacts, but the screen goes black. But the navigation still works.

Any tips? Suggestions?
Seems like the main TableView just don't connects to the sub VC's (ViewControlle1 etc) or it's not connected properly... Please see attached example and come with any tips / corrected example. Thank's :-)
Attached Files
File Type: zip connect2.zip (60.7 KB, 2 views)
__________________
-- Happy Coding
_Mac is offline   Reply With Quote
Old 02-10-2012, 03:10 AM   #2 (permalink)
User Interface expert
 
_Mac's Avatar
 
Join Date: May 2009
Location: Sweden
Posts: 141
_Mac is on a distinguished road
Question

Anyone?
__________________
-- Happy Coding
_Mac is offline   Reply With Quote
Old 02-10-2012, 03:41 AM   #3 (permalink)
User Interface expert
 
_Mac's Avatar
 
Join Date: May 2009
Location: Sweden
Posts: 141
_Mac is on a distinguished road
Thumbs up SOLVED!

Putting in the solution here if anyone else needs it. As suspected it was a really simple answer to it. And thanks to "rcasey" on another forum for the tip below;

Quote:
In your three view controllers, you have an empty loadView method defined.

That method is used if you want to create your view programmatically, and is overriding what you've defined in the storyboard.

Delete that method (in all 3 controllers) and you should be fine.
__________________
-- Happy Coding
_Mac is offline   Reply With Quote
Reply

Bookmarks

Tags
multiple pages, tableview, viewcontrollers, xcode 4.3

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 391
11 members and 380 guests
chiataytuday, chits12345, fiftysixty, gmarro, KennyChong, kilobytedump, Leslie80, Matrix23, Meoz, ryantcb, Yosh_K
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,670
Threads: 94,121
Posts: 402,903
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Yosh_K
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:25 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0