diff --git a/ApptentiveConnect/source/Message Center/Controllers/ATAboutViewController.m b/ApptentiveConnect/source/Message Center/Controllers/ATAboutViewController.m index 215533820..34a38bed5 100644 --- a/ApptentiveConnect/source/Message Center/Controllers/ATAboutViewController.m +++ b/ApptentiveConnect/source/Message Center/Controllers/ATAboutViewController.m @@ -63,7 +63,10 @@ - (void)viewDidLoad { } - (void)viewDidLayoutSubviews { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated" [self resizeForOrientation:self.interfaceOrientation duration:0]; +#pragma clang diagnostic pop } - (void)viewWillDisappear:(BOOL)animated { diff --git a/ApptentiveConnect/source/Message Center/Controllers/ATMessageCenterViewController.m b/ApptentiveConnect/source/Message Center/Controllers/ATMessageCenterViewController.m index 6e52e5459..107cdcaf6 100644 --- a/ApptentiveConnect/source/Message Center/Controllers/ATMessageCenterViewController.m +++ b/ApptentiveConnect/source/Message Center/Controllers/ATMessageCenterViewController.m @@ -143,7 +143,10 @@ - (void)viewDidLoad { self.dateFormatter.dateFormat = [NSDateFormatter dateFormatFromTemplate:@"MMMMdyyyy" options:0 locale:[NSLocale currentLocale]]; self.dataSource.dateFormatter.dateFormat = self.dateFormatter.dateFormat; // Used to determine if date changed between messages +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated" UIInterfaceOrientation interfaceOrientation = [UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad ? UIInterfaceOrientationPortrait : self.interfaceOrientation; +#pragma clang diagnostic pop self.greetingView.orientation = interfaceOrientation; self.profileView.orientation = interfaceOrientation; self.messageInputView.orientation = interfaceOrientation; @@ -182,7 +185,7 @@ - (void)viewDidLoad { self.messageInputView.attachButton.accessibilityHint = ATLocalizedString(@"Attaches a photo or screenshot", @"Accessibility hint for 'attach'"); if (self.interaction.profileRequested) { - UIBarButtonItem *profileButtonItem = [[UIBarButtonItem alloc] initWithImage:[ATBackend imageNamed:@"at_account"] landscapeImagePhone:[ATBackend imageNamed:@"at_account"] style:UIBarButtonItemStyleBordered target:self action:@selector(showWho:)]; + UIBarButtonItem *profileButtonItem = [[UIBarButtonItem alloc] initWithImage:[ATBackend imageNamed:@"at_account"] landscapeImagePhone:[ATBackend imageNamed:@"at_account"] style:UIBarButtonItemStylePlain target:self action:@selector(showWho:)]; profileButtonItem.accessibilityLabel = ATLocalizedString(@"Profile", @"Accessibility label for 'edit profile' button"); profileButtonItem.accessibilityHint = ATLocalizedString(@"Displays name and email editor.", @"Accessibility hint for 'edit profile' button"); self.navigationItem.leftBarButtonItem = profileButtonItem; diff --git a/ApptentiveConnect/source/Misc/ATUtilities.m b/ApptentiveConnect/source/Misc/ATUtilities.m index 4a11dec17..26d9d0936 100644 --- a/ApptentiveConnect/source/Misc/ATUtilities.m +++ b/ApptentiveConnect/source/Misc/ATUtilities.m @@ -530,12 +530,12 @@ + (NSDate *)dateFromISO8601String:(NSString *)string { NSDate *result = nil; NSDate *now = [NSDate date]; - NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; + NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; calendar.firstWeekday = 2; calendar.timeZone = [NSTimeZone defaultTimeZone]; NSDateComponents *components = [[NSDateComponents alloc] init]; - NSDateComponents *nowComponents = [calendar components:NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit fromDate:now]; + NSDateComponents *nowComponents = [calendar components:NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay fromDate:now]; components.calendar = calendar; NSScanner *scanner = [[NSScanner alloc] initWithString:string]; @@ -979,7 +979,7 @@ + (void)setupDateFormatters { if (dateFormatter == nil) { dateFormatter = [[NSDateFormatter alloc] init]; NSLocale *enUSLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]; - NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; + NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; [dateFormatter setLocale:enUSLocale]; [dateFormatter setCalendar:calendar]; [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];