iOS swift Facebook AccountKit 自定义

标签 ios swift facebook

我尝试自定义 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/

相关文章:

ios - 3 tableView Sections with custom Cell Segues swift

javascript - 使用 Facebook API 发布到页面时添加定位

ios - Facebook 分享 iOS Swift

iphone - 是否可以向 UITableView 添加边框样式? (不是边框颜色/边框宽度)

html - 如何检索图像 url 的标题

ios - 拦截 UITextField touch

ios - 如何将CGRect转换为CGPoint iOS Swift

facebook - 是否可以将参数传递给通过选项卡访问的 FB 应用程序的回调 URL?

ios - 从 View Controller Xcode 传回数据

ios - 使用带有循环的 Alamofire 根据 Tableview 计数发送多个请求