Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-25-2009, 04:24 PM   #5 (permalink)
LeopardDevX
iPhone Developer
 
Join Date: Mar 2009
Posts: 220
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
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,212
Threads: 38,996
Posts: 171,042
Top Poster: smasher (2,569)
Welcome to our newest member, wardz
Powered by vBadvanced CMPS v3.1.0

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