I’m having so much trouble getting the login button to resize. I’ve tried to create a frame with CGRect, like so(within viewDidLoad)
let twitterLoginButton = TWTRLogInButton(frame: CGRectMake(0, 0, 200, 50))
self.view.addSubview(twitterLoginButton)
Also tried this
let twitterLoginButton = TWTRLogInButton.init(frame: CGRectMake(0, 0, 200, 50))
self.view.addSubview(twitterLoginButton)
But no luck.
Also tried to force the button into a parent container and then try to force the button to assume the size of parent like so
let twitterLoginButton = TWTRLogInButton()
let twitterLoginButtonParent = TWTRLogInButton(frame: CGRectMake(0, 0, 200, 50))
twitterLoginButtonParent.addSubview(twitterLoginButton)
self.view.addSubview(twitterLoginButtonParent)
let twitterLoginButtonSize = CGSize(width: 200, height: 50)
twitterLoginButton.sizeThatFits(twitterLoginButtonSize)
Is it even possible to resize this button? Supposedly it is a subclass of UIButton, yet none of the methods of UIButton seem to work on it. Thanks.