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

A blank area pop up after clicking cancel bar button in EKEventViewController #334

Closed
3 tasks done
kwandontcook opened this issue Mar 3, 2022 · 1 comment
Closed
3 tasks done
Labels

Comments

@kwandontcook
Copy link

New Issue Checklist

Issue Description

Code I'm using with CalendarKit
<!-- INSERT CODE HERE -->
func dayViewDidSelectEventView(_ eventView: EventView) {
        guard let v = eventView.descriptor as? Event else{
            return;
        }
        
        let ek_event = EKEvent(eventStore: self.eventStore)
        ek_event.startDate = v.dateInterval.start
        ek_event.endDate = v.dateInterval.end
        ek_event.notes = ""
        ek_event.title = v.text
        ek_event.calendar =  self.eventStore.defaultCalendarForNewEvents
        ek_event.calendar.cgColor = v.color.cgColor
        
        let vc = EKEventViewController()
        vc.event = ek_event
        vc.allowsCalendarPreview = true
        vc.allowsEditing = true
        self.navigationController?.pushViewController(vc, animated: true)
        
    }

This is the code that I wrote for the EKEventViewController. (The codes works well, I can go to EKEventViewController with correct dataSet). However, after clicking the return button, there is an blank area in the parentView (DayViewController)

Is it determined as a bug? (No idea about that)

P.S: I am using IOS 15.0 to develop the application

Result I am trying to achieve

StackOverflow Question link

@richardtop
Copy link
Owner

Looks like you're adding a new event but the code is placed to the dayViewDidSelectEventView and should be to dayViewDidLongPressTimeline

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