Skip to content

Commit

Permalink
Merge pull request #70 from richardtop/fix-empty-screen-when-scrolling
Browse files Browse the repository at this point in the history
Fix empty screen when scrolling, Fix text clipping
  • Loading branch information
richardtop authored Jun 27, 2017
2 parents 90968fc + f5e6efb commit 6eac22e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CalendarKit.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "CalendarKit"
s.summary = "Fully customizable calendar for iOS"
s.version = "0.1.19"
s.version = "0.1.20"
s.homepage = "https://github.com/richardtop/CalendarKit"
s.license = 'MIT'
s.author = { "Richard Topchii" => "[email protected]" }
Expand Down
1 change: 1 addition & 0 deletions Source/Timeline/EventView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ open class EventView: UIView {
view.font = UIFont.boldSystemFont(ofSize: 12)
view.isUserInteractionEnabled = false
view.backgroundColor = .clear
view.isScrollEnabled = false
return view
}()

Expand Down
12 changes: 4 additions & 8 deletions Source/Timeline/TimelinePagerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,22 +123,18 @@ extension TimelinePagerView: DayViewStateUpdating {
let newDate = newDate.dateOnly()
if newDate.isEarlier(than: oldDate) {
var timelineDate = newDate
for (index, timelineContainer) in timelinePager.reusableViews.enumerated() {
for timelineContainer in timelinePager.reusableViews {
timelineContainer.timeline.date = timelineDate
timelineDate = timelineDate.add(TimeChunk.dateComponents(days: 1))
if index == 0 {
updateTimeline(timelineContainer.timeline)
}
updateTimeline(timelineContainer.timeline)
}
timelinePager.scrollBackward()
} else if newDate.isLater(than: oldDate) {
var timelineDate = newDate
for (index, timelineContainer) in timelinePager.reusableViews.reversed().enumerated() {
for timelineContainer in timelinePager.reusableViews.reversed() {
timelineContainer.timeline.date = timelineDate
timelineDate = timelineDate.subtract(TimeChunk.dateComponents(days: 1))
if index == 0 {
updateTimeline(timelineContainer.timeline)
}
updateTimeline(timelineContainer.timeline)
}
timelinePager.scrollForward()
}
Expand Down

0 comments on commit 6eac22e

Please sign in to comment.