Latest 1.0.0
Homepage https://github.com/LanarsInc/LNParallaxTVCell
License BSD
Platforms ios 10.0
Authors

LNParallaxTVCell – Swift

[CocoaPods]()
[CocoaPods]()
Swift 5.0
[CocoaPods]()

A subclass of UITableViewCell to present the parallax effect. You won’t use UITableViewDelegate or something else, you can use it simply like UITableViewCell, or customize parallax ratio and another properties.

Preview

Installation

To install via CocoaPods add this lines to your Podfile:

pod 'LNParallaxTVCell'

To install manually LNParallaxTVCell in an app, just drag LNParallaxTVCell.swift class into your project

Usage

  1. Import LNParallaxTVCell module to your class
    import LNParallaxTVCell
  1. Set your UITableViewCell class as LNParallaxTVCell in storyboard or .xib file

  2. Set your image as "parallaxImage" to display

    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    guard let cell = tableView.dequeueReusableCell(withIdentifier: "cellIdentifier") as? LNParallaxTVCell else {
        return UITableViewCell()
    }
    
    cell.parallaxImage.image = UIImage(named: "myImage")      
    
    return cell
    }
  3. Optional – You can change parralaxRatio from 0.0 to 1.0 (default value is 0.5)

    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    guard let cell = tableView.dequeueReusableCell(withIdentifier: "cellIdentifier") as? LNParallaxTVCell else {
        return UITableViewCell()
    }
    
    cell.parallaxImage.image = UIImage(named: "myImage")
    cell.parallaxRatio = 1.0
    
    return cell
    }

Also check out an example project with parralax table view cell

License

Copyright © 2019 Lanars

https://lanars.com

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Latest podspec

{
    "name": "LNParallaxTVCell",
    "version": "1.0.0",
    "summary": "UITableViewCell with parallax effect",
    "description": "A subclass of UITableViewCell to present the parallax effect. You won't use UITableViewDelegate or something else, you could use it simply like UITableViewCell, but also you can customize parallax ratio or another properties.",
    "homepage": "https://github.com/LanarsInc/LNParallaxTVCell",
    "license": "BSD",
    "authors": {
        "Lanars": "https://github.com/LanarsInc"
    },
    "platforms": {
        "ios": "10.0"
    },
    "swift_version": "5.0",
    "source": {
        "git": "https://github.com/LanarsInc/LNParallaxTVCell.git",
        "tag": "1.0.0"
    },
    "source_files": "LNParallaxTVCell/LNParallaxTVCell"
}

Pin It on Pinterest

Share This