Awesome iOS 11 appstore cards in swift 5.

Overview

GitHub Stars Pod Version Platform License

Overview

Cards brings to Xcode the card views seen in the new iOS XI Appstore.

Getting Started

Storyboard

  • Go to main.storyboard and add a blank UIView
  • Open the Identity Inspector and type 'CardHighlight' the 'class' field
  • Make sure you have 'Cards' selected in 'Module' field
  • Switch to the Attributes Inspector and configure it as you like.

CardViewStoryboard

  • Drag a blank UIViewController and design its view as you like
  • Move to the Identity inspector
  • Type 'CardContent' in the StoryboardID field.

DetailViewStoryboard

Code

import Cards

// Aspect Ratio of 5:6 is preferred
let card = CardHighlight(frame: CGRect(x: 10, y: 30, width: 200 , height: 240))

card.backgroundColor = UIColor(red: 0, green: 94/255, blue: 112/255, alpha: 1)
card.icon = UIImage(named: "flappy")
card.title = "Welcome \nto \nCards !"
card.itemTitle = "Flappy Bird"
card.itemSubtitle = "Flap That !"
card.textColor = UIColor.white
    
card.hasParallax = true
    
let cardContentVC = storyboard!.instantiateViewController(withIdentifier: "CardContent")
card.shouldPresent(cardContentVC, from: self, fullscreen: false)
    
view.addSubview(card)

GetStarted

Prerequisites

  • Xcode 10.2 or newer
  • Swift 5.0

Installation

Cocoapods

use_frameworks!
pod 'Cards'

Manual

  • Download the repo
  • ⌘C ⌘V the 'Cards' folder in your project
  • In your Project's Info go to 'Build Phases'
  • Open 'Compile Sources' and add all the files in the folder

Overview

Customization

//Shadow settings
var shadowBlur: CGFloat
var shadowOpacity: Float
var shadowColor: UIColor
var backgroundImage: UIImage?
var backgroundColor: UIColor

var textColor: UIColor 	//Color used for the labels
var insets: CGFloat 	//Spacing between content and card borders
var cardRadius: CGFloat //Corner radius of the card
var icons: [UIImage]? 	//DataSource for CardGroupSliding
var blurEffect: UIBlurEffectStyle //Blur effect of CardGroup

Usage

CardPlayer

let card = CardPlayer(frame: CGRect(x: 40, y: 50, width: 300 , height: 360))
card.textColor = UIColor.black
card.videoSource = URL(string: "http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4")
card.shouldDisplayPlayer(from: self)    //Required. 
        
card.playerCover = UIImage(named: "mvBackground")!  // Shows while the player is loading
card.playImage = UIImage(named: "CardPlayerPlayIcon")!  // Play button icon
        
card.isAutoplayEnabled = true
card.shouldRestartVideoWhenPlaybackEnds = true
        
card.title = "Big Buck Bunny"
card.subtitle = "Inside the extraordinary world of Buck Bunny"
card.category = "today's movie"
        
view.addSubview(card)

CardGroupSliding

    let icons: [UIImage] = [    
    
        UIImage(named: "grBackground")!,
        UIImage(named: "background")!,
        UIImage(named: "flappy")!,
        UIImage(named: "flBackground")!,
        UIImage(named: "icon")!,
        UIImage(named: "mvBackground")!
    
    ]   // Data source for CardGroupSliding
    
    let card = CardGroupSliding(frame: CGRect(x: 40, y: 50, width: 300 , height: 360))
    card.textColor = UIColor.black
    
    card.icons = icons
    card.iconsSize = 60
    card.iconsRadius = 30
    
    card.title = "from the editors"
    card.subtitle = "Welcome to XI Cards !"

    view.addSubview(card)

Documentation

See the Wiki, to learn in depth infos about Cards.
GO!

Issues & Feature requests

If you encounter any problems or have any trouble using Cards, feel free to open an issue. I'll answer you as soon as I see it.

