Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I don't really get everything from your question, but i'll give it a go.</p> <p>So you say:</p> <blockquote> <p>problem is the above code is working but in device whenever view will appear method called its not working how to write view will appear please tell me.</p> </blockquote> <p>Do you mean that the code is working in some tutorial you saw it in or is it working in your simulator and not on the device?</p> <p>Seems odd to me that some animation code would work in simulator but not on the device, so that should not me the problem.</p> <p>You're talking about viewWillAppear not being called, are you using a navigation controller? In a navigation controller based app the viewWillAppear method won't get called.</p> <p>The methods you are using to show and hide the desired keyboard are also a little bit weird, you talk about animating an UITextField in, but you are moving the whole view?</p> <p>Why don't you just create a property for the desired textfield or at least an instance variable, so you can address that textfield from any method to animate it in/out.</p> <p><strong>If you are using a nivation controller:</strong> Create a method and call it something like "moveTextFieldIn", then in the previous viewController you will probably have something like this:</p> <pre><code>UIViewController * nextViewController = [[UIViewController alloc] init]; [[self navigationController] pushViewController:nextViewController animated:YES]; [nextViewController release]; </code></pre> <p>Change that to this:</p> <pre><code>UIViewController * nextViewController = [[UIViewController alloc] init]; [nextViewController moveTextFieldIn]; [[self navigationController] pushViewController:nextViewController animated:YES]; [nextViewController release]; </code></pre> <p>Or to this (if you're not creating moveTextFieldIn):</p> <pre><code>UIViewController * nextViewController = [[UIViewController alloc] init]; [nextViewController viewWillAppear]; [[self navigationController] pushViewController:nextViewController animated:YES]; [nextViewController release]; </code></pre> <p>Well, lot's of guesses, but I hope this will be help you!</p> <p><strong>One more thing:</strong> The standard animation duration is 0.3, so you can delete that line of code, keep it clean ;-)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload