Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Width / height changed successfully, but Time Machine effect destroyed #872

Open
aabantariqmurtaza opened this issue Oct 12, 2018 · 4 comments

Comments

@aabantariqmurtaza
Copy link

Hi,

My Environment
Each 'viewForItemAtIndex' is a view controller's view in my case. I am using Time Machine Style.
Each Item have size = 500, 500.
I override '(CGFloat)carouselItemWidth:(iCarousel *)carousel' method for width change.

My OutCome
size of Items is successfully updated, but Time Machine style effect is destroyed.

Problem
Time Machine Effect destroyed. see the snapshots please.

Snapshot
In first snapshot, only one item is shown. in Second snapshot, other is also there but why its not appearing in first snapshot like time machine effect.

1_previousitemshidden
2

I will be very thankfull gentleman. please help.

@aabantariqmurtaza
Copy link
Author

When i change each item size to 200, 200. Then Time Machine effect works correct.

@nicklockwood
Copy link
Owner

@aabantariqmurtaza this issue is that because the views are so large, the ones in front are obscuring the ones behind. You can correct for this by increasing the horizontal offset using iCarouselOptionTilt in the following delegate method:

- (CGFloat)carousel:(iCarousel *)carousel valueForOption:(iCarouselOption)option withDefault:(CGFloat)value
{
    switch (option)
    {
        case iCarouselOptionTilt:
        {
            return 1.0; // try different values between 0 and 1 to get the desired effect
        }
        default:
        {
            return value;
        }
    }
}

@aabantariqmurtaza
Copy link
Author

I will check, and update here tomorrow. thank you so much for your help. @nicklockwood

@aabantariqmurtaza
Copy link
Author

Thanks, I got the desired effect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants