title: Vectorial PDF graphic elements on iOS
body: <p>Currently implementing vectorial interface elements on iOS is very peculiar, UIImage advertises support only for raster formats but i am able to set a pdf file as the image of a UIButton in IB <img src="https://i.stack.imgur.com/YrpdE.png" alt="here"> and it renders with good antialiasing, however the image is not visible on either iphone or ipad running iOS 4.x and 3.x, the only way to have it show is to recreate the same button in code and leave out the .pdf extension :</p>
  
  <pre><code>searchButton = [UIButton buttonWithType:UIButtonTypeCustom];
  [searchButton setImage:[UIImage imageNamed:@"search"] forState:UIControlStateNormal];
  [self.view addSubview:searchButton]; 
  </code></pre>
  
  <p>However this only shows the image on iOS 4.x and with considerable resize pixelation and no antialiasing as illustrated:</p>
  
  <p><img src="https://i.stack.imgur.com/YZ7uO.png" alt="alt text"></p>
  
  <p>Besides the obvious questions of why it looks this bad, why it only works in 4.x, and why the IB version does not work at all, does anyone know any ways to properly user vectorial art in apps? </p>
  
  <p>It does not have to be necessarily PDF but I have seen Apple use that a lot on the mac side apps, both the code and IB approaches above work perfectly on OSX apps BTW.</p>