https://github.com/viewdidappear/bdmirrorview
BDMirrorView is a UIView subclass, which mirrors itself on a chosen "floor."
https://github.com/viewdidappear/bdmirrorview
cagradientlayer calayer careplicatorlayer coreanimation gui ios objective-c reflection swift
Last synced: about 2 months ago
JSON representation
BDMirrorView is a UIView subclass, which mirrors itself on a chosen "floor."
- Host: GitHub
- URL: https://github.com/viewdidappear/bdmirrorview
- Owner: viewDidAppear
- License: mit
- Created: 2022-06-29T14:48:49.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-29T15:10:04.000Z (almost 4 years ago)
- Last Synced: 2025-02-09T03:19:44.080Z (over 1 year ago)
- Topics: cagradientlayer, calayer, careplicatorlayer, coreanimation, gui, ios, objective-c, reflection, swift
- Language: Swift
- Homepage:
- Size: 113 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BDMirrorView
A fast and efficient UIView subclass which renders its own reflection, live.

[](https://raw.githubusercontent.com/viewDidAppear/BDMirrorView/master/LICENSE)
[](http://cocoadocs.org/docsets/BDMirrorView)
[](https://cocoapods.org/pods/BDMirrorView)
[](https://twitter.com/viewDidAppear)
[](https://viewDidAppear.github.io)
---
`BDMirrorView` is a `CAReplicatorLayer`-backed `UIView` subclass which can be used to render a live content reflection in an iOS app. If you're struggling to understand why this view exists, just think back to Cover Flow (rip..) and the reflection below each item....
## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
# Features
* Render a reflection on the top, left, bottom or right-hand side of the view.
* Customise the distance of the reflection from the parent.
* Use a masking gradient, or not.
# Usage
Set the class of the UIView to `BDMirrorView` in the Storyboard, or create an IBOutlet. 🙌
# Installation & Compatibility
`BDMirrorView` will work wherever this version of Swift will compile.
## Manual (aka Tried & True)
Download the repo and add it into your Xcode project.
## CocoaPods
```ruby
pod 'BDMirrorView'
```
# Why? WHY?
No reason. Have fun!
# Credits
`BDMirrorView` was created by [Benjamin Deckys](https://github.com/viewDidAppear)
# License
`BDMirrorView` is available under the MIT license. Please see the [LICENSE](LICENSE) file for more information.