facebook login button cannot be customized? swift

时间:2016-02-12 19:59:21

标签: ios swift facebook

    faceBookRegisterButton.delegate = self
    faceBookRegisterButton.readPermissions = ["public_profile", "email", "user_friends"]
    faceBookRegisterButton.setBackgroundImage(UIImage(named: "facebook_filled"), forState: .Normal)
    faceBookRegisterButton.frame = CGRectMake(faceBookRegisterButton.frame.origin.x, faceBookRegisterButton.frame.origin.y, 107, 107)
    faceBookRegisterButton.setTitle("", forState: .Normal)
    print(faceBookRegisterButton.titleLabel?.text)

faceBookRegisterButton is a UIButton whose class is FBSDKLoginButton. However, I find when I customize the button it does not work, the setBackgroundImage works, however, frame and setTitle does not work why? Now, the screenshot is like that

I really want to delete that Log in with and resize the button. Could you help me?

1 个答案:

答案 0 :(得分:0)

1) No need to do the fancy stuff just take a button in strpbrk() .It will be a simple custom button which can be customized as you want.

note - No need to change the class of button, it will UIButton

2)Drag the action in the ViewController call below method

storyBoard