make use of Obj-C's modern syntax for literals and subscripting

This commit is contained in:
fridtjof
2019-01-08 00:24:11 +01:00
parent 125e801218
commit 0e8c73344d
27 changed files with 195 additions and 197 deletions
@@ -306,7 +306,7 @@ static void *RecordingContext = &RecordingContext;
- (void)checkDeviceAuthorizationStatus
{
NSString *appDisplayName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"];
NSString *appDisplayName = [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"];
[MXKTools checkAccessForMediaType:AVMediaTypeVideo
manualChangeMessage:[NSString stringWithFormat:NSLocalizedStringFromTable(@"camera_access_not_granted", @"Vector", nil), appDisplayName]
@@ -1324,7 +1324,7 @@ static void *RecordingContext = &RecordingContext;
- (void)caughtAVRuntimeError:(NSNotification*)note
{
NSError *error = [[note userInfo] objectForKey:AVCaptureSessionErrorKey];
NSError *error = [note userInfo][AVCaptureSessionErrorKey];
NSLog(@"[MediaPickerVC] AV Session Error: %@", error);
dispatch_async(dispatch_get_main_queue(), ^{
@@ -1838,7 +1838,7 @@ static void *RecordingContext = &RecordingContext;
{
if (validationView)
{
validationView.image = [[notification userInfo] objectForKey:MPMoviePlayerThumbnailImageKey];
validationView.image = [notification userInfo][MPMoviePlayerThumbnailImageKey];
[validationView bringSubviewToFront:videoPlayerControl];
// Now, there is a thumbnail, show the video control