scalable images?

Discussion in 'iOS Programming' started by grandM, Feb 6, 2016.

  1. grandM macrumors 6502a

    grandM

    Joined:
    Oct 14, 2013
    #1
    So I just looked and saw that iOS supports png, jpg and gif. I hoped to drag svg into xcassetts but that seems to be a no go?
     
  2. Mascots macrumors 65816

    Mascots

    Joined:
    Sep 5, 2009
    #2
    Use PDF and set as single vector and Xcode will automatically scale and export the images on build for you.

    Only PDF is supported I believe.
     
  3. grandM thread starter macrumors 6502a

    grandM

    Joined:
    Oct 14, 2013
    #3
    So I export the image as pdf and drag it into xcassetts?
     
  4. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #4
    I'm sure OP can use Goog.le but here's a few relevant answers

    Good description of how things work
    http://stackoverflow.com/questions/25818845/how-do-vector-images-work-in-xcode-i-e-pdf-files

    Another review with a slightly different perspective, check out the UIImage+PDF category he mentions but this may not be necessary.
    http://mattgemmell.com/using-pdf-images-in-ios-apps/

    Blog: Why I don't use PDFs for iOS assets
    https://bjango.com/articles/idontusepdfs/

    OP doesn't mention if he expects the images to be dynamically scalable (i.e., in response to a user's touch) or just to have different sizes of the same image. The referenced posts don't address dynamically scalable images.
     

Share This Page