From 15d3ce0528c161aa65e4058711f24cea19efdd0c Mon Sep 17 00:00:00 2001 From: Abhishek Date: Tue, 10 Aug 2021 07:49:03 -0500 Subject: [PATCH] Update UpcomingEventsDataSource.swift --- Clocker/Panel/Upcoming Events/UpcomingEventsDataSource.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Clocker/Panel/Upcoming Events/UpcomingEventsDataSource.swift b/Clocker/Panel/Upcoming Events/UpcomingEventsDataSource.swift index 9cfd543..be3c033 100644 --- a/Clocker/Panel/Upcoming Events/UpcomingEventsDataSource.swift +++ b/Clocker/Panel/Upcoming Events/UpcomingEventsDataSource.swift @@ -42,7 +42,7 @@ class UpcomingEventsDataSource: NSObject, NSCollectionViewDataSource, NSCollecti } let currentEventInfo = upcomingEvents[indexPath.item] - let prefferedSize = avenirLightFont.size(currentEventInfo.event.title, 250, attributes: [NSAttributedString.Key.font: avenirLightFont]) - return NSSize(width: prefferedSize.width, height: 50) + let attributedString = NSAttributedString(string: currentEventInfo.event.title, attributes: [NSAttributedString.Key.font : avenirLightFont]) + return NSSize(width: attributedString.size().width + 60, height: 50) } }