An Event View based on Apple's Event Detail View. Written in Swift 3. Supports ARC, Autolayout and editing via StoryBoard.

Overview


An Event View based on Apple's Event Detail View. Written in Swift 3. Supports ARC, Autolayout and editing via StoryBoard.

License Platform Swift 3.x MadeWithLove

Installation

CocoaPods

PTEventView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'PTEventView'

Manual

You can drag and drop the Files from here into your projects directly.

Setup

Adding PTEventView

fileprivate weak var myCalenderView: PTEventView!
// In loadView or viewDidLoad
let ptEventView = Bundle.main.loadNibNamed("PTEventView", owner: nil, options: nil)![0] as? PTEventView
ptEventView?.delegate = self
ptEventView?.setup(frame: myCalenderView.frame)
self.view.addSubview(ptEventView!)

Data Model

PTEventView supports both 12 hour and 24 hour format as data model. The input can be received from the API or Database(Core Data, Realm, SQLite) in the form of Array of Event Object.
The Event Object should have:

  • Start Time (12 hour or 24 hour)
  • End Time (12 hour or 24 hour)
  • Name of the Event
    Note: Incase of 12 hour, suffix time with AM or PM.

Example

let dataModel12hour = [["10AM","11AM","Swift Meetup '17"],["12AM","3PM","WWDC KickOff"]]
let dataModel24hour = [["10","11","Swift Meetup '17"],["12","15","WWDC KickOff"]]

Use Bool to switch between Time Formats

ptEventView?.is24HourFormat = true
for event in dataModel12hour{
            
    let eventModel = PTEventViewModel()
    
    eventModel.startTime = event[0]
    eventModel.endTime = event[1]
    eventModel.eventName = event[2]
    
    ptEventView?.EventViewdataModel.append(eventModel)
}

StoryBoard

Supports IBDesignable to alter Border Width, Corner Radius and Border Color

Customization

You can customize the view parameters for designing your own view:

borderColor - Border Color Default is Black

borderWidth - Border Width Default is 1.0

cornerRadius - Corner Radius Default is 6.0

eventColor - Event Color Default is as given in Demo Gif

eventTextColor - Event Text Color Default is white. Try to make it contrasting with eventColor

ToDo[s]

  • Add support for PM and AM via 24 hour format
  • Orientation Support. Currently supports UI for Portrait.
  • Add delegation for callbacks
  • Implement AutoLayout for CalenderView
  • Support Events on the same day
  • Add IBInspectable for Row Color of Event

Requirement

  • iOS 8.0+ (CocoaPods with Swift support will only work on iOS 8.0+. Alternatively, you will have to import library manually to your project)
  • Xcode 8.0+, Swift 3.0+

License

PTEventView is released under the MIT license. See LICENSE for details.

★Star this repo.

http://culturestreet.com/depot/620--auto--uploads-2013-12-Daily-quotes-5-December.jpg

You might also like...
The Unofficial Apple iOS Swift Calendar View. Swift calendar Library. iOS calendar Control. 100% Customizable
The Unofficial Apple iOS Swift Calendar View. Swift calendar Library. iOS calendar Control. 100% Customizable

Q: How will my calendar dateCells look with this library? A: However you want them to look. More Images Features Range selection - select dates in a r

A SwiftUI calendar view that allows month switching and date picking.
A SwiftUI calendar view that allows month switching and date picking.

Selectable Calendar View A SwiftUI calendar view that allows month switching and date picking. Usage You can simply add this repository to your projec

A calendar quick view for the MacOS status bar

Calendar Quick View Quick Menu Calendar in the mac app store An open source macOS calendar preview utility Download from the Mac App Store Visualizati

A fully customizable calendar view acting as a date range picker
A fully customizable calendar view acting as a date range picker

Demo Installation CocoaPods With CocoaPods you can simply add GLCalendarView in your Podfile: pod "GLCalendarView", "~ 1.0.0" Source File You can co

A customizable calendar view for iOS.
A customizable calendar view for iOS.

