2014-10-09 137 views

回答

0

是的,這是可能的,你可以改變默認的FBLoginView按鈕。

loginView.frame = CGRectMake(320/2 - 93/2, self.view.frame.size.height -200, 93, 93); 

for (id loginObject in loginView.subviews) 
{ 
    if ([loginObject isKindOfClass:[UIButton class]]) 
    { 
     UIButton * loginButton = loginObject; 
     UIImage *loginImage = [UIImage imageNamed:@"YOUR_IMAGE_HERE"]; 
     loginButton.alpha = 0.7; 
     [loginButton setBackgroundImage:loginImage forState:UIControlStateNormal]; 
     [loginButton setBackgroundImage:nil forState:UIControlStateSelected]; 
     [loginButton setBackgroundImage:nil forState:UIControlStateHighlighted]; 
     [loginButton sizeToFit]; 
    } 
    if ([loginObject isKindOfClass:[UILabel class]]) 
    { 
     UILabel * loginLabel = loginObject; 
     loginLabel.text = @""; 
     loginLabel.frame = CGRectMake(0, 0, 0, 0); 
    } 
} 
+0

它沒有工作。如果條件不成立。你試過這個。 – 2014-10-27 09:17:55