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

Scroll based on each months, not segments #99

Closed
mrjimoy opened this issue Aug 3, 2016 · 7 comments
Closed

Scroll based on each months, not segments #99

mrjimoy opened this issue Aug 3, 2016 · 7 comments

Comments

@mrjimoy
Copy link

mrjimoy commented Aug 3, 2016

Hi, how do I make the scrolling based on each months, not segments?

image

From the image above, the May 2017 is getting cut since it's on iPhone 5S, but on iPhone 6 it's working fine. I adjust the itemSize so it can fit iPhone 6, and it scroll on every 2 months. I would like it to scroll on 1 month. Is it possible? Thanks.

@patchthecode
Copy link
Owner

hmm. Yea, I didnt make the code scroll to page.
I'll have to work on that.

In the mean time though, Range selection has been added to master branch.
CellState now has a property called selectedPosition. By simply checking this value, you can put what ever type of selection you want.

@patchthecode
Copy link
Owner

I'll go check your paging thing now.

@mrjimoy
Copy link
Author

mrjimoy commented Aug 4, 2016

Hi @patchthecode , wow thanks.. I tried to update the pod to 4.1.4 (latest version) but didn't get any selectedPosition. Can you please confirm? Thanks.

@patchthecode
Copy link
Owner

patchthecode commented Aug 4, 2016

Ah, i havent releast it yet. I wanted someone to test it first before releasing.
To test it, just follow the instruction on this link on question #8

@mrjimoy
Copy link
Author

mrjimoy commented Aug 4, 2016

Okay. Mmm, can you please provide more information on how to use selectedPosition? I will try to test it. Thanks.

@patchthecode
Copy link
Owner

patchthecode commented Aug 4, 2016

SelectedPosition tells you the selected position of a dateCell.

So you can do something like this.

if cellState.SelectedPosition() == .Left {
    //Let the view have a left selected view
} else if cellState.SelectedPosition() == .Middle {
    // Let the view have a middle selected view
} cellState.SelectedPosition() == .Right {
   // Let the view have a right selected view {
} cellState.SelectedPosition() == .Full {{
    // Let the view have a full selected view
} else {
    //let the view have no selected view
}

@patchthecode
Copy link
Owner

Feature complete. Now testing it.

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

No branches or pull requests

2 participants