Code Monkey home page Code Monkey logo

Comments (10)

MosheBerman avatar MosheBerman commented on August 21, 2024

Hey, there's already a better way to do this. ;-)

Import the CKCalendarCell header class. Then, use UIAppearance to change the dotColor property.

from mbcalendarkit.

MosheBerman avatar MosheBerman commented on August 21, 2024

I do wonder though, perhaps exposing that through the calendar view data source is a good idea.

from mbcalendarkit.

bci avatar bci commented on August 21, 2024

But that looks like it will set the color for all dots. Not just the dot for that date...
I.e.:
2014-06-10 will have a blue dot
2014-06-12 will have a red dot
2014-06-14 will have a green dot

from mbcalendarkit.

MosheBerman avatar MosheBerman commented on August 21, 2024

Ah, I see. That's interesting...

from mbcalendarkit.

MosheBerman avatar MosheBerman commented on August 21, 2024

What do you think about a datasource method like -(UIColor *) calendarView:(CKCalendarView*)calendar colorForDotOnDate:(NSDate*)date?

from mbcalendarkit.

bci avatar bci commented on August 21, 2024

That would be perfect ;) I don't see it returning a UIColor object there, but you have something planned, I bet.

from mbcalendarkit.

Beisenbek avatar Beisenbek commented on August 21, 2024

What about possibility of the changing color for a cell? i.e: -(void) calendarView:(CKCalendarView_)calendar colorForCellOnDate:(NSDate_)date?

from mbcalendarkit.

MosheBerman avatar MosheBerman commented on August 21, 2024

@bci, good catch about returning a color, fixed.

@Beisenbek, we can do that too, but I think it makes sense to use UIAppearance, to enforce consistent colors across all cells.

from mbcalendarkit.

jarrillaga avatar jarrillaga commented on August 21, 2024

Hi Moshe, the calendar that I need to implement must deal with two types of events. For one I have to paint the cell with a color and for the other I need another color. How can I change the cells colors? Thanks, I really appreciate all your work

from mbcalendarkit.

MosheBerman avatar MosheBerman commented on August 21, 2024

MBCalendarKit 5.0.0 allows for a lot more customization with the cells. Check out the Custom Cell Provider section of the updated readme for more. Since this issue is really old, I'm going to close it. Feel free to comment here with more thoughts, or open a new issue.

from mbcalendarkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.