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

  • Artorius FullPower

    Artorius Ful

    29 Temmuz 2007
  • Gavin Hoey

    Gavin Hoey

    21 Aralık 2007
  • JamesAtiPhone

    JamesAtiPhon

    16 EYLÜL 2010