diff --git a/Example/TSMessages/TSDemoViewController.m b/Example/TSMessages/TSDemoViewController.m index 1460a5ad..b77cbf40 100755 --- a/Example/TSMessages/TSDemoViewController.m +++ b/Example/TSMessages/TSDemoViewController.m @@ -19,7 +19,15 @@ - (void)viewDidLoad [TSMessage setDefaultViewController:self]; [TSMessage setDelegate:self]; - self.wantsFullScreenLayout = YES; + + if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) + self.edgesForExtendedLayout = UIRectEdgeAll; + else + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wdeprecated-declarations" + self.wantsFullScreenLayout = YES; + #pragma clang diagnostic pop + [self.navigationController.navigationBar setTranslucent:YES]; } @@ -82,7 +90,14 @@ - (IBAction)didTapToggleNavigationBarAlpha:(id)sender - (IBAction)didTapToggleWantsFullscreen:(id)sender { - self.wantsFullScreenLayout = !self.wantsFullScreenLayout; + if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) + self.edgesForExtendedLayout = UIRectEdgeAll; + else + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wdeprecated-declarations" + self.wantsFullScreenLayout = YES; + #pragma clang diagnostic pop + [self.navigationController.navigationBar setTranslucent:!self.navigationController.navigationBar.isTranslucent]; } diff --git a/Pod/Classes/TSMessageView.h b/Pod/Classes/TSMessageView.h index c578e7b2..acce0d2b 100755 --- a/Pod/Classes/TSMessageView.h +++ b/Pod/Classes/TSMessageView.h @@ -34,6 +34,11 @@ /** Is the message currenlty fully displayed? Is set as soon as the message is really fully visible */ @property (nonatomic, assign) BOOL messageIsFullyDisplayed; +/** UI elements **/ +@property (nonatomic, strong, readonly) UILabel *titleLabel; +@property (nonatomic, strong, readonly) UILabel *contentLabel; +@property (nonatomic, strong, readonly) UIButton *button; + /** Inits the notification view. Do not call this from outside this library. @param title The title of the notification view @param subtitle The subtitle of the notification view (optional) diff --git a/Pod/Classes/TSMessageView.m b/Pod/Classes/TSMessageView.m index 9214f0bc..c0633e9c 100755 --- a/Pod/Classes/TSMessageView.m +++ b/Pod/Classes/TSMessageView.m @@ -39,8 +39,8 @@ @interface TSMessageView () /** Internal properties needed to resize the view on device rotation properly */ @property (nonatomic, strong) UILabel *titleLabel; @property (nonatomic, strong) UILabel *contentLabel; -@property (nonatomic, strong) UIImageView *iconImageView; @property (nonatomic, strong) UIButton *button; +@property (nonatomic, strong) UIImageView *iconImageView; @property (nonatomic, strong) UIView *borderView; @property (nonatomic, strong) UIImageView *backgroundImageView; @property (nonatomic, strong) TSBlurView *backgroundBlurView; // Only used in iOS 7