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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-25-2009, 05:24 PM   #5 (permalink)
LeopardDevX
iPhone Developer
 
Join Date: Mar 2009
Posts: 222
Question ...

Quote:
Originally Posted by smasher View Post
I can think of two options - as you remove the bricks from the view, put them in an array for safekeeping. Then add them back to the view when you reset.

I don't know of a way to "reset" views loaded from a nib without reloading the nib.
If the view is in a nib all by itself, you can re-create the view and its controller with something like:

Code:
ChatViewController *chatViewController = [[ChatViewController alloc] initWithNibName:@"chatView" bundle:nil];
That would create a ChatViewController, load the "chatView.nib" , and connect the File'sOwner to the ChatViewController.

If you're just using mainWindow.xib and letting it load automatically, that may be difficult; it expects File's Owner to be the app delegate, and I don't think you can re-create that.

I`m using mainWindow.xib as my nibfile, but instead of using a viewcontroller, i`m just using a view as my top on the "View Tree" and i`m adding subViews from that view and removing them from the views.

So this safeKeeping array how does that work..?
Will they keep the position i gave them in the Interface Builder?
__________________
Thank You.
LeopardDevX is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,558
Threads: 89,129
Posts: 380,260
Top Poster: BrianSlick (7,103)
Welcome to our newest member, thesooty
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:53 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.