Code Monkey home page Code Monkey logo

rgcardviewlayout's Introduction

RGCardViewLayout

demo

Watch it in action here This is a layout that clones the interaction of going through cities in the City Guide App. (this app is #3 for the top iOS app animations on the raywenderlich

To use this simply drop it in as a class in the storyboard or nib when you create your collection view. or you can instantiate it in code and give it your collection view(via initWithFrame:collectionViewLayout: or just set the layout propery of the collection View. and you can use your collection View as you always do.

One important this for this layout is that in the datasource protcol to specify the number of cards you must use numberOfSectionsInCollectionView: , and for collectionView:numberOfItemsInSection: you must always return 1.

also note that the itemsize is computed by the layout to be "appropriate" to the size of the collection view itself so setting it won't do anything.

Place the following line into your podfile to use RGCardViewLayout: pod 'RGCardViewLayout','1.0'

rgcardviewlayout's People

Contributors

joemantey avatar natalia-osa avatar sebyddd avatar terminatorover avatar zqpmaster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rgcardviewlayout's Issues

loading data from plist

i am trying to load data from plist so i changed the numberOfItemsInSection from return 1 to return [array count] i am having problem with the animation but the data loads properly could you give me some hint regarding this

Warning (Logging only once for UICollectionViewFlowLayout cache mismatched frame)

Console Output [ios 9 xcode 7]

2015-09-19 13:19:42.121 Wish'List[1710:60831] Logging only once for UICollectionViewFlowLayout cache mismatched frame
2015-09-19 13:19:42.122 Wish'List[1710:60831] UICollectionViewFlowLayout has cached frame mismatch for index path <NSIndexPath: 0xc000000000000016> {length = 2, path = 0 - 0} - cached value: {{33.284175409625227, 84.198445826909605}, {307.14784245047292, 502.39185839645393}}; expected value: {{35, 83.5}, {305, 500.25}}
2015-09-19 13:19:42.123 Wish'List[1710:60831] This is likely occurring because the flow layout subclass RGCardViewLayout is modifying attributes returned by UICollectionViewFlowLayout without copying them

how to fix this warning ?

CardViewLayout

Hi

How to get button action for each page or Which cell is active.

Thanks

Show more than one card on the screen at one time

I would appreciate any help to display more than one card on the screen at the time. It would be ideal to show a little of the card to the left and to the right so that the user knows there are multiple cards in a view (and knows to swipe left or right)

thank you

Problem with UIVisualEffectView as background

I wanted to add finaly efficent bluring technique added in iOS8 - UIVisualEffectView to collectionViewCell, but there is something wrong with rendering it in every second cell.

I am not that fluent with layout so I decided to ask you to have a look.
I define blur background like this inside cell:

-(void)setupBlurView
{
    if ([self.blurEffectView superview]) {
        [self.blurEffectView removeFromSuperview];
    }
    self.blurEffectView = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]];
    self.blurEffectView.frame = self.bounds;
    [self insertSubview:self.blurEffectView atIndex:0];
}

Any ideas what causes it?

Layout warning for iPhone 4, 5.

Running the latest code on iPhone 4,5 gives the following warnings:

the behavior of the UICollectionViewFlowLayout is not defined because
the item width must be less than the width of the UICollectionView minus the section insets left and right values.

Change Card Size

Hi, I've tried to change the card size but i have the below visual issue:
issue

How can i fix this? I need the Card view with less margin!

using prepareForSegue to pass data from the the collection view to table view

hi there i am trying to use prepareForSegue to pass data from the collection view when the button is used to a tableview controller but i am not having any luck have you done this or tried this so i can have some help regarding this

  • (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {

    goalVideoListTableViewController *goalvc = [segue destinationViewController];
    NSIndexPath *indexPath = [UICollectionViewLayout indexPathForCell:sender];
    goalvc.scorerEntry = [self.scorerArray objectAtIndex:indexPath.section];
    }

i have no idea how to do so and getting error on indexPathForCell:sender

any help would be great

layout issue..View is tilting slightly

I have downloaded your code and in ViewController.m added below code to autoscroll collection view to some index on startup ( like national geographic city guide app )
but it is giving layout issue..View is tilting slightly. can you please tell me how do I get this effect?
simulator screen shot 14-jan-2016 2 11 48 pm

-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:YES];

    [NSTimer scheduledTimerWithTimeInterval:0.5
                                     target:self
                                   selector:@selector(targetMethod)
                                   userInfo:nil
                                    repeats:YES];

}

-(void)targetMethod
{
NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:sectionCountForCard];

if(sectionCountForCard<4)
{
    [self.collectionV scrollToItemAtIndexPath:index atScrollPosition:UICollectionViewScrollPositionRight animated:YES];

    sectionCountForCard++;

}

}

Crash on Ipad Pro

Hi,

I have experienced a crash on Ipad Pro, does anyone have that?

Problem with Slow slide

I am using the iPhone 6 Simulator to run the demo,Slow slide switch back to the first page when this happens. More out of the view of the lower right corner of the second page
bug

collectionViewCell flickers/blinks

Hi, i've verified that when you slide (slowly) the appearing view (on the right for example) flickers/blinks a bit before it animates smoothly. Can you fix this ?

PS: I don't know if I made myself clear, to test, slide very slowly and observe the sections views appearing ; UPDATE: actually, in your demo, I found that the issue is only observable in landscape mode.

Crash in iOS8

UICollectionView received layout attributes for a cell with an index path that does not exist
this problem only occur in iOS8
later of iOS9 is ok

pod

could you plz make it pod

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.