how to find position of iphone
<p>I  have 1 view ,now i click on it's subview</p>

<p>There are 2 conditions for that,
1> if  subview is in portrait mode and then i switch it to landscape mode,at that time i wrote code and it works perfectly.</p>

<pre><code>[[UIDevice currentDevice]  beginGeneratingDeviceOrientationNotifications];
    [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(receivedRotate:) name: UIDeviceOrientationDidChangeNotification object: nil];


-(void) receivedRotate: (NSNotification*) notification
{

  self.View.autoresizingMask = UIViewAutoresizingFlexibleWidth/UIViewAutoresizingFlexibleHeight; 
}
</code></pre>

<p>but if i put my device initially in landscape mode and then click on subview then how to autoresizie subview</p>

<p>My que:-
How to find out the method for the position of device?
How to find my device is in portrait or landscape mode?</p>
