All Projects → Ramotion → Elongation Preview

Ramotion / Elongation Preview

Licence: mit
ElongationPreview is an elegant UI push-pop style view controller. iOS library made by @Ramotion

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Elongation Preview

Yasumi
The easy PHP Library for calculating holidays
Stars: ✭ 788 (-11.26%)
Mutual labels:  library
Cup
CUP, common useful python-lib. (Currently, Most popular python lib in baidu)
Stars: ✭ 826 (-6.98%)
Mutual labels:  library
Arma3launcherlib
Simple .NET library containing everything needed for a custom Arma 3 launcher.
Stars: ✭ 7 (-99.21%)
Mutual labels:  library
M3u8
Parser and generator of M3U8-playlists for Apple HLS. Library for Go language. 🎦
Stars: ✭ 800 (-9.91%)
Mutual labels:  library
Zlib Ng
zlib replacement with optimizations for "next generation" systems.
Stars: ✭ 807 (-9.12%)
Mutual labels:  library
Tfidf
Simple TF IDF Library
Stars: ✭ 6 (-99.32%)
Mutual labels:  library
Scrollbooster
Enjoyable content drag-to-scroll library
Stars: ✭ 775 (-12.73%)
Mutual labels:  library
Storagedb
MongoDB-like API for HTML5 Storage (localStorage and sessionStorage)
Stars: ✭ 16 (-98.2%)
Mutual labels:  library
Devtools
The Hoa\Devtools library.
Stars: ✭ 5 (-99.44%)
Mutual labels:  library
Sumologic Python
Sumologic's python api library
Stars: ✭ 6 (-99.32%)
Mutual labels:  library
Vlany
Linux LD_PRELOAD rootkit (x86 and x86_64 architectures)
Stars: ✭ 804 (-9.46%)
Mutual labels:  library
Swipeablecard
A simple implementation of swipe card like StreetView
Stars: ✭ 812 (-8.56%)
Mutual labels:  library
Experiment
🔬 Elixir Library for carefully refactoring critical paths by performing experiments.
Stars: ✭ 6 (-99.32%)
Mutual labels:  library
Slim.js
Fast & Robust Front-End Micro-framework based on modern standards
Stars: ✭ 789 (-11.15%)
Mutual labels:  library
Greedo Layout For Ios
Full aspect ratio grid layout for iOS
Stars: ✭ 837 (-5.74%)
Mutual labels:  library
Etl
Embedded Template Library
Stars: ✭ 783 (-11.82%)
Mutual labels:  library
Rulerz
Powerful implementation of the Specification pattern in PHP
Stars: ✭ 827 (-6.87%)
Mutual labels:  library
Matter
Material Design Components in Pure CSS. Materializing HTML at just one class per component 🍰
Stars: ✭ 888 (+0%)
Mutual labels:  library
Realm Core
Core database component for the Realm Mobile Database SDKs
Stars: ✭ 836 (-5.86%)
Mutual labels:  library
System.js
The library System.js designed to improve the quality of writing JavaScript source code. It contains features that allow you refactor source code. Thanks to the clear and readable functions, the code will be good understood and supported accordingly.
Stars: ✭ 6 (-99.32%)
Mutual labels:  library

ELONGATION PREVIEW

Elongation Preview is an elegant UI push-pop style view controller for iOS.


We specialize in the designing and coding of custom UI for Mobile Apps and Websites.

Stay tuned for the latest updates:

Twitter PodPlatform PodVersion Documentation Donate Carthage Codebeat


Requirements

  • iOS 9.0+
  • Xcode 8
  • Swift 3 (<= 1.0.5)
  • Swift 4 (>= 1.1)

Installation

You can install ElongationPreview in several ways:

  • Add source files to your project.

pod 'ElongationPreview'

github "Ramotion/elongation-preview"

How to use

First of all, import module to your source file.

import ElongationPreview

ElongationViewController

Then subclass ElongationViewController and configure it as you wish.

class RootViewController: ElongationViewController { }

Now you must register reusable cell in tableView. If you prefer to use Storyboards, you can drag UITableViewCell from bottom-right menu, lay it out and change it's class to ElongationCell. Of course, there are some specific requirements on how you can configure cell's subviews.

ElongationCell

  • Easier way: copy DemoElongationCell from demo project and change it as you wish. Add your own views to top, bottom and scalable containers.

  • If you want to create cell from scratch, this is how your cell hierarchy should look like:

    hierarchy

    Required properties:

    bottomView — the view which comes from behind the cell when you tap on the cell.

    scalableView — the view which will be scaled when you tap on the cell.

    topView — static top view, add here all the views which won't be scaled and must stay on their position.

    Also you must connect this constraints: topViewHeightConstraint, topViewTopConstraint, bottomViewHeightConstraint, bottomViewTopConstraint.


📌 If you need to override

func scrollViewDidScroll(_ scrollView: UIScrollView)

or

func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath)

you must call super because some important configuration was made in these methods in superclass (ElongationViewController).


ElongationDetailViewController

class DetailViewController: ElongationDetailViewController { }

If you want to display some details for objects from the root view, it's better to subclass ElongationDetailViewController and configure it for displaying your data.

This class holds headerView property which actually represents ElongationCell in expanded state and it'll be used as a header for tableView by default.

📌 Override openDetailView(for: IndexPath) method, create your ElongationDetailViewController instance and call expand(viewController: ElongationDetailViewController, animated: Bool) method with this instance.

This is the place where you need to configure your ElongationDetailViewController subclass.


Appearance & Behaviour

You can customize both appearance & behaviour of ElongationPreview control by tuning some params of ElongationConfig and overriding shared instance.

// Create new config.
var config = ElongationConfig()

// Change desired properties.
config.scaleViewScaleFactor = 0.9
config.topViewHeight = 190
config.bottomViewHeight = 170
config.bottomViewOffset = 20
config.parallaxFactor = 100
config.separatorHeight = 0.5
config.separatorColor = .white

// Save created config as `shared` instance.
ElongationConfig.shared = config

🗒 All parameters with their descriptions listed in ElongationConfig file.

📄 License

Elongation Preview is released under the MIT license. See LICENSE for details.

This library is a part of a selection of our best UI open-source projects.

If you use the open-source library in your project, please make sure to credit and backlink to www.ramotion.com

📱 Get the Showroom App for iOS to give it a try

Try this UI component and more like this in our iOS app. Contact us if interested.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].