Parameter losing value when passed
<p>I'm sure this is something simple but I've been staring at it for a bit now and I think all I need is a fresh pair of eyes to look at it, and since my cat doesn't have a whole lot of experience with iPhone programming I've turned to you.</p>

<p>I am passing a variable of type float from a class (UIView) to another class (UIViewController) right before the variable is passed it's value is correct but when it reaches the function it loses it's value, it's shown to be 0 or -2 and I'm not sure why. Like I said I'm sure it's something simple but I just need a fresh pair of eyes to look at it</p>

<p>Code is below</p>

<pre><code>  //inside UIView
-(void)UpdateFloat
{
myFloat = myFloat + 0.01;
}



    -(void)RemoveView
{
//Function Call
[viewController myFunction:myFloat];
}

//Function
-(void)myFunction:(float)myFloat
{
[myView removeFromSuperview];
[self.view addSubview:myOtherView];
[myOtherView anotherFunction:myFloat];
</code></pre>

<p>}</p>

<p>the float gets updated by a timer and when the UIView makes the function call the value of the float is correct (usually about 15.67)</p>

<p>any help would be appreciated</p>

<p>Thank you in advance,
BWC</p>