New features, or improvements to the framework are welcome (open an issue).

Thanksto

License

Cards is released under the MIT License.

Issues
  • Display and animation issues on iOS 12

    Display and animation issues on iOS 12

    I'm pretty sure you have noticed by now, but when using cards (at least CardArticle) on iOS 12, several things go horribly wrong, beginning with text that's displayed darker than it should be to severe bounds and animation issues.

    I really don't know where to start honestly, so I took a short screen capture to show what exactly I mean (https://youtu.be/SHeDv5e89C8)

    I hope you can resolve the issue soon, looking forward to a response :)

    bug 
    opened by Medwe 37
  • Card Animation Return Glitchy

    Card Animation Return Glitchy

    ezgif com-optimize

    When creating a Card on my own application as well as running the demo project I noticed that whenever one "swipes away" a Card it goes to the top left corner of the display for about 2 seconds and then returns abruptly to it's original position. Is this intentional? or am I the only one experiencing this?

    Edit: I added a gif to show this in action. Also, this same bug persists inside both the emulator, real device (iPhone 7 iOS 12). And I even downloaded your demo project to see if it was just my implementation but the problem exists in the demo as well. It happens everytime and it looks terrible, thinking of removing the whole card functionality and just have it segue into another ViewController at this point.

    opened by EliteByte 27
  • UITableView in DetailView

    UITableView in DetailView

    A Reopen of case #31 Hi, I've tried to implement a UITableView inside the DetailView but as mention in #31 the scroll acts up and it doesn't function the way it should.

    I tried disabling the scroll on the table view and yes that does make the scroll work properly but then when I scroll to the bottom it's cutting off the tableview as in it's not resizing to the height of the tableview.

    I want to achieve something like: 34078976-3ca3549c-e367-11e7-9b7e-79a522ec35e8

    This is what the result is: iph_git_cards

    The table view should show all the way until Row:2 Section:5 but it is cut off.

    Any help would be much appreciated. Thanks in advanced.

    opened by zaccadams 11
  • Remove 'view' button

    Remove 'view' button

    Can we have the view button removable or interchangeable. Maybe make it a public property or just provide a method to get it and set it to nil?

    opened by J7mbo 9
  • Sample Code or Example

    Sample Code or Example

    Please Include sample code or example.

    opened by askari01 9
  • Tableview bug - After open 3-4 cells, the detailedView is empty

    Tableview bug - After open 3-4 cells, the detailedView is empty

    Hi,

    I really love this project! I have a issue, after opened up some few cells, the detailedView is empty. See the gif for example. This example is from the Demo.

    TableViewIssue2

    How can i fix this?

    Thanks

    bug 
    opened by asbis 9
  • Dismiss detailViewController on iOS 13 Simulators

    Dismiss detailViewController on iOS 13 Simulators

    Hi Paolo There's a bug compiling with Xcode 11 beta and iOS 13 beta ...

    The cards open correctly but when you close the detail view the screen becomes black and there is no way to do anything more

    In addition, opening the CardPlayer causes the app to crash.

    *** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:<Player.Player: 0x1040b0800> should have parent view controller:<ViewController.DetailViewController: 0x103332d30> but actual parent is:<MyProject.CardsViewController: 0x103320520>'

    Thank you so much for your valuable work

    Vanni

    bug 
    opened by Ragazzetto 8
  • Failed to build Objective-C

    Failed to build Objective-C

    When importing Cards it just says 'Failed to build objective-C library'. Im running the latest xcode and swift versions. Please help as I really want to use this awesome pod!

    bug 
    opened by thijsheijden 7
  • Swift Compilier Error at

    Swift Compilier Error at "Demo"

    error

    Sorry to bother you, I did the 'pod install' ,and ⌘C ⌘V the 'Cards' folder to your demo project.......and I am using the latest xcode(10.2)

    opened by thevenomsnake 7
  • Questions about cards

    Questions about cards

    Hi Paolo, I have three questions for you. 1. Is it possible to hide the "VIEW" button on the card in this release of Cards? 2. Is it possibile show the card content inside a frame with each corner rounded (not just the upper corners)? 3. Is it possible hide the X button inside the card content view? Is there the possibility to add a custom way to dismiss the card content? Thanks

    opened by ghost 6
  • How to create multiple cards using code?

    How to create multiple cards using code?

    Hi,

    I got this working and tested in my project fine.

    But, is there any way to create multiple cards using something like JSON?

    Thanks

    opened by phiasco12 0
  • IOS14 XCODE BETA 4 : Return black screen after dismiss CardView

    IOS14 XCODE BETA 4 : Return black screen after dismiss CardView

    Hi there, Version : Xcode 12 beta4 with IOS 14 Issue : Return to black screen after dismiss detail view tried to change cardContentVC.modalPresentationStyle = (.fullScreen) but not working for me

    opened by WhiteAvocad0 4
  • Black Screen and Crash!

    Black Screen and Crash!

    After a fullscreen showing, the app shows a black screen. The app must be reopened. How it fix it?

    PS.I haven't change any code inside Thanks

    opened by Geeks2020 1
  • Crash when player card is tapped for fullscreen effect

    Crash when player card is tapped for fullscreen effect

    Hello. Ty again for the great app. I noticed there is a crash on iPhone 11 in the simulator when clicking the player video card to go full screen. The crash error is.

    'UIViewControllerHierarchyInconsistency', reason: 'child view controller:<Player.Player: 0x7fcd6898aa00> should have parent view controller:<Cards.DetailViewController: 0x7fcd67d781e0> but actual parent is:<Superapps.PlayerViewController: 0x7fcd67d67490>'

    any ideas, guys?

    opened by tonycrencren 0
  • Crash!

    Crash!

    When clicking on one view, it suddenly froze and went to app delegate. I couldn't move or touch the screen. Other views made the app go black. Why is this?

    opened by jeremygautama 1
  • How to Support Dark Mode

    How to Support Dark Mode

    Hi, I'm relatively new to ios development and I love the cards so far. I was just wondering the best way to implement dark mode. My issue right now is that I have a CardHighlight on a black background, and when I press on the card to open the CardContent, during the animation of the card opening the original black background fades to a white. Furthermore, if dark mode is turned on while the app is running, the background of CardContent does not adapt to this change until the animation is over. So for example if my simulator is in light mode, then I build and run my app, and then I press on the card, it opens CardContent with no issues. But say I then go to enable dark mode on the simulator and then press the card to open it, the CardContent remains white until the animation is finished, and only then becomes black. I have attached my project files. Thanks for your help!

    Test.zip

    opened by artemas-radik 0
  • New update turns the view black after closing the view

    New update turns the view black after closing the view

    Hi

    I just updated my app with the newest update to this project. Now, when i close a card, the screen turns black.

    I also tried it with the demo app, and it also turns itself black. I am looking into the issue. And will post update as soon as i have found the bug. But if you have found it, let me know.

    opened by asbis 2
  • Shadow offset customization

    Shadow offset customization

    image image

    As we can see on App Store cards have a shadow offset.

    It would be nice if your project had this feature as well!

    opened by carbongo 0
  • [Question] Is it possible to change it to new SwiftUI?

    [Question] Is it possible to change it to new SwiftUI?

    Hello I like the Cards and plan to change everything to the new SwiftUI.

    I just don't know how to open the card animation with SwiftUI. I have already created cards.

    Is it possible to update to SwiftUI? or is there someone who might be able to help me?

    Thanks ZanderCodes

    opened by zandercodes 0
  • change font in Card Group Sliding

    change font in Card Group Sliding

    Is it possible to change font in Card Group Sliding ?

    enhancement 
    opened by Kendokai 1
