gpt4 book ai didi

iOS swift Facebook AccountKit 自定义

转载 作者:行者123 更新时间:2023-11-28 14:45:48 25 4
gpt4 key购买 nike

我尝试自定义 AccountKit 的标题 View ,但它不显示标题 View 。这是我尝试的方式:

import Foundation
import AccountKit

class AccountKitUIManager: AKFSkinManager {


@objc override func headerViewForState(state: AKFLoginFlowState) -> UIView? {
let view = UIView.init(frame: CGRect.init(x: 0, y: 0, width: 100, height: 50))
view.backgroundColor = UIColor.blue()
return view
}

}

func signInWithPhoneNumber() {
let inputState = NSUUID().UUIDString
let vc: AKFViewController = accountKit!.viewControllerForPhoneLoginWithPhoneNumber(nil, state: inputState) as! AKFViewController
vc.delegate = self
vc.uiManager = AccountKitUIManager.init(skinType: AKFSkinType.Classic, primaryColor: UIColor.blue(), backgroundImage: UIImage(named: "Login-bg-new"), backgroundTint: AKFBackgroundTint.White, tintIntensity: 0.1)
vc.whitelistedCountryCodes = ["VN"]


self.presentViewController(vc as! UIViewController, animated: true, completion: nil)
}

怎么了?请帮我。谢谢

引用链接: https://developers.facebook.com/docs/accountkit/ios/customizing

最佳答案

你必须为此使用 UILabel,如果你只想显示空间 View (没有内容的 View ),请使用带填充的 UILabel。

关于iOS swift Facebook AccountKit 自定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50264665/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com