Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 11, 2011, 06:45 AM   #1
Wellington2k
macrumors regular
 
Join Date: Jun 2011
Resetting a UIView

Hello.

I have a ViewController (Menu) that then switches to a UIView (Level_1).
When you die in the UIView (Level_1) it then switches to another UIView (Loss of life animation) and then switches back to Level_1.

Now the problem. I can't get into detail, but it is a major issue and it only happens when I switch back to the UIView (Level_1).
The only possible way to fix it would be to reset the UIView (Level_1) to its original state when you switch from Loss of life animation.

I have already tried resetting all the variables, but it doesn't help.
Is there a code to reset everything in a UIView?

Thanks!

Last edited by Wellington2k; Nov 11, 2011 at 06:51 AM.
Wellington2k is offline   0 Reply With Quote
Old Nov 11, 2011, 07:20 AM   #2
jnoxx
macrumors 65816
 
jnoxx's Avatar
 
Join Date: Dec 2010
Location: Aartselaar // Antwerp // Belgium
Code:
    UIView *view;
    [view reloadInputViews];
No idea, but maybe that should work?
jnoxx is offline   0 Reply With Quote
Old Nov 11, 2011, 08:15 AM   #3
nickculbertson
macrumors regular
 
Join Date: Nov 2010
Location: Nashville, TN
Quote:
Originally Posted by Wellington2k View Post
I have already tried resetting all the variables, but it doesn't help.
This should work. How did you attempt this? Did you reset your variables before you changed views?

Or, you could just have your "life loss" view merged with your "Level_1" view as hidden layers and reset you variables there.

Code:
//image1 is a UIImage
-(IBAction)dead{
deadmenu.image=image1;
deadmenu.hidden=NO;
//reset variables here  
}
-(IBAction)nextlife{
deadmenu.hidden=YES;
deadmenu.image=nil;
//set this imageview to nil when you are not using it and it won't use up any unwanted memory
}
Nick
__________________
My App Blog --->
nickculbertson is offline   0 Reply With Quote
Old Nov 11, 2011, 08:20 AM   #4
Wellington2k
Thread Starter
macrumors regular
 
Join Date: Jun 2011
nickculbertson you are AMAZING!!!

Thanks SO much!

I've wrestling with this all week!

Last edited by Wellington2k; Nov 11, 2011 at 08:42 AM.
Wellington2k is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Tags
help me, issue, reset, uiview, variables

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
After hard reset of Airport Express, still asked for PW...old PW doesn't work kurtster Mac Peripherals 5 Dec 22, 2012 08:23 PM
iPhone 4 settings resets after reboot gslrider iPhone Tips, Help and Troubleshooting 12 Mar 3, 2012 06:38 PM
Will apple reset iCloud backups tomorrow Jimmy Guphanti iCloud and Apple Services 1 Oct 11, 2011 03:35 PM
How to reset to factory settings? geekygeek MacBook Air 22 Sep 7, 2011 05:06 PM
iOS 4.3.1 iPhone 4 some settings reset pknz iPhone 2 Apr 7, 2011 04:26 PM


All times are GMT -5. The time now is 09:00 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC