Calender with weekView iOS swift

Solution:

If you want to show weekView or monthView then CVCalender is the best option to show.

Step 1: First you have to create a single window project in Xcode.

Step 2: After that open terminal app in your mac and do the below steps.

Step 3: Type "cd " then goto your project in finder window drag and drop your folder.It will paste your project path after the "cd ".Then click enter.

Step 4: type the command "pod init"

Step 5: It will add the pod to your project.

Step 6: Open your project name .workspace then find the file named podfile and below frameworks paste the code .

pod 'CVCalendar', '~> 1.6.2'

Step 7: Close the project and goto terminal and type the below code 

pod install

and click enter.

Step 8: CVCalender will be added to your project.

Step 9: In your viewController add two UIView's

Step 10: In base class select CVCalendarMenuView in top one and CVCalendarView in another one.

Step 11:Add one more button to the view and add action for show weekView and monthView.

        if cvcalenderView.calendarMode == CalendarMode.weekView {
            cvcalenderView.changeMode(.monthView)
        } else {
            cvcalenderView.changeMode(.weekView)
            

        }

Comments

  1. Can u tell me how to change date's default black color and selected date circle's background color.

    ReplyDelete

Post a Comment

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

store cgpoint in userdefaults iOS swift