UIImage altertatives Stretchable UI?

Discussion in 'iOS Programming' started by Roman Oparin, Jul 28, 2013.

  1. Roman Oparin macrumors newbie

    Joined:
    Jul 21, 2013
    #1
    Hi! I'm using UIImage for stretchable buttons now:

    UIImage *buttonBackground = [UIImage imageNamed:mad:"Button"];
    buttonBackground = [buttonBackground stretchableImageWithLeftCapWidth:15 topCapHeight:0];
    [self.logoutButton setBackgroundImage:buttonBackground forState:UIControlStateNormal];
    (snippet taken from
    Tips for Using UIImage Objective-C Class)

    Can you advice a more elegant way to implement stretchable UI please?
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London

Share This Page