JTCalendar JTCalendar is an easily customizable calendar control for iOS. Installation With CocoaPods, add this line to your Podfile. pod 'JTCalendar'

Simpel calender view built with UICollectionView
Simpel calender view built with UICollectionView

CalenderView Overview Simpel calender view built with UICollectionView. Just clo

CalendarApp Swift - Made a calendar app in swift, completely from scratch using UIStackView and UICollectionView
CalendarApp Swift - Made a calendar app in swift, completely from scratch using UIStackView and UICollectionView

CalendarApp_Swift Made a calendar app in swift, completely from scratch using UI

A set of views and controllers for displaying and scheduling events on iOS
A set of views and controllers for displaying and scheduling events on iOS

CalendarLib CalendarLib is a set of views and controllers for displaying and scheduling events on iOS. Warning: As some people may have noticed, this

📅 Calendar for iOS, iPadOS and macOS in Swift
📅 Calendar for iOS, iPadOS and macOS in Swift

CalendarKit CalendarKit is a Swift calendar UI library for iOS, iPadOS and Mac Catalyst. It looks similar to the Apple Calendar app out-of-the-box, wh

Releases(0.3.0)
Owner
Aman Taneja
Swift | Murakami | Violin | Ygritte
Aman Taneja
A library that expresses a github contribution calendar through an array of dates. Supports iOS and macOS.

A library that expresses a github contribution calendar through an array of dates. Supports iOS and macOS.

jasu 45 Dec 20, 2022
A declarative, performant, iOS calendar UI component that supports use cases ranging from simple date pickers all the way up to fully-featured calendar apps.

HorizonCalendar A declarative, performant, calendar UI component that supports use cases ranging from simple date pickers all the way up to fully-feat

Airbnb 2.2k Jan 4, 2023
NextEvent is a countdown widget for your Mac menu bar. It displays the time until the next event in your calendar or task list.

NextEvent NextEvent is a countdown widget for your Mac menu bar. It displays the time until the next event in your calendar or reminders. Choose the n

Paul Wong 3 Nov 26, 2022
An iOS pre-permissions utility that lets developers ask users on their own dialog for calendar, contacts, location, photos, reminders, twitter, push notifications and more, before making the system-based permission request.

An iOS pre-permissions utility that lets developers ask users on their own dialog for calendar, contacts, location, photos, reminders, twitter, push notifications and more, before making the system-based permission request.

Joe L 420 Dec 22, 2022
A calendar based heatmap which presenting a time series of data points in colors.

Calendar Heatmap Introduction CalendarHeatmap is a calendar based heatmap which presenting a time series of data points in colors, inspired by Github

null 159 Dec 21, 2022
A custom visual calendar for iOS 8+ written in Swift (>= 4.0).

Overview Screenshots GIF Demo Installation Usage Architecture Version matrix Advanced API For contributors Screenshots GIF Demo Installation CocoaPods

null 3.5k Dec 24, 2022
A calendar control for iOS written in swift with mvvm pattern

ASCalendar try it on appetize Installation CocoaPods You can use CocoaPods to install ASCalendar by adding it to your Podfile: platform :ios, '8.0' us

Alberto Scampini 192 Jun 26, 2022
Calendar component with RTL languages written in swift

GDCalendar Calendar component with both RTL/LTR languages support with Swipe Gesture enabled navigation. Easy to use with Storyboard and Attributes In

Saeid 26 Jul 17, 2022
Clendar - universal calendar app. Written in SwiftUI. Available on App Store. MIT License.

Clendar - minimal calendar Minimal Calendar & Widgets Landing Page About This project is started out as an UIKit base app for me to learn new WWDC fea

Vinh Nguyen 418 Dec 30, 2022
Calendar View - It's lightweight and simple control with supporting Locale and CalendarIdentifier.

iOS Calendar It's lightweight and simple control with supporting Locale and CalendarIdentifier. There're samples for iPhone and iPad, and also with us

Maksym Bilan 159 Dec 22, 2022