Cannot change the height of Login Button in FBSDKLoginKit?

后端 未结 12 1625
刺人心
刺人心 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:29

    If you are after just changing the height of your button, you can simply adjust the constant of the already present height constraint on the button, after adding the button in your Storyboard:

    for constraint in facebookButton.constraints where constraint.firstAttribute == .height {
        constraint.constant = YOUR_Height
    }
    

    This code can be placed in viewDidLoad().

提交回复
热议问题