BadChoice / RVCalendarWeekView

Simple but powerful Calendar Week View for iOS
MIT License
101 stars 24 forks source link

Disable horizontal scroll? #35

Open Bruno-Piccinin-RealComm opened 6 years ago

Bruno-Piccinin-RealComm commented 6 years ago

It is possible to disable horizontal scroll (day scroll) and mantain the vertical scroll (hours scroll) on week view?

BadChoice commented 6 years ago

Yes, it is a collection view, so you can disable horitzontal scroll as you would on a simple uicollectionview

Jordi Puigdellívol

El 29 de diciembre de 2017 a las 8:45:20, Bruno Piccinin ( notifications@github.com) escribió:

It is possible to disable horizontal scroll (day scroll) and mantain the vertical scroll (hours scroll) on week view?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/BadChoice/RVCalendarWeekView/issues/35, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFuzNPReb2CTaybmeccY4O5FeW8RN3mks5tFJiPgaJpZM4RO7IR .

Bruno-Piccinin-RealComm commented 6 years ago

I tried to use

_weekView.collectionView.alwaysBounceHorizontal = NO; _weekView.collectionView.alwaysBounceVertical = YES;

in my setupWeekData (same as the example) but it doesn't work. I found on internet something like this

UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init]; [flowLayout setScrollDirection:UICollectionViewScrollDirectionVertical];

but I can't find a way to access on UICollectionViewFlowLayout of weekView, but I found only the UICollectionViewLayout with no possibilities to set the scroll direction _weekView.collectionView.collectionViewLayout

A little help please?