Releases(1.4.0)
Owner
Paolo Cuscela
Paolo Cuscela
Innovative twist to Tinder cards for iOS.

Tons of apps use a Tinder-style interface with cards that users can swipe right to 'like' or left to 'dislike'. But Yaroslav Zubko came up with an innovative and fresh approach to giving users more options besides just 'like' or 'dislike'.

Saoud Rizwan 1k Nov 12, 2021
Swipe able, customizable card stack view, Tinder like card stack view based on UICollectionView. Cards UI

Swipable, customizable card stack view, Tinder like card stack view based on UICollectionView. Cards UI Сocoapods installation Add in your Podfile: po

Indy 816 Nov 12, 2021
Presenting timelines as cards, single or bundled in scrollable feed!

TimelineCards ?? Autogenerated timelines presented as cards ?? ?? Single or bundled into feed ?? Installation CocoaPods (wtf is that?) Add pod 'Timeli

Vlad Averin 419 Nov 8, 2021
A navigation controller that displays its view controllers as an interactive stack of cards.

CardNavigation The easiest way to turn a navigation controller into an interactive stack of cards. Highlights ✅ Fully interactive and interruptible ✅

James Randolph 32 Oct 9, 2021
Awesome looking Dial like card selection ViewController

KVCardSelectionVC Awesome looking Dial like card selection ViewController An updated Swift 3 working version of : https://github.com/atljeremy/JFCardS

Kunal Verma 23 Feb 1, 2021
A reactive, card-based UI framework built on UIKit for iOS developers.

CardParts - made with ❤️ by Intuit: Example Requirements Installation Communication & Contribution Overview Quick Start Architecture CardsViewControll

Intuit 2.4k Nov 19, 2021
A marriage between the Shazam Discover UI and Tinder, built with UICollectionView in Swift.

VerticalCardSwiper A marriage between the Shazam Discover UI and Tinder, built with UICollectionView in Swift. Project goal and information The goal o

Joni Van Roost 1k Nov 25, 2021
Awesome iOS 11 appstore cards in swift 5.

Cards brings to Xcode the card views seen in the new iOS XI Appstore. Getting Started Storyboard Go to main.storyboard and add a blank UIView Open the

Paolo Cuscela 4k Nov 19, 2021
Awesome iOS 11 appstore cards in swift 5.

Cards brings to Xcode the card views seen in the new iOS XI Appstore. Getting Started Storyboard Go to main.storyboard and add a blank UIView Open the

Paolo Cuscela 4k Nov 26, 2021
Appstore card animation transition. UICollectionView and UITableView card expand animated transition for iOS

appstore-card-transition Appstore card animation transition. UICollectionView and UITableView card expand animated transition. This library tries to a

appssemble 494 Nov 18, 2021
Simple camera application for iOS that uploads pictures to WebDAV server or Dropbox quickly. Available on the AppStore.

Upupu Simple camera application for iOS that uploads pictures to WebDAV server or Dropbox quickly. Also available on the AppStore. Features Easy and f

Xcoo 58 Oct 26, 2021
Accept credit cards and PayPal in your iOS app

Important: PayPal Mobile SDKs are Deprecated. The APIs powering them will remain operational long enough for merchants to migrate, but the SDKs themse

PayPal 977 Nov 18, 2021
Accept credit cards and PayPal in your iOS app

Important: PayPal Mobile SDKs are Deprecated. The APIs powering them will remain operational long enough for merchants to migrate, but the SDKs themse

PayPal 978 Nov 24, 2021
iOS custom controller used in Jobandtalent app to present new view controllers as cards

CardStackController iOS custom controller used in the Jobandtalent app to present new view controllers as cards. This controller behaves very similar

jobandtalent 535 Nov 12, 2021
General-purpose contextual cards for iOS

BulletinBoard BulletinBoard is an iOS library that generates and manages contextual cards displayed at the bottom of the screen. It is especially well

