12345678910111213141516171819202122232425262728293031323334 |
- /*****************************************************************************
- * VLC for iOS
- *****************************************************************************
- * Copyright (c) 2015 VideoLAN. All rights reserved.
- * $Id$
- *
- * Authors: Tobias Conradi <videolan # tobias-conradi.de>
- *
- * Refer to the COPYING file of the official project for license.
- *****************************************************************************/
- #import "UIViewController+VLCAlert.h"
- @implementation UIViewController (UIViewController_VLCAlert)
- #if TARGET_OS_TV
- - (void)vlc_showAlertWithTitle:(NSString *)title message:(NSString *)message buttonTitle:(NSString *)buttonTitle
- {
- UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
- [alertController addAction:[UIAlertAction actionWithTitle:buttonTitle style:UIAlertActionStyleDefault handler:nil]];
- [self presentViewController:alertController animated:YES completion:nil];
- }
- #else
- - (void)vlc_showAlertWithTitle:(NSString *)title message:(NSString *)message buttonTitle:(NSString *)buttonTitle
- {
- VLCAlertView *alert = [[VLCAlertView alloc] initWithTitle:title
- message:message
- delegate:self
- cancelButtonTitle:buttonTitle
- otherButtonTitles:nil];
- [alert show];
- }
- #endif
- @end
|