Chromium Code Reviews

Side by Side Diff: webrtc/examples/objc/AppRTCMobile/ios/ARDMainViewController.m

Issue 2780433006: Fix deprecated methods in AppRTCMobile. (Closed)
Patch Set: fix nits Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 237 matching lines...)
248 248
249 - (void)restartAudioPlayerIfNeeded { 249 - (void)restartAudioPlayerIfNeeded {
250 if (_mainView.isAudioLoopPlaying && !self.presentedViewController) { 250 if (_mainView.isAudioLoopPlaying && !self.presentedViewController) {
251 RTCLog(@"Starting audio loop due to WebRTC end."); 251 RTCLog(@"Starting audio loop due to WebRTC end.");
252 [self configureAudioSession]; 252 [self configureAudioSession];
253 [_audioPlayer play]; 253 [_audioPlayer play];
254 } 254 }
255 } 255 }
256 256
257 - (void)showAlertWithMessage:(NSString*)message { 257 - (void)showAlertWithMessage:(NSString*)message {
258 UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil 258 UIAlertController *alert =
259 message:message 259 [UIAlertController alertControllerWithTitle:nil
260 delegate:nil 260 message:message
261 cancelButtonTitle:@"OK" 261 preferredStyle:UIAlertControllerStyleAlert];
262 otherButtonTitles:nil]; 262
263 [alertView show]; 263 UIAlertAction *defaultAction = [UIAlertAction actionWithTitle:@"OK"
264 style:UIAlertActionSty leDefault
265 handler:^(UIAlertAction *action){
266 }];
267
268 [alert addAction:defaultAction];
269 [self presentViewController:alert animated:YES completion:nil];
264 } 270 }
265 271
266 @end 272 @end
OLDNEW

Powered by Google App Engine