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

MORE THAT A PROBLEM IS A QUESTION ON THE PROCEDURE CVCALENDAR #353

Closed
schulz89sp opened this issue Sep 23, 2016 · 1 comment
Closed

MORE THAT A PROBLEM IS A QUESTION ON THE PROCEDURE CVCALENDAR #353

schulz89sp opened this issue Sep 23, 2016 · 1 comment

Comments

@schulz89sp
Copy link

public override var frame: CGRect {
    didSet {
        if oldValue != frame {
            selectionView?.setNeedsDisplay()
            topMarkerSetup()
            preliminarySetup()
    if date != nil {
       supplementarySetup()
    }
        }
    }

}

public init(weekView: CVCalendarWeekView, weekdayIndex: Int) {
    self.weekView = weekView
    self.weekdayIndex = weekdayIndex

    if let size = weekView.calendarView.dayViewSize {
        let hSpace = weekView.calendarView.appearance.spaceBetweenDayViews!
        let x = (CGFloat(weekdayIndex - 1) * (size.width + hSpace)) + (hSpace/2)
        super.init(frame: CGRect(x: x, y: 0, width: size.width, height: size.height))
    } else {
        super.init(frame: CGRect.zero)
    }

    date = dateWithWeekView(weekView, andWeekIndex: weekdayIndex)

    interactionSetup()
    labelSetup()
    setupDotMarker()
    topMarkerSetup()

    if frame.width > 0 {
        preliminarySetup()
        supplementarySetup()
    }

    if !calendarView.shouldShowWeekdaysOut && isOut {
        isHidden = true
    }

}

These two methods are performed in the "CVCalendarDayView.swift" file, in particular the methods:
preliminarySetup ()
supplementarySetup ()
Why they are launched from here?
If then I toss them in viewController.swift files will make him do twice the same shift, do not you think?
I in my project, I eliminated them, in my opinion should only be implemented at the discretion of that program, right?
If we have other functions please spiegarmele if you can.
Thank you!

@elsesiy
Copy link
Member

elsesiy commented Sep 24, 2016

Please use the issue template.

@elsesiy elsesiy closed this as completed Sep 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants