title: How to convert an Int to Hex String in Swift
body: <p>In Obj-C I used to convert an unsigned integer n to a hex string with </p>
  
  <pre><code> NSString *st = [NSString stringWithFormat:@"%2X", n];
  </code></pre>
  
  <p>I tried for a long time to translate this into Swift language, but unsuccessfully. </p>