title: What is the Objective C equivalent of self.view.traitCollection.horizontalSizeClass?
body: <p>What is the obj c code for below swift statement?</p>
  
  <pre><code> if (self.view.traitCollection.horizontalSizeClass == UIUserInterfaceSizeClass.Compact)
  </code></pre>
  
  <p>what i figured out so far is proviede below but it is giving error when i add <code>self.view</code></p>
  
  <pre><code>    if ([self.view UITraitCollection traitCollectionWithHorizontalSizeClass:UIUserInterfaceSizeClassCompact])
      {
          NSLog(@"Compact");
      }
  </code></pre>