PreviewTransition is a simple preview gallery UI controller with animated tranisitions.

Overview

PREVIEW TRANSITION

Preview Transition is a simple preview gallery UI controller with animated tranisitions


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

Stay tuned for the latest updates:


Twitter Travis Carthage compatible CocoaPods CocoaPods codebeat badge Donate

About

This project is maintained by Ramotion, Inc.
We specialize in the designing and coding of custom UI for Mobile Apps and Websites.

Looking for developers for your project?
This project is maintained by Ramotion, Inc. We specialize in the designing and coding of custom UI for Mobile Apps and Websites.


Requirements

  • iOS 9.0+
  • Xcode 9

Licence

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

Installation

Just add the Source folder to your project or use CocoaPods like this:

pod "PreviewTransition"

or Carthage users can simply add to their Cartfile:

github "Ramotion/preview-transition"

Usage

  1. import PreviewTransition

  2. Create UITableViewController inherit, inheriting from PTTableViewController

  3. Add UITableViewDelegate methods

public override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
    return <RowsCount>
}

public override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
    return tableView.dequeueReusableCellWithIdentifier(<CellIdentifier>, forIndexPath: indexPath)
}
  1. add a ParallaxCell

storyboards: create a cell and inherit from ParallaxCell; don't forget set the identifier

or programmatically: register a cell in viewDidLoad tableView.registerClass(ParallaxCell, forCellReuseIdentifier: )

  1. set cell height

  2. create image names (image sizes must be equal to screen size or bigger)

let images = [image_name, image_name, image_name, image_name, image_name] // image names
  1. set image and text for ParallaxCell
public override func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {

    guard let cell = cell as? ParallaxCell else {
      return
    }

    let imageName = images[indexPath.row]

    if let image = UIImage(named: imageName) {
      cell.setImage(image, title: <SetText>)
    }
}

your tableViewController should look like DemoTableViewController

Method public override func tableView(tableView: didSelectRowAtIndexPath indexPath:) we will add later. (step 10)

  1. Create UIViewController, inheriting from PTDetailViewController

  2. Add action for backButton and call popViewController()

func backButtonHandler() {
    popViewController()
}
  1. Push this UIViewController in UITableViewController. Add method
public override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {

  // create viewController
  let <YourViewController> = storyboard?.instantiateViewControllerWithIdentifier(<identifier>)
  if case let viewController as <YourViewController> = viewController {
     pushViewController(viewController)
  }
}
  1. Configure UINavigationBar
// transparent background
UINavigationBar.appearance().setBackgroundImage(UIImage(), forBarMetrics: .Default)
UINavigationBar.appearance().shadowImage = UIImage()
UINavigationBar.appearance().translucent = true
UINavigationBar.appearance().tintColor = .whiteColor()

// set font
if let font = UIFont(name: <Font name> , size: 18) {
      UINavigationBar.appearance().titleTextAttributes = [
        NSForegroundColorAttributeName : UIColor.whiteColor(),
        NSFontAttributeName : font
      ]
}

📄 License

Preview Transition 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 https://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.



