ios-KRImageViewer icon indicating copy to clipboard operation
ios-KRImageViewer copied to clipboard

only rotate KRImageView

Open appmonkey8010 opened this issue 11 years ago • 1 comments

If you want to rotate only! your KRImageView(like Facebook) and not your whole application you can add following to your view did Load: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didRotate) name:UIDeviceOrientationDidChangeNotification object:nil];

to oberve rotation and fire a event to change only the KRImageview. And then you can rotate like you want with:

-(void)didRotate { UIDeviceOrientation deviceOrientation = [[UIDevice currentDevice] orientation];

[self.krImageViewer reloadImagesWhenRotate:deviceOrientation];

}

Its better then: -(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { [self.krImageViewer reloadImagesWhenRotate:toInterfaceOrientation]; }

Because if you have a only Portrait Mode App, you might get problems.

appmonkey8010 avatar Jul 08 '13 14:07 appmonkey8010

Thanks, Buddy.

That's really a great idea, awesome ! I fixed it and added some methods to use.

Kalvar avatar Jul 09 '13 02:07 Kalvar