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

Added Shadow with option + Improved Interface Orientation Behavior with new Options #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Jeehut
Copy link

@Jeehut Jeehut commented Nov 26, 2014

Like @RomainBoulay I added support for shadows in views. This commit includes both a shadow option and ensures the shadow is presented. In my case the changes @RomainBoulay has made in his push request #22 didn't show any shadow on top of my custom view. Only bringing the shadowView to the front (like I did here) works for me.

@Jeehut
Copy link
Author

Jeehut commented Nov 27, 2014

Starting from the latest stable version (0.1.6) I also now fixed several problems with change of interface orientation. Now there are two new options:

  1. Choose a different height for landscape and portrait modes.
  2. Choose a ratio with which the height should be automatically calculated in relation to the width.

In order to the interface orientations to take effect there's a new method named rotateParallaxViewToInterfaceOrientation that must be called in the ViewController. The following code worked for me (using Swift and XCode 6.1.1):

override func willAnimateRotationToInterfaceOrientation(toInterfaceOrientation: UIInterfaceOrientation, duration: NSTimeInterval) {

        UIView.animateWithDuration(duration, animations: nil, completion: { success in
            self.collectionView?.rotateParallaxViewToInterfaceOrientation(toInterfaceOrientation)
        })
    }

@Jeehut Jeehut changed the title added shadow and option for Views Added Shador, Shadow Option + Improved Interface Orientation Behavior and Options Nov 27, 2014
@Jeehut Jeehut changed the title Added Shador, Shadow Option + Improved Interface Orientation Behavior and Options Added Shadow with option + Improved Interface Orientation Behavior with new Options Nov 27, 2014
@Jeehut Jeehut mentioned this pull request Nov 27, 2014
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

Successfully merging this pull request may close these issues.

None yet

1 participant