Alexis (Aubry) Akers 5.2k Nov 23, 2021
KolodaView is a class designed to simplify the implementation of Tinder like cards on iOS.

KolodaView Check this article on our blog. Purpose KolodaView is a class designed to simplify the implementation of Tinder like cards on iOS. It adds

Yalantis 5k Nov 19, 2021
Innovative twist to Tinder cards for iOS.

Tons of apps use a Tinder-style interface with cards that users can swipe right to 'like' or left to 'dislike'. But Yaroslav Zubko came up with an innovative and fresh approach to giving users more options besides just 'like' or 'dislike'.

Saoud Rizwan 1k Nov 12, 2021
General-purpose contextual cards for iOS

BulletinBoard BulletinBoard is an iOS library that generates and manages contextual cards displayed at the bottom of the screen. It is especially well

Alexis (Aubry) Akers 5.2k Nov 25, 2021
General-purpose contextual cards for iOS

BulletinBoard BulletinBoard is an iOS library that generates and manages contextual cards displayed at the bottom of the screen. It is especially well

Alexis (Aubry) Akers 5.2k Nov 19, 2021
Virgil Core SDK allows developers to get up and running with Virgil Cards Service API quickly and add end-to-end security to their new or existing digital solutions to become HIPAA and GDPR compliant and more.

Virgil Core SDK Objective-C/Swift Introduction | SDK Features | Installation | Configure SDK | Usage Examples | Docs | Support Introduction Virgil Sec

Virgil Security, Inc. 26 Aug 11, 2021
Swipe able, customizable card stack view, Tinder like card stack view based on UICollectionView. Cards UI

Swipable, customizable card stack view, Tinder like card stack view based on UICollectionView. Cards UI Сocoapods installation Add in your Podfile: po

Indy 816 Nov 12, 2021
Presenting timelines as cards, single or bundled in scrollable feed!

TimelineCards ?? Autogenerated timelines presented as cards ?? ?? Single or bundled into feed ?? Installation CocoaPods (wtf is that?) Add pod 'Timeli

Vlad Averin 419 Nov 8, 2021
Wallet is a library to manage cards and passes.

Wallet Wallet is a replica of the Apple's Wallet interface. Add, delete or present your cards and passes. Feel free to use this pod in your project an

Russ St Amant 359 Nov 19, 2021
A navigation controller that displays its view controllers as an interactive stack of cards.

CardNavigation The easiest way to turn a navigation controller into an interactive stack of cards. Highlights ✅ Fully interactive and interruptible ✅

James Randolph 32 Oct 9, 2021
A navigation controller that displays its view controllers as an interactive stack of cards.

CardNavigation The easiest way to turn a navigation controller into an interactive stack of cards. Highlights ✅ Fully interactive and interruptible ✅

James Randolph 32 Oct 9, 2021
🃏Memory Game🃏is a course assignment of CS193p (2020 Spring) at Stanford University. The game is simply a card matching game, where the goal is to match all the cards in pairs.

memory-card-matching-game Overview This is a course assignment of CS193p (2020 Spring) at Stanford University. The game is simply a card matching game

Archie Liu 5 Oct 1, 2021
Super awesome Swift minion for Core Data (iOS, macOS, tvOS)

⚠️ Since this repository is going to be archived soon, I suggest migrating to NSPersistentContainer instead (available since iOS 10). For other conven

Marko Tadić 309 Jul 30, 2021
Font Awesome swift library for iOS.

Font Awesome Swift Follow me: @vaberer I like ★. Do not forget to ★ this super convenient library. Added UISegmentedControl & UITabbarItem & UISlider

Patrik Vaberer 749 Nov 10, 2021
✨ Awesome Dropdown menu for iOS with Swift 5.0

YNDropDownMenu Updates See CHANGELOG for details Introduction The eligible dropdown menu for iOS, written in Swift 5, appears dropdown menu to display

Kyle Yi 1.3k Nov 12, 2021