-
Notifications
You must be signed in to change notification settings - Fork 0
to Do
invitees not saving timeline refresh
event w/o dates = not saved
invites array in inviteVC
deconnect invite button from follow
click on invite button in Cell (button changes)
create segue to access invites in inviteVC segue- inviteVC -> VC append user to invites cell > VC appends user to database invited events>user>events
inviteVC in viewwillappear display database invites
timeline displays indicator turns diff color
if invites not sent then display edit vc
if invitee = true, then display
invited events
invitees for each event - event > host uid > event id > invitees > user.uid
invited events > user.uid > event id : bool
how to connect date to cell
if let cellState = calendarView.cellStatus(at: point) {
let date = cellState.date
/// Select a date-cell range
/// - Parameter startDate: Date to start the selection from
/// - Parameter endDate: Date to end the selection from
/// - Parameter triggerDidSelectDelegate: Triggers the delegate
/// function only if the value is set to true.
/// Sometimes it is necessary to setup some dates without triggereing
/// the delegate e.g. For instance, when youre initally setting up data
/// in your viewDidLoad
/// - Parameter keepSelectionIfMultiSelectionAllowed: This is only
/// applicable in allowedMultiSelection = true.
/// This overrides the default toggle behavior of selection.
/// If true, selected cells will remain selected.
public func selectDates(_ dates: [Date], triggerSelectionDelegate: Bool = true, keepSelectionIfMultiSelectionAllowed: Bool = false) {
if dates.isEmpty { return }
if (!isCalendarLayoutLoaded || isReloadDataInProgress) {
// If the calendar is not yet fully loaded.
// Add the task to the delayed queue
delayedExecutionClosure.append {[unowned self] in
self.selectDates(dates,
triggerSelectionDelegate: triggerSelectionDelegate,
keepSelectionIfMultiSelectionAllowed: keepSelectionIfMultiSelectionAllowed)
}
return
}
everytime go back and edit, pre-selected dates re-merged
invitees not displaying on edit
new events not showing on table until rebuilt
only events w/dates are read reload get data on viewWillAppear, then reload table
invitees w/o dates or invitees not read, set to []
self.inviteesUser.append()
segue animations
can't use longpress select more than once
cellState of cell of dateSelected true that it is selected
for date in datesChosen { date.cellState.isSelected = true }
//count number of occurance
//create new array of all merged dates,, use this array here
//create users. add users to indiv events.
var counts: [Date: Int] = [:]
for date in datesChosen {
counts[date] = (counts[date] ?? 0) + 1
}
//sort array by count value, then display only top three
print(counts) // "[BAR: 1, FOOBAR: 1, FOO: 2]"
for (key, value) in counts {
print("\(value) of people prefer the \(key) date")
}