Skip to content

layout issue..View is tilting slightly #20

@Piya-Kadam

Description

@Piya-Kadam

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++;

}

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions