2009-06-08 11 views
0
UIButton *ticketButtonObj= 
    [[UIButton alloc]initWithFrame:CGRectMake(140.0f 100.0f, 390.0f, 40.0f)]; 
UIImage *buttonicon1=[UIImage alloc]; 
buttonicon1=[UIImage imageNamed:@"Generalticket.png"]; 

buttonicon1とbuttonicon1の背景を左揃えで設定する方法は?uibuttonタイトル

pls助けてください...ありがとう、尊敬します。

+0

これはどのようなプログラミング言語ですか? – Sahas

+0

私はおそらくMacまたはiPhoneのObjective-Cを推測しています – Tim

+8

@ Raju - あなたは24の質問をしましたが、誰も回答がありません。あなたの質問を見直し、有益な回答を提供してくれた人々に報いてください。 – diciu

答えて

3
UIButton *ticketButtonObj = [[UIButton alloc] initWithFrame:CGRectMake(140.0f 100.0f, 390.0f, 40.0f)]; 
UIImage* buttonicon1 = [UIImage imageNamed:@"Generalticket.png"]; 
[ticketButtonObj setImage:image forState:UIControlStateNormal]; 
ticketButtonObj.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft; 

か、あなたは、背景画像を設定したい場合:

[ticketButtonObj setBackgroundImage:image forState:UIControlStateNormal]; 

をしかし、あなたは、バックグラウンドのためにアライメントを設定することはできません。

関連する問題