title: How do I access an enum in Swift from Objective-C?
body: <p>There is a global enum defined in Objective-C:</p>
  
  <pre><code>typedef enum {
       UMSocialSnsTypeNone = 0,
       UMSocialSnsTypeQzone = 10,
       UMSocialSnsTypeSina = 11,                 //sina weibo
  } UMSocialSnsType;
  </code></pre>
  
  <p>This code sets the sharetype of a platform:</p>
  
  <pre><code>snsPlatform.shareToType = UMSocialSnsTypeDouban;
  </code></pre>
  
  <p>In Swift, I want to get the sharetype of the platform:</p>
  
  <pre><code>var snstype = snsPlatform!.shareToType
  println(snstype)
  </code></pre>
  
  <p>Result: <code>UMSocialSnsType (has 1 child)</code></p>
  
  <pre><code>snstype.toRaw()
  </code></pre>
  
  <p>Error: <code>UMSocialSnsType does not have a member named "toRaw"</code></p>