Cannot change the height of Login Button in FBSDKLoginKit?

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

    Realising this is an old question, I've found a solution and am posting it as an answer for future reference.

    After you have installed the FBSDKLoginKit via a Pod, look in your directory on the left in XCODE and open your PODS -- not your Podfile. Open FBSDKLoginKit, and open FBSDKLoginButton.m file.

    You will now see an alert indicating that you are editing. Ignore the alert, that is take notice of the message and make sure that you don't change anything other than your target info. Change the two fields that dictate Facebook button height in the file as seen below:

    Pictures to help you through the guide above:

    • project structure files to open
    • first field to change
    • second field to change

    EASIEST SOLUTION, no need to deal with programmatic rects, just do it in storyboard

提交回复
热议问题