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 > iPhone SDK Development - Advanced Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 07-22-2010, 12:45 PM   #1 (permalink)
Registered Member
 
screwtape's Avatar
 
Join Date: Jul 2010
Location: Nottingham
Posts: 54
screwtape is on a distinguished road
Send a message via Skype™ to screwtape
Question Setting the parentViewController property without using a navigationController.

Can this be done?

I have an app with non-standard navigation, for which it would be very useful to be able to set the parentViewController. However, it is read-only and I can't see anywhere in the code that tells you how to make set a viewController's parent. It just seems to be done automatically by the navigation controller or when using the presentModal..., which I can't use as I don't want a full screen window.

Presumably there is some hidden or protected method with which the system set's the property. Is there any way of accessing it?
screwtape is offline   Reply With Quote
Old 07-24-2010, 10:21 AM   #2 (permalink)
Registered Member
 
Join Date: Jan 2009
Location: Long Beach, CA
Posts: 612
bytor99999 is on a distinguished road
Send a message via AIM to bytor99999 Send a message via Yahoo to bytor99999
Default

I am confused, are you using a NavigationController, but in a nonstandar way?

Anyway, I have a main view controller that I use, I just create it in my app delegate then add the view to the main window's subviews. I now have a reference to my top level view controller and it is displaying without a nav controller or anything else. I even pass it to my other view controllers so they can call up when needed.

Mark
__________________
Perfect World Programming LLC
http://www.perfectworldprogramming.com

Please check out my apps.

TubeOrganizer
http://www.spritzlerapps.com/tube-organizer.html

Paper Clips
http://spritzlerapps.weebly.com/paper-clips.html
bytor99999 is offline   Reply With Quote
Old 07-24-2010, 11:20 AM   #3 (permalink)
Registered Member
 
screwtape's Avatar
 
Join Date: Jul 2010
Location: Nottingham
Posts: 54
screwtape is on a distinguished road
Send a message via Skype™ to screwtape
Default

That's sort of what I'm doing, I just wondered if it could be done without having to implement an additional property, since there is a built in one.

It's the same for getting the view controller from the view. I've added a UIViewController member to my custom view, but it seems so unnecessary as there is a _delegate member in UIView, you just can't access it from the properties.
screwtape is offline   Reply With Quote
Reply

Bookmarks

Tags
parentviewcontroller, setting

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: 385
14 members and 371 guests
AragornSG, ChrisYates, coolman, davejas69, givensur, guusleijsten, hussain1982, jbro, Kryckter, locombiano89, Mah6447, Meoz, stanny, WeaselPig
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,646
Threads: 94,111
Posts: 402,862
Top Poster: BrianSlick (7,990)
Welcome to our newest member, locombiano89
Powered by vBadvanced CMPS v3.1.0

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