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

Manipulating cell properties explicitly #15

Closed
itsjc opened this issue May 8, 2016 · 7 comments
Closed

Manipulating cell properties explicitly #15

itsjc opened this issue May 8, 2016 · 7 comments
Assignees
Labels

Comments

@itsjc
Copy link

itsjc commented May 8, 2016

In my isAboutToDisplay method, I manipulate a property of my cell based on some factor (Hide or Unhide a view of the cell).

However, I'm not finding a way to unhide this view of a specific date explicitly.

Unhiding this view is not the same as selecting it. There's selecting a date and then there are the dates with this view unhidden.

So, when the user commits an action, I want to unhide this view of a specific cell (date) but will not be able to because the calendar does not go through isAboutToDisplay again.

Does this make sense?

The calendar loads and some views have a green view unhidden. If the user commits an action , I want to set the date in which the action was committed to green (ie unhide the green view); however, unhiding this green view is different than "selecting".

Thanks for your help man

@patchthecode
Copy link
Owner

If you have made changes to the view of a cell, and you want those changes to be reflected, then do the same thing as you would do for a UITableView. Simply call the following function:

calendarView.reloadData

Does this work for you?

@itsjc
Copy link
Author

itsjc commented May 8, 2016

let's say the calendar has been completely created.

Now, I want to unhide the green view from the cell that is for example 04/05/2016 because the user did something that means that should be green.

That's what I mean.

My isAboutToDisplay has an array of dates which I set to green. This 04/05/2016 will now be part of that array. Does calendarView.reloadData go through the isAboutToDisplay all over again?

Cause if it does that sounds like it would work.

@patchthecode
Copy link
Owner

patchthecode commented May 9, 2016

calendarView.reloadData() causes the calendarView to reload its data source. It will cause the isAboutToDisplay function to be called all over again for all the dates that are visible on the screen

@itsjc
Copy link
Author

itsjc commented May 9, 2016

That seems like it would work. Thank you man. The speed in which you respond to these requests is crazy. You will get far bro. I can't thank you enough. Not as much for the help with the project as much as for responding so fast.

@itsjc itsjc closed this as completed May 9, 2016
@patchthecode
Copy link
Owner

Thanks man!
Just leave a Star ★ on this project if you like it :)
I want it to be # 1
Have a good one.

@itsjc
Copy link
Author

itsjc commented May 9, 2016

No doubt it will be. I'm referring anyone who needs a calendar here. Thanks for your support

@patchthecode
Copy link
Owner

Cool cool.
Have an awesome day :)

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

No branches or pull requests

2 participants