user145883
user145883

Reputation: 227

device rotation: portrait- landscape

I am working on iphone application in which i am showing camera view for zoom in zoom out using scroller. I want to add functionality, when a user rotate device from portarit to landscape or vice versa then camera view should adjust accordingly.

how can i fix it Please help

thanks, Aaryan

Upvotes: 1

Views: 438

Answers (1)

David Kanarek
David Kanarek

Reputation: 12613

Your UIViewController needs to implement the following methods:

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

Upvotes: 3

Related Questions