Skip to content

only rotate KRImageView #3

@appmonkey8010

Description

@appmonkey8010

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions