Problem with views and button iPhone application
<p>I have this scenario, I have 4 views. v1,v2,v3,v4.</p>

<p>I am in view v1, which is table view when i press any cell it takes me to another view v2. Fine. </p>

<p>Then in v2 i have some textFields and button B2. When i press button B2(i have set in its method to save textField data and pushViewController function) it takes me to v3. </p>

<p>I have a button in v3 as well B3. This button saves data on v3 and takes me to view 4 i.e. v4.</p>

<p>In v4 all textfields of v2 and v3 is shown.
I have no problem. But when i press navigation back barbutton it takes me to v3 from v4. but now when i change textField value and press button on v3 again it does nothing.same as if press navigation bar button again i.e. back button it takes me v2 and button B2 does nothing. </p>

<p>Can anyone help me regarding this. </p>

<pre><code>-(IBAction)buttonPress:(id)sender{ 
NSUserDefaults *defaults=[NSUserDefaults standardUserDefaults]; 
[defaults setObject:field1.text forKey:@"field1Key"]; 
[defaults setObject:field2.text forKey:@"field2Key" ]; 
[defaults synchronize]; 
if (co==nil) { 
    co=[[class4 alloc]initWithNibName:nil bundle:nil]; 
co.name=field1.text; co.phone=field2.text; 
[self.navigationController pushViewController:co animated:YES ]; 
[co release];
} –

}    
</code></pre>
