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

Quote:
Originally Posted by LeopardDevX View Post
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?
They should keep the last position they had - the center and frame are both properties of the UIView object you're saving. I haven't tried this - it's just an idea - so back up your project before starting this.

Code:
//safeKeeping should be an NSMutableArray

//when you want to save the views
[safeKeeping addObject: myBlock];
[myBlock removeFromSuperview];

//loop through the views you want to put back
for (UIView *myBlock in safeKeeping){
     [topView addSubview: myBlock];
}
//clean out the array
[safeKeeping removeAllObjects];
__________________

Free Games!
smasher is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,849
Threads: 89,214
Posts: 380,663
Top Poster: BrianSlick (7,129)
Welcome to our newest member, joeceastham
Powered by vBadvanced CMPS v3.1.0

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