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

Support custom views as as the EventView #175

Open
johnnyperdomo opened this issue Sep 20, 2018 · 13 comments
Open

Support custom views as as the EventView #175

johnnyperdomo opened this issue Sep 20, 2018 · 13 comments

Comments

@johnnyperdomo
Copy link

Hey, is there any way to get to get the frame coordinates:(x position, y position, height, width) from an event that i created on the timelineView.

Result I am trying to achieve

I want to add my own custom view on top of my event in the exact position to simulate an event view, because the event view isn't that customizable. I want to add buttons and add uilabels to the custom view, as well as shadows.

I would very greatly appreciate help with this problem, or if you could add more customization to the eventview.

@richardtop
Copy link
Owner

Hi @johnnyperdomo,
Could you please share the result you're trying to achieve? You can mock it with Sketch/Photoshop or any other graphic editing software.

We could rephrase the question and consider it "CK doesn't support custom views as as the EventView".

@johnnyperdomo johnnyperdomo changed the title Get Event Frame CK doesn't support custom views as as the EventView Sep 21, 2018
@johnnyperdomo
Copy link
Author

screen shot 2018-09-21 at 12 21 46 pm

I would like to make my own custom eventView, is there any way to achieve this? If not, how can we accomplish something like this in the very near future?

@richardtop
Copy link
Owner

@johnnyperdomo could you put these screenshot in context? I.e. how they would look on a timeline?

@johnnyperdomo
Copy link
Author

screen shot 2018-09-21 at 7 26 51 pm

this, instead of colored event view. let's me build and customize how i want; just adding a simple uiview to event should allow this. i Just don't know how 😔

@richardtop
Copy link
Owner

richardtop commented Sep 22, 2018

@johnnyperdomo if you look inside e.g. Timeline, you'll notice the code to support a custom UIView subclass, but there is no interface to connect a custom view to the rest of the library. I won't extend this feature now, but you could try implement it yourself and submit a pull request.

Alternatively, you could "Slice&Dice" the CalendarKit and build your own calendar from scratch (as the Kit initially intended to be)

@johnnyperdomo
Copy link
Author

1)What do you mean by, “there is no interface to connect a custom view to the rest of library?”

  1. is there a way to get position of event frame?

@richardtop
Copy link
Owner

  1. It's impossible now to register a custom view to be used as the EventView, similarly to how the UITableView or UICollectionView supports custom views.
  2. No, currently the layout process is hidden inside the CalendarKit (TimelineView)

@dotWasim
Copy link

@johnnyperdomo Hi there, did you manage to customize event view?

@johnnyperdomo
Copy link
Author

@dotWasim I actually haven't worked on it. You can give it a shot if you'd like.

@dotWasim
Copy link

ok, I will implement it and send pull request. @richardtop any suggestions or notes ?

@richardtop
Copy link
Owner

Hi @dotWasim try to follow the interface of UICollectionView, however move View Management to the CalendarKit itself and pass the needed ViewClass inside the Event or EventDescriptor.

Please, point your WIP pull request here with the [WIP] tag so I'd be able to give you feedback as you go.

This should be easy feature, so good luck with it.

@richardtop richardtop changed the title CK doesn't support custom views as as the EventView Support custom views as as the EventView Nov 27, 2019
@RareScrap
Copy link
Contributor

Has anyone already implemented this feature?

@Hritik9724
Copy link

Any1 had tried to customise the eventView ?

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

5 participants