Closed gilgameshex closed 7 years ago
it should be
calendarView.scrollToDate(Date())
Also, why are you storing information onto the calendar? You need to use your own dataSource to store information.
Imagine the calendar as a UITableView
. The same way as you would not store information unto the UITableView is the same way you should not store information inside of the calendar.
Thanks for the quick reply. I will think about that. 🍻
What if its something like user putting notes in, like a timetable or something, or say, a diary. Can I do that?
Something like this
This library is just like a UICollectinView or a UITableView
You can do literally anything with it (including what you have asked). I believe your doubt is possibly because you are maybe new to using UITableViews and UICollectionViews?
yes 😢
Hmm.. i would really love to help, but honestly there are many tutorials around that will do a better explanation that i possibly can in this chat box.
Here is one example of a tutorial. But there are very many online.
In a nut shell, (with my bad explanation though) it goes like this. You have a dataSource (which has your stored content). This can be an Array or a Dictionary.
On a normal UITableview, you will grab that data in the array/Dictionary using the index provided by the cellForItem
function of the UItableView's delegate function.
With the calendar however, you grab that information using (not an index) but a date provided by the willDisplayCell
delegate function.
Haha thats the best I can do. Hopefully you have your problem resolved. I will close this issue now, as it is not directly related to the calendar. Have a good one. 🍻
That will do. Thanks so much 🍻
Hi there,
I have bumped into an errors today when I am continue programming on the calendar. I was trying to do the code on having the calendar on today's date instead of the calendar start date, so I did this and it returned an error:
Also, another question, I am planning to use NSDefault to store some data on to the calendar. However, I am not quite sure how, since it will be different for each date. Any suggestions?
Thank you so much for your time. (I am catching up with deadlines, so sorry for suddenly throwing a bunch of questions on you)