title: IOS - Split long NSString into NSArray based on current framesize and use pages in UIPageControl
body: <p>I am struggling to find an algorithm that can split long NSString into NSArray based on screen size. I am trying to implement UIPageControl and need to split text across pages.</p>
  
  <p>I have tried implementing NSTextContainer and setting frame size there but did't find a way to calculate how much NSTextContainers should be added into NSLayoutManager to cover whole string. </p>
  
  <p>Any help on the algorithm or any suggestion on NSTextContainer to split text across pages will be appreciated.</p>
  
  <p>Thanks in advance</p>