andschdk/AdaptiveAppleSignInButton
AdaptiveAppleSignInButton
A better ASAuthorizationAppleIDButton that supports dark mode.
Problem
ASAuthorizationAppleIDButton does not update its appearance when toggling between light and dark mode. Aditionally it is not possible to update the appearance manually. You will have to create a new instance of ASAuthorizationAppleIDButton, initialising it with the correct style.
Solution
AdaptiveAppleSignInButton is wrapping an ASAuthorizationAppleIDButton with the correct style. When userInterfaceStyle changes a new instance will replace the previous one.
Preview
To run the example project, clone the repo, and run pod install from the Example directory first.
| Dark | Light | - |
|---|---|---|
![]() |
![]() |
<<<<<<<<<<<<<<<<<<<<<<<<<< |
Usage
Use AdaptiveAppleSignInButton like any other UIButton
let appleSignInButton = AdaptiveAppleSignInButton(authorizationButtonType: .signIn, lightStyle: .black, darkStyle: .white)Installation
AdaptiveAppleSignInButton is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod 'AdaptiveAppleSignInButton'License
AdaptiveAppleSignInButton is available under the MIT license. See the LICENSE file for more info.

