自定义按钮IOS SDK

时间:2015-06-05 21:07:41

标签: ios swift facebook-like facebook-ios-sdk

可以自定义facebook按钮SDK吗?我需要我的转动按钮图像或将按钮的背景设置为图像

    var likeControl:FBSDKLikeControl = FBSDKLikeControl()
    likeControl.objectID = fbPage
    likeControl.likeControlStyle = FBSDKLikeControlStyle.BoxCount
    likeControl.backgroundColor = UIColor(patternImage: UIImage(named: "fblike")!)
    likeControl.frame = CGRectMake(16,20, 290, 40)
    self.viewBotoes.addSubview(likeControl)

enter image description here

1 个答案:

答案 0 :(得分:0)

您无法将自己的背景图片分配给FBSDKLikeControlUIControl继承自FBSDKLikeControl

foregroundColor仅展示一些属性,例如FBSDKLikeControlAuxiliaryPositionFBSDKLikeControlHorizontalAlignmentlikeControlStylepreferredMaxLayoutWidthsoundEnabled和{{1} }