Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Landscape #27

Open
joaopedrok opened this issue Aug 5, 2014 · 5 comments
Open

Landscape #27

joaopedrok opened this issue Aug 5, 2014 · 5 comments

Comments

@joaopedrok
Copy link

How can i use this component in landscape mode?

It has always been showed in portrait mode.

@joaopedrok
Copy link
Author

I really need to use that in landscape. Your component is good but application will be only in landscape mode. Could you please help me?

@mtonio91
Copy link
Owner

mtonio91 commented Aug 5, 2014

The component is currently not available in landscape mode.
Didn't have the time to make it landscape ready sorry.

But you can do it by playing with the uiwindow coordinates (the alert view superview) and the rotations.

Antoine

@zarcon
Copy link

zarcon commented Sep 6, 2014

Hello, adding few lines of code solve the problem:

in -(void) performScreenshotAndBlur add
bg.transform = CGAffineTransformMakeRotation(M_PI + M_PI_2); // 270 degress

and in -(void) triggerFadeAnimations add
self.transform = CGAffineTransformMakeRotation(M_PI_2); // 90 degress

@utsengar
Copy link

utsengar commented Sep 7, 2014

@zarcon didn't work for me, which line did you add it in?

@zarcon
Copy link

zarcon commented Sep 7, 2014

@utkarsh2012 open file AMSmoothAlertView.m

then go to
-(void) performScreenshotAndBlur{
...
bg.transform = CGAffineTransformMakeRotation(M_PI + M_PI_2); // 270 degress
[self addSubview:bg];
}

then go to

-(void) triggerFadeAnimations{
alertView.alpha = 0;
alertView.center = CGPointMake([self screenFrame].size.width/2, ([self screenFrame].size.height/2));

self.transform = CGAffineTransformMakeRotation(M_PI_2); // 90 degress

NSMutableArray* animationBlocks = [NSMutableArray new];
...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants