From f11bd131295191785dccda3f932f7adca308061a Mon Sep 17 00:00:00 2001 From: Nicholas Ventimiglia Date: Wed, 23 Oct 2024 14:04:56 -0700 Subject: [PATCH] Fixed ObjectiveC APIDemo custom playback controls issue. PiperOrigin-RevId: 689095645 --- .../APIDemo/APIDemo.xcodeproj/project.pbxproj | 4 + .../APIDemo/Base.lproj/Main.storyboard | 107 ++++-------------- .../APIDemo/Base.lproj/NativeAdView.xib | 19 ++-- .../APIDemo/Base.lproj/SimpleNativeAdView.xib | 34 +++--- .../APIDemo/APIDemo/CustomControls.xib | 63 +++++++++++ .../APIDemo/APIDemo/CustomControlsView.h | 26 ++--- .../APIDemo/APIDemo/CustomControlsView.m | 54 ++++----- .../GAMCustomVideoControlsController.h | 7 +- .../GAMCustomVideoControlsController.m | 29 ++++- .../APIDemo/Images.xcassets/Contents.json | 6 +- .../video_mute.imageset/Contents.json | 21 ++++ .../video_mute.imageset/video_mute.png | Bin 0 -> 542 bytes .../video_pause.imageset/Contents.json | 21 ++++ .../video_pause.imageset/video_pause.png | Bin 0 -> 120 bytes .../video_play.imageset/Contents.json | 21 ++++ .../video_play.imageset/video_play.png | Bin 0 -> 294 bytes .../video_unmute.imageset/Contents.json | 21 ++++ .../video_unmute.imageset/video_unmute.png | Bin 0 -> 489 bytes .../APIDemo/APIDemo/SimpleNativeAdView.m | 20 ++++ 19 files changed, 281 insertions(+), 172 deletions(-) create mode 100644 Objective-C/advanced/APIDemo/APIDemo/CustomControls.xib create mode 100644 Objective-C/advanced/APIDemo/APIDemo/Images.xcassets/video_mute.imageset/Contents.json create mode 100644 Objective-C/advanced/APIDemo/APIDemo/Images.xcassets/video_mute.imageset/video_mute.png create mode 100644 Objective-C/advanced/APIDemo/APIDemo/Images.xcassets/video_pause.imageset/Contents.json create mode 100644 Objective-C/advanced/APIDemo/APIDemo/Images.xcassets/video_pause.imageset/video_pause.png create mode 100644 Objective-C/advanced/APIDemo/APIDemo/Images.xcassets/video_play.imageset/Contents.json create mode 100644 Objective-C/advanced/APIDemo/APIDemo/Images.xcassets/video_play.imageset/video_play.png create mode 100644 Objective-C/advanced/APIDemo/APIDemo/Images.xcassets/video_unmute.imageset/Contents.json create mode 100644 Objective-C/advanced/APIDemo/APIDemo/Images.xcassets/video_unmute.imageset/video_unmute.png diff --git a/Objective-C/advanced/APIDemo/APIDemo.xcodeproj/project.pbxproj b/Objective-C/advanced/APIDemo/APIDemo.xcodeproj/project.pbxproj index 2ec06772..d05ecdfc 100644 --- a/Objective-C/advanced/APIDemo/APIDemo.xcodeproj/project.pbxproj +++ b/Objective-C/advanced/APIDemo/APIDemo.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 1CD352992C9CE6A600534FCC /* CustomControls.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1CD352982C9CE6A600534FCC /* CustomControls.xib */; }; 4A96E7211B856D5000031470 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A96E7201B856D5000031470 /* main.m */; }; 4A96E7241B856D5000031470 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A96E7231B856D5000031470 /* AppDelegate.m */; }; 4A96E72D1B856D5000031470 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4A96E72B1B856D5000031470 /* Main.storyboard */; }; @@ -32,6 +33,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 1CD352982C9CE6A600534FCC /* CustomControls.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CustomControls.xib; sourceTree = ""; }; 4A96E71B1B856D5000031470 /* APIDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = APIDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 4A96E71F1B856D5000031470 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 4A96E7201B856D5000031470 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -169,6 +171,7 @@ AEE8DA9A201BD788008792E6 /* GAMCustomVideoControls */ = { isa = PBXGroup; children = ( + 1CD352982C9CE6A600534FCC /* CustomControls.xib */, 50DC0CEA212F1C2D00424CC7 /* GAMCustomVideoControlsController.h */, 50DC0CEB212F1C2D00424CC7 /* GAMCustomVideoControlsController.m */, AEE8DA9C201BD7A5008792E6 /* SimpleNativeAdView.h */, @@ -243,6 +246,7 @@ 4A96E72D1B856D5000031470 /* Main.storyboard in Resources */, 4A96E7321B856D5000031470 /* LaunchScreen.xib in Resources */, 4A96E72F1B856D5000031470 /* Images.xcassets in Resources */, + 1CD352992C9CE6A600534FCC /* CustomControls.xib in Resources */, AED1111020320CA900EA4BEE /* NativeAdView.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Objective-C/advanced/APIDemo/APIDemo/Base.lproj/Main.storyboard b/Objective-C/advanced/APIDemo/APIDemo/Base.lproj/Main.storyboard index 9509b5a3..b223ec5e 100644 --- a/Objective-C/advanced/APIDemo/APIDemo/Base.lproj/Main.storyboard +++ b/Objective-C/advanced/APIDemo/APIDemo/Base.lproj/Main.storyboard @@ -1,9 +1,9 @@ - + - + @@ -38,11 +38,11 @@ - + + + + + + + + + - + - - - @@ -1058,7 +997,6 @@ - @@ -1184,9 +1122,6 @@ - - - diff --git a/Objective-C/advanced/APIDemo/APIDemo/Base.lproj/NativeAdView.xib b/Objective-C/advanced/APIDemo/APIDemo/Base.lproj/NativeAdView.xib index 2ad6ab79..288506e1 100644 --- a/Objective-C/advanced/APIDemo/APIDemo/Base.lproj/NativeAdView.xib +++ b/Objective-C/advanced/APIDemo/APIDemo/Base.lproj/NativeAdView.xib @@ -1,9 +1,9 @@ - + - + @@ -40,20 +40,21 @@ - + - - + +