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:17 PM   #4 (permalink)
smasher
Senior Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
Default

Quote:
Originally Posted by LeopardDevX View Post
Thanks for reply...



I have no problem removing or adding subviews....


I tried it because i have a method to start the game....,, but i have placed the bricks with IB.
so the removed bricks doesnt pop up again.....
Isnt there an easier way to restart a view/level??


Regards...
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.
__________________

Free Games!
smasher is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,839
Threads: 89,210
Posts: 380,647
Top Poster: BrianSlick (7,129)
Welcome to our newest member, Dheofin Jose
Powered by vBadvanced CMPS v3.1.0

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