Search code examples
iosobjective-cuisplitviewcontroller

How to change UISplitVIew's TableView Width


I have an ipad app in portrait mode but due to shorter width of DetailView it is hiding content in it according to width wise. SO i want to shorter the width of table view. Any Idea?


Solution

  • Simple and easy feature of IOS 8.

    In your .h file:

    @property(nonatomic, assign) CGFloat maximumPrimaryColumnWidth NS_AVAILABLE_IOS(8_0);
    

    In your .m file:

     self.maximumPrimaryColumnWidth = 100;
     self.splitViewController.maximumPrimaryColumnWidth = self.maximumPrimaryColumnWidth;