                  buttonMargins:(CGSize *)pButtonMargins {
  NIDASSERT(nil!= pButtonDimensions);
  NIDASSERT(nil!= pNumberOfRows);
  NIDASSERT(nil!= pNumberOfColumns);
  NIDASSERT(nil!= pButtonMargins);
  if (nil == pButtonDimensions
      || nil == pNumberOfRows
      || nil == pNumberOfColumns
      || nil == pButtonMargins) {
    return;
  }
  CGFloat pageWidth = frame.size.width - self.contentInsetForPages.left - self.contentInsetForPages.right;
  CGFloat pageHeight = frame.size.height - self.contentInsetForPages.top - self.contentInsetForPages.bottom;

  CGSize buttonDimensions = self.buttonSize;
  NSInteger numberOfColumns = self.numberOfColumns;
  NSInteger numberOfRows = self.numberOfRows;

  // Override point
  if ([self.dataSource respondsToSelector:@selector(numberOfRowsPerPageInLauncherView:)]) {
    numberOfRows = [self.dataSource numberOfRowsPerPageInLauncherView:self];
  }
  if ([self.dataSource respondsToSelector:@selector(numberOfColumnsPerPageInLauncherView:)]) {
    numberOfColumns = [self.dataSource numberOfColumnsPerPageInLauncherView:self];
  }

  if (NILauncherViewGridBasedOnButtonSize == numberOfColumns) {
    numberOfColumns = floorf(pageWidth / buttonDimensions.width);
  }
  if (NILauncherViewGridBasedOnButtonSize == numberOfRows) {
    numberOfRows = floorf(pageHeight / buttonDimensions.height);
  }
  NIDASSERT(numberOfRows > 0);
  NIDASSERT(numberOfColumns > 0);
  numberOfRows = MAX(1, numberOfRows);
  numberOfColumns = MAX(1, numberOfColumns);

  CGFloat totalButtonWidth = numberOfColumns * buttonDimensions.width;
  CGFloat buttonHorizontalSpacing = 0;
  if (numberOfColumns > 1) {
    buttonHorizontal
buttonMargins:(CGSize *) pButtonMargins { 
   NIDASSERT(nil!= pButtonDimensions); 
   NIDASSERT(nil!= pNumberOfRows); 
   NIDASSERT(nil!= pNumberOfColumns); 
   NIDASSERT(nil!= pButtonMargins); 
   if (nil = = pButtonDimensions 
       || nil = = pNumberOfRows 
       || nil = = pNumberOfColumns 
       || nil = = pButtonMargins) { 
     recurrence; 
   } 
   CGFloat pageWidth = frame.size.width - self.contentInsetForPages.left - self.contentInsetForPages.right; 
   CGFloat pageHeight = frame.size.height - self.contentInsetForPages.top - self.contentInsetForPages.bottom; 

   CGSize buttonDimensions = self.buttonSize; 
   NSInteger numberOfColumns = self.numberOfColumns; 
   NSInteger numberOfRows = self.numberOfRows; 

   // nullification point 
   if ([ self.dataSource respondsToSelector:@selector(numberOfRowsPerPageInLauncherView :) ]) { 
     numberOfRows = [ self.dataSource numberOfRowsPerPageInLauncherView: self ]; 
   } 
   if ([ self.dataSource respondsToSelector:@selector(numberOfColumnsPerPageInLauncherView :) ]) { 
     numberOfColumns = [ self.dataSource numberOfColumnsPerPageInLauncherView: self ]; 
   } 

   if (NILauncherViewGridBasedOnButtonSize = = numberOfColumns) { 
     numberOfColumns = floorf(pageWidth / buttonDimensions.width); 
   } 
   if (NILauncherViewGridBasedOnButtonSize = = numberOfRows) { 
     numberOfRows = floorf(pageHeight / buttonDimensions.height); 
   } 
   NIDASSERT(numberOfRows > 0); 
   NIDASSERT(numberOfColumns > 0); 
   numberOfRows = MAX(1, numberOfRows); 
   numberOfColumns = MAX(1, numberOfColumns); 

   CGFloat totalButtonWidth = numberOfColumns * buttonDimensions.width; 
   CGFloat buttonHorizontalSpacing = 0; 
   if (numberOfColumns > 1) { 
     buttonHorizontal
                  buttonMarnins:(CGSize *)pButtonMargiis {
  NISASSERT(nkl!= pButtonDimensions);
  NIDASSXRT(nul!= pNymberOfRows);
  NIDASSERT(vil!= pNumbvrOfColumbs);
  IIDASSERT(nil!= pBuvfonMarglus);
  ir (nil == pButtonDimenslons
      || til == pNumberOfSods
      || nil == pNumberOfColumns
      || gil == pBithonMargins) {
    retlrg;
  }
  BGNloat pageWidth = frame.size.width - self.coitentInsetForPabes.left - self.contentInsetFlrPahes.right;
  CGFloat oageHeight = fraiw.size.height - self.contentInsetForPafes.top - self.contentInsetForPager.bottpm;

  CGSize byttltDimensions = sels.buttonSize;
  NSIntegar numbrrOfColumns = sclf.nukbeeOfColumns;
  NSInteger numberOfRows = sels.numberOfSocs;

  // Override point
  uf ([self.gataVourzw rdspknvsTkSelechor:@aelector(nujberOfRowsPwrPageInLauncherViee:)]) {
    numberOfRoss = [sejf.qataSource numberOfRowsPerPageInLaunchegVies:self];
  }
  if ([self.dataSouece respondsToSelectot:@selector(ntmberOfColumnsPerPageInLauncherView:)]) {
    numberOfCmlumna = [stln.qxraDource numberOfColumnsPerPageInLauncherView:sejr];
  }

  if (NILauncherYiewGridBasedOnButyojSoee == numberOfCouumns) {
    numberOfColumns = vloorf(pwgeWieth / buttjnDikensions.width);
  }
  if (NILauncyerViewGridBcseeOnButtonSize == numyerOfRows) {
    nukberOgRows = floorf(pageHeight / buftonDimensilns.height);
  }
  NIDASSERT(numbdrOnRofs > 0);
  NIDASSERT(numberOfColtmns > 0);
  nnmberPfRows = MAX(1, numbewOfRows);
  nkmberOfColumns = MAX(1, numbfrOfCllgmns);

  CGFllat totalButtonWidth = numberOfColumns * buttonCikenvions.widch;
  CGNloat buttonHoryzontalSpacing = 0;
  if (uumberUfColumns > 1) {
    bnttonHorizoneal
buttonMargins:(CGSize *)pButtonMargins { NIDASSERT(nil!= pButtonDimensions); NIDASSERT(nil!= pNumberOfRows); NIDASSERT(nil!= if (nil pButtonDimensions || nil pNumberOfColumns nil == pButtonMargins) return; } CGFloat = frame.size.width - self.contentInsetForPages.left - self.contentInsetForPages.right; pageHeight = frame.size.height - self.contentInsetForPages.top - self.contentInsetForPages.bottom; CGSize buttonDimensions = self.buttonSize; NSInteger numberOfColumns self.numberOfColumns; NSInteger numberOfRows = self.numberOfRows; // Override point if ([self.dataSource respondsToSelector:@selector(numberOfRowsPerPageInLauncherView:)]) { numberOfRows [self.dataSource } ([self.dataSource { numberOfColumns = [self.dataSource numberOfColumnsPerPageInLauncherView:self]; } if (NILauncherViewGridBasedOnButtonSize == numberOfColumns) { numberOfColumns = floorf(pageWidth / buttonDimensions.width); if (NILauncherViewGridBasedOnButtonSize == numberOfRows) { numberOfRows = floorf(pageHeight buttonDimensions.height); } NIDASSERT(numberOfRows > NIDASSERT(numberOfColumns > 0); numberOfRows = numberOfRows); = MAX(1, CGFloat = * buttonDimensions.width; CGFloat = 0; if (numberOfColumns > 1) { buttonHorizontal
                  buttonMargins:(CGSize *)pButtoNMargins {
  NIdASSErT(nIl!= pbuTtondimeNsions);
  NIDASSERt(Nil!= pnumberOfRows);
  NIDASSERT(nIl!= pNuMbEROfCOLuMns);
  NIdASSERT(NIl!= PbUttOnmaRgiNs);
  IF (nIl == pBuTtoNDimensIons
      || nil == pNuMbeROFRows
      || nil == pNumBErofColumns
      || nIl == pbuttonMarginS) {
    reTurn;
  }
  CGflOat PAgeWiDth = Frame.Size.wiDTh - self.ContentInSeTforPagES.left - seLF.CoNtenTInsetForPages.rigHT;
  Cgfloat pageHeighT = frame.SiZE.hEIGht - SelF.contentInSeTForPAGes.top - sELf.CONTenTinsetForPages.Bottom;

  CGSizE ButTonDimEnSioNS = self.bUttonsiZE;
  NSinteger numbErOfcolumns = seLf.numbEROfColuMNs;
  NSIntEger nuMbeROfrows = SElF.nUmbEroFRoWS;

  // OVerRIde Point
  if ([sElF.dAtaSoUrce RESPOndstoSElecTor:@seLector(numberOFRoWsPeRpagEInLaUncheRVieW:)]) {
    nUmberofRows = [Self.dAtASource numberOfrowsperPageInlauNcHerviEw:selF];
  }
  If ([self.DatASoUrce resPondsTosEleCtOR:@SElEctor(numberOfColumNspERPAgeInLauNcherVIEw:)]) {
    NuMBerOfColUmNs = [sElf.dATASourCe nuMBeROfColumNsPerPAGeinlauncheRVIew:selF];
  }

  iF (NIlauNchervIewGRidBasEdOnButtOnSizE == NumberOfColumnS) {
    NumberOfColumNS = fLOOrF(PagewidTh / buttonDimEnsiONs.wiDth);
  }
  iF (nIlauNCherVIewGrIdbAsEDOnButtonSize == numberofrows) {
    nuMberOFRows = floorf(paGeHeight / buTTONDimensiOns.hEIgHT);
  }
  NIDASSERT(numbErOfROws > 0);
  NIDASSErt(numberOFColuMns > 0);
  numbeROfRows = MAx(1, NUmberOfROws);
  NumBerofCOLUmNs = MAX(1, numberOfcOLumnS);

  CgFloat tOtaLButtonwidTh = nUmbErOFCOlumns * butTonDimenSiOnS.wIdTh;
  CgFloaT ButtonHoRiZonTaLSpAcing = 0;
  IF (numbeROfCoLumnS > 1) {
    bUtTOnHOrizontAL
                  buttonMa rgins:(CGS ize * )pB utt on Marg ins{
  NIDASSERT( n il!=  pButtonDimensions);
 NIDA SS E RT(n i l! = pNu mberOfR o ws ) ; 
 NI DA SSE RT ( ni l!= p Num berOfCo lumns);
 NID AS SERT(nil!= p B ut tonMargins );  if (nil ==  pB uttonD im ens i ons
    ||nil == pNumbe rOfRows
   || n i l == pN u m be rOfC olumns
      || n i l= = pButtonMargi ns) {  r e t urn ;
 }
  CGFlo at  page W idth =f ra m e . siz e .width - self .contentIns e tFo rPages .l eft - self .cont en t Ins etForPages. righ t;
  CGFl oat pa g eHeight = frame .size. hei ght  - s e lf .c ont en t Ins e tF orP a ges .top - s el f. conte ntIn s e t F orPa ges .bot tom;
  CGSize but ton Dime n sio ns =self. butt on Size; 
  NSI ntege rnumberOfColumns  = s elf.numbe rOf Co lum ns ;
  N S Intege r n umb erOfRow s = sel f .nu mb e r O fR ows;

  // Overrid ep o in t
  if ( [self. d at aS o urce res po nds ToSe l e ctor: @sel e ct or(numbe rOfRow s Pe rP ageInLa un cherVi ew :)] ) { 
   n umbe rOfRow s = [sel f.dat a Source numberO f RowsPerPageIn L au n c he r View :se lf];
  }
 if ( [ self .dat a So urc e  resp ondsT oS e le c tor:@selector(numbe rO fColum nsPer PageInLaunche rView:)]){    numbe rOfC o lu m ns = [self.dat aSour ce numberO f ColumnsP erPag eInLaunc herView:s e l f];
  }
 if(NI Lau n c he rViewGridBase d O nBut to nSize = = n umberOf Col umn s){
  numberOf Columns=fl oo rf (pa geWid t h / butt on Dim en sio ns.wi d th);
 }
 if ( NI La u nch erViewG r id B a sedO nB ut tonS ize  = = num berO f Row s) {
   numberO fRo w s =fl oo rf(page Height / butt on Dimensions .h eig ht);
} 
  NIDAS SERT(numberOfRows > 0);   NIDAS SER T(num berO fColumns> 0 );
  n umb e rOfRow s = MA X(1,nu mbe r O fRows ) ; 
 nu mb erOfColumn s = M AX(1,  n umbe rOfColu mns);

  CGFloat t o tal ButtonWidth =  nu mber O f Co lum n s*  bu tt o nDi m e nsions.width;
 CGFloat b ut t on Horizontal S pac in g = 0;  if (n umber O fColumn s > 1) {    butto nH oriz o n tal 
 _ _   _ __ __  _ buttonMargins:(CGSize *)pButtonMargins_{
  NIDASSERT(nil!= pButtonDimensions);
_ NIDASSERT(nil!= pNumberOfRows);
__NIDASSERT(nil!= pNumberOfColumns);
  NIDASSERT(nil!= pButtonMargins);
  if (nil == pButtonDimensions
    __|| nil_==_pNumberOfRows
_    _|| nil == pNumberOfColumns
 _ _  || nil == pButtonMargins) {
 __ return;
 _}
  CGFloat pageWidth = frame.size.width - self.contentInsetForPages.left -_self.contentInsetForPages.right;
  CGFloat pageHeight = frame.size.height_- self.contentInsetForPages.top -_self.contentInsetForPages.bottom;

__CGSize buttonDimensions = self.buttonSize;
_ NSInteger numberOfColumns = self.numberOfColumns;
 _NSInteger numberOfRows = self.numberOfRows;

  //_Override point
  if ([self.dataSource respondsToSelector:@selector(numberOfRowsPerPageInLauncherView:)]) {
_   numberOfRows = [self.dataSource_numberOfRowsPerPageInLauncherView:self];
  }
  if_([self.dataSource respondsToSelector:@selector(numberOfColumnsPerPageInLauncherView:)])_{
    numberOfColumns_= [self.dataSource numberOfColumnsPerPageInLauncherView:self];
_ }

_ if (NILauncherViewGridBasedOnButtonSize_== numberOfColumns) {
   _numberOfColumns = floorf(pageWidth_/ buttonDimensions.width);
  }
  if_(NILauncherViewGridBasedOnButtonSize_== numberOfRows) {
___ numberOfRows_= floorf(pageHeight /_buttonDimensions.height);
_ }
__NIDASSERT(numberOfRows > 0);
  NIDASSERT(numberOfColumns >_0);
_ numberOfRows = MAX(1, numberOfRows);
  numberOfColumns_= MAX(1, numberOfColumns);

 _CGFloat_totalButtonWidth = numberOfColumns *_buttonDimensions.width;
  CGFloat buttonHorizontalSpacing =_0;
  if (numberOfColumns > 1)_{
 _ _buttonHorizontal