Comments
  • How i can run it on Xcode 7.2?

    How i can run it on Xcode 7.2?

    Ive tried to run it on Xcode 7.2 but getting this error.

    Type of expression is ambiguous without more context

    . Can anyone please tell me how i can resolve it or anyone please send me that project for 7.2. Thanks

    Error

    opened by zafar007 2
  • Can't show DetailViewController on didSelectRowAt

    Can't show DetailViewController on didSelectRowAt

    fatalError("current cell is empty or add navigationController")

    Couldn't find a way around after some good time searching in the Xcode example project and digging in stackoverflow, i appreciate any help.

    opened by ElyDantas 1
  • Image Content Mode

    Image Content Mode

    How to set image content mode after loading image into ImageView ?

    Tried many ways, no success:

    cell.imageView?.contentMode = .scaleAspectFit cell.bgImage?.contentMode = .scaleAspectFit cell.backgroundView?.contentMode = .scaleAspectFit

    opened by ElyDantas 1
  • How to change opened cell view?

    How to change opened cell view?

    I want to change the image view to the top rather than in center and the animation to be as it is ( image moving to center on the out). Help me out on this.

    opened by RFyre00 1
  • Use of unresolved operator '>>>-'  complie in swift 3  error

    Use of unresolved operator '>>>-' complie in swift 3 error

    [NSLayoutAttribute.left, .right, .bottom, .top].forEach { attribute in (self.controlView, screnShotImageView) >>>- { $0.attribute = attribute return }

    Use of unresolved operator '>>>-'

    please help me thanks

    opened by zhiblin 1
  • Inspectable foregroundAlpha not working

    Inspectable foregroundAlpha not working

    I implemented the library and it works great, but when I set the tableCell inspectable foregroundAlpha it just ignore it and keep using the default 0.5 value, another issue is the foregroundColor is not showing as inspectable when I select the tableCell, can you help me to figure out how to fix this?

    opened by ghernagon 0
  • Visual glitch on closing cell (when having cells fewer than screen height)

    Visual glitch on closing cell (when having cells fewer than screen height)

    Hello,

    First of all, I want to say thanks for this awesome lib!

    But I'm having some visual glitches when collapsing cells if total height of cells is less than screen size (e.g. having just one cell):

    ezgif-4-9e2152c814d1

    I was able also to reproduce this bug in demo project:

    1. Change DemoTableViewController to return 1 instead of 100 tableView(_: UITableView, numberOfRowsInSection _: Int) method
    2. Launch app, select single cell
    3. When clicking on <, cell collapse with a visual glitch

    Any idea of how this can be fixed?

    Thank you in advance, Anton

    opened by antonc27 0
  • demo issues

    demo issues

    The demo has some unusual setups that will take to understand without proper commenting, so i thought to just ask. Why two back buttons on the detail view, and why does commenting one out or th other cause such erratic animation on the return to the main view?

    And.. none of the buttons are hooked up, and my usual code techniques employed in many other apps to attach a tap gesture to a view are not working. A dropped button works but not the tap. I suspect your overlays may somehow be eating the tap (but then why does the button itself work?)

    opened by wdcurry 3
  • How to set with Programmatically?

    How to set with Programmatically?

    Hi @RamotionRussell

    I'm trying to use this library with fullcode or programmatically not with storyboard or xib, so how to use this library or you can make example to use it. i'm very thanks for you 👍

    opened by devcaststudio 0
Owner
Ramotion
UI Engineering, UI/UX Design and Front-End Development Agency
Ramotion
Typed, yet Flexible Table View Controller

ConfigurableTableViewController Simple view controller that provides a way to configure a table view with multiple types of cells while keeping type s

Arek Holko 270 Oct 15, 2022
Generic table view controller with external data processing

FlexibleTableViewController Swift library of generic table view controller with external data processing of functionality, like determine cell's reuse

Dmytro Pylypenko 9 May 20, 2018
Simple static table views for iOS in Swift.

Simple static table views for iOS in Swift. Static's goal is to separate model data from presentation. Rows and Sections are your “view models” for yo

Venmo 1.3k Nov 19, 2022
A simple way to create a UITableView for settings in Swift.

QuickTableViewController A simple way to create a table view for settings, including: Table view cells with UISwitch Table view cells with center alig

Cheng-Yao Lin 525 Dec 20, 2022
Simple and beautiful stacked UIView to use as a replacement for an UITableView, UIImageView or as a menu

VBPiledView simple but highly effective animation and interactivity! By v-braun - viktor-braun.de. Preview Description Very simple and beautiful stack

Viktor Braun 168 Jan 3, 2023
Simple timeline view implemented by UITableViewCell

TimelineTableViewCell TimelineTableViewCell is a simple timeline view implemented by UITableViewCell. The UI design of TimelineTableViewCell is inspir

Zheng-Xiang Ke 1.3k Dec 25, 2022
Simple single-selection or multiple-selection checklist, based on UITableView

SelectionList Simple single-selection or multiple-selection checklist, based on UITableView. Usage let selectionList = SelectionList() selectionList.i

Yonat Sharon 111 Oct 6, 2022
Highly customizable Action Sheet Controller with Assets Preview written in Swift

PPAssetsActionController Play with me ▶️ ?? If you want to play with me, just tap here and enjoy! ?? ?? Show me ?? Try me ?? The easiest way to try me

Pavel Pantus 72 Feb 4, 2022
Highly customizable Action Sheet Controller with Assets Preview written in Swift

PPAssetsActionController Play with me ▶️ ?? If you want to play with me, just tap here and enjoy! ?? ?? Show me ?? Try me ?? The easiest way to try me

Pavel Pantus 72 Feb 4, 2022
This simple cordova plugin will download picture from an URL and save to IOS Photo Gallery.

Photo Viewer This plugin is intended to download a picture from an URL into IOS Photo library.. How to Install Cordova: cordova plugin add https://git

Alwin jose 1 Oct 23, 2021
An iOS/tvOS photo gallery viewer, useful for viewing a large (or small!) number of photos.

This project is unmaintained. Alex passed away in an accident in late 2019. His love of iOS development will always be remembered. AXPhotoViewer AXPho

Alex Hill 596 Dec 30, 2022
🖼 Gallery App for Harvest (Elm Architecture + Optics) + SwiftUI + Combine.

?? Harvest-SwiftUI-Gallery Gallery App for Harvest (Elm Architecture + Optics) + SwiftUI + Combine. Examples Todo List Stopwatch GitHub Search TimeTra

Yasuhiro Inami 160 Oct 17, 2022
Work in progress gallery of controls available to Catalyst apps using Optimized for Mac

Catalyst Controls Gallery Very simple work-in-progress demonstration of many common controls available to Mac Catalyst as of macOS 11. Provided moreso

Steven Troughton-Smith 163 Sep 18, 2022
🖼 Gallery App for Actomaton (async/await + Elm Architecture) + SwiftUI.

?? Actomaton-Gallery Gallery App for Actomaton (async/await + Elm Architecture) + SwiftUI. NOTE: Most of the code are reused from Harvest-SwiftUI-Gall

Yasuhiro Inami 44 Dec 20, 2022
IRGallery-swift is a powerful gallery for iOS.

IRGallery-swift IRGallery-swift is a powerful gallery for iOS. Features Captions. Rotation support. Load images locally or from a web URL. Custom UITa

Phil Chang 1 Oct 6, 2021
A photo gallery for iOS with a modern feature set. Similar features as the Facebook photo browser.

EBPhotoPages ”A photo gallery can become a pretty complex component of an app very quickly. The EBPhotoPages project demonstrates how a developer coul

Eddy Borja 1.7k Dec 8, 2022
iOS photo gallery written in Swift

SwiftPhotoGallery Overview A full screen photo gallery for iOS and tvOS written in Swift. Photos can be panned and zoomed (iOS only) Pinch to zoom (iO

Justin Vallely 271 Dec 17, 2022
A Photo and Video Gallery

================== bitcoin:1Lj45X69tPYAPqnZP2c9Ccs349fC2CEMQo Podfile platform :ios, '7.0' pod 'MHVideoPhotoGallery' Supported Videos Youtube Vimeo We

Mario Hahn 2k Jan 4, 2023
Applies filter to a selected image from the Gallery using Combine

CombinePhotoFiltering App CombinePhotoFiltering is an app that applies sepia and bloom to a selected picture from the Photos app. Highlights The app i

Mauricio Esteves 0 Nov 14, 2021
Gallery has a clearer flow based on albums and focuses on the use case of selecting video

Description We all love image pickers, don't we? You may already know of ImagePicker, the all in one solution for capturing pictures and selecting ima

null 1 Sep 14, 2022