Before you make a Pull Request, read the important guidelines:
Is this a bug fix or a feature? - feature! with a little fix too I suppose
Does it break any existing functionality? - nope
CardPartVideoView only added the AVPlayerViewController's view as a subview, leaving the viewController itself dangling and leading to the following errors when entering and exiting full screen:
By setting the CardPartView's viewController property to the instance of AVPlayerViewController, we no longer see this error because calling setupCardParts will automatically add this viewController as a child of the CardPartsViewController. Setting the viewController also allows read-only access for users to get this property, cast it as an AVPlayerViewController, and set the delegate or customize other properties.
Also set the AppIcon so CardParts looks like this on the home screen:
Goals of this PR :tada:
Why is the change important? - Makes the CP app prettier and more identifiable on your simulator's home screen, and makes CardPartVideoView more customizable
What does this fix? - Limited customizability of CardPartVideoView and warnings about undefined behavior when entering/exiting full screen
How far has it been tested? No difference in functionality in the sample app aside from being able to customize more parts of CardPartVideoView
How Has This Been Tested :mag:
Please let us know if you have tested your PR and if we need to reproduce the issues. Also, please let us know if we need any relevant information for running the tests.
User Interface Testing - no issues
Application Testing - no issues
Test Configuration :space_invader:
Xcode version: 12.0
Device/Simulator: 11 Pro
iOS version: 14.0 || MacOSX version: 10.15.5
Things to check on :dart:
[x] My Pull Request code follows the coding standards and styles of the project
[x] I have worked on unit tests and reviewed my code to the best of my ability
[x] I have used comments to make other coders understand my code better
[x] My changes are good to go without any warnings
[x] I have added unit tests both for the happy and sad path
[x] All of my unit tests pass successfully before pushing the PR
[x] I have made sure all dependent downstream changes impacted by my PR are working
Before you make a Pull Request, read the important guidelines:
CardPartVideoView only added the AVPlayerViewController's view as a subview, leaving the viewController itself dangling and leading to the following errors when entering and exiting full screen:
By setting the CardPartView's viewController property to the instance of AVPlayerViewController, we no longer see this error because calling setupCardParts will automatically add this viewController as a child of the CardPartsViewController. Setting the viewController also allows read-only access for users to get this property, cast it as an AVPlayerViewController, and set the delegate or customize other properties.
Also set the AppIcon so CardParts looks like this on the home screen:
Goals of this PR :tada:
How Has This Been Tested :mag:
Please let us know if you have tested your PR and if we need to reproduce the issues. Also, please let us know if we need any relevant information for running the tests.
Test Configuration :space_invader:
Things to check on :dart: