Cannot change the height of Login Button in FBSDKLoginKit?

后端 未结 12 1698
刺人心
刺人心 2021-02-05 09:19

I am using FBSDKLoginKit in iOS with Swift.

Up until recently it has been working perfectly, however I now cannot override the height of my button in the St

12条回答
  •  北恋
    北恋 (楼主)
    2021-02-05 09:30

    I could manage to change the height of the button this way:

    • I added a view facebookButtonView to the storyboard with the size that i want, and then in the viewDidLoad i simple do this:

      let loginButton = LoginButton(frame: self.facebookButtonView.frame, readPermissions: [ .publicProfile ])
      self.view.addSubview(loginButton)
      

    The Facebook button take the same size as the facebookButtonView. I tested with height 50 and it's working.

提交回复
热议问题