SORU
19 Mart 2010, Cuma


Nasıl UİButton başlık rengini değiştirebilir miyim?

Düğmeye bir program aracılığıyla oluşturmak

button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button addTarget:self 
       action:@selector(aMethod:)
forControlEvents:UIControlEventTouchDown];
[button setTitle:@"Show View" forState:UIControlStateNormal];
button.frame = CGRectMake(80.0, 210.0, 160.0, 40.0);
[view addSubview:button];

nasıl başlık rengini değiştirebilir miyim?

CEVAP
19 Mart 2010, Cuma


-[UIButton setTitleColor:forState:] bunu yapmak için kullanabilirsiniz.

Örnek:

buttonName setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];

5* *için teşekkürler

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • calicoJake

    calicoJake

    29 EKİM 2007
  • Christopher Bill

    Christopher

    30 NİSAN 2009
  • Phymec

    Phymec

    18 Temmuz 2009