Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up CVCalendar via Cocoapods: Views Aren't Showing

I've been trying to set up the CocoaPods CVCalendar for my app, but after integrating it into my Xcode project, the content fails to show through the UIViews. Essentially, whenever I connect the views to the CVCalendarView and CVCalendarMenuView variables, the views simply do not show. Here's the ViewController code I have so far, and help would be greatly appreciated!

import UIKit
import CVCalendar

class ViewController: UIViewController, CVCalendarViewDelegate, CVCalendarMenuViewDelegate {

    @IBOutlet weak var menuView: CVCalendarMenuView!

    @IBOutlet weak var calendarView: CVCalendarView!



    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()

        calendarView.commitCalendarViewUpdate()
        menuView.commitMenuViewUpdate()
    }
    func presentationMode() -> CalendarMode {
        return .MonthView
    }

    func firstWeekday() -> Weekday {
        return .Sunday
    }

}
like image 251
jblb2424 Avatar asked Oct 18 '22 16:10

jblb2424


1 Answers

  • Your ViewController class is the class in the storyboard?
  • Did you hook up the delegates? Delegate setup
    • You're delegating the rendering to your ViewController/
    • You need to drag to the yellow view controller nub.
like image 174
Phil.Ng Avatar answered Nov 03 '22 22:11

Phil.Ng