SORU
15 EYLÜL 2009, Salı


Nasıl iPhone SDK ile büyük, kırmızı bir UİButton oluşturabilir miyim?

İPhone SDK kullanarak, nasıl bir kırmızı "" düğmesine bir iPhone rehber silme? kullanılan benzer sil oluşturma hakkında gitmek istiyorsunuz

CEVAP
23 Kasım 2010, Salı


Ayrıca, bazı düğmeler...retina yaptım ve non-retina sürümleri

Eğer bir Hücrede bunları kullanmak istiyorsanız, sadece cellForRowAtİndexPath aşağıdaki kodu kullanın:

UIButton *sampleButton = [UIButton buttonWithType:UIButtonTypeCustom];
[sampleButton setFrame:[cell.contentView frame]];
[sampleButton setFrame:CGRectMake(0, 0, cell.bounds.size.width-20, 44)];
[sampleButton setBackgroundImage:[UIImage imageNamed:@"button_red.png"] forState:UIControlStateNormal];
[cell addSubview:sampleButton];

Green Button Normal

Red Button Normal

Grey Button Normal

Green Button Retina Red Button Retina Grey Button Retina

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

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Maschine Tutorials

    Maschine Tut

    15 ŞUBAT 2011
  • Metheud

    Metheud

    9 EYLÜL 2006
  • whiteboy7thst

    whiteboy7ths

    1 Temmuz 2009