2014-07-22 107 views
0

我想創建一個像Fotmob應用程序的故事板中的滾動頁面視圖。見下圖。 (滾動頁面和滾動標題以及)UIScrollView分頁與標題

我跟着https://github.com/TomThorpe/UIScrollSlidingPages這是非常好的,但我似乎得到了一個奇怪的錯誤後,它被移動到故事板的應用程序。

以下是錯誤:

[pagesViewController titleForSlidingPagesViewController:atIndex:]: unrecognized   selector sent to instance 0x8e22750 

以下是一段代碼(有錯誤的* title變量被觸發 - ....變量numOfPages作品精絕然):

//get the number of pages 
int numOfPages = [self.dataSource numberOfPagesForSlidingPagesViewController:self]; 

//keep track of where next to put items in each scroller 
int nextXPosition = 0; 
int nextTopScrollerXPosition = 0; 


//loop through each page and add it to the scroller 
for (int i=0; i<numOfPages; i++){ 
    //top scroller (nav) add---- 

    TTSlidingPageTitle *title = [self.dataSource titleForSlidingPagesViewController:self atIndex:i]; 
    UIView *topItem; 
    if (title == nil){ 

一個非常類似的問題已經被問這裏UIPage Control custom style NatGeo .....回答待定

有誰知道OTH呃我可以熟悉的例子,或者可以幫助我用我的東西。

fotmob https://github.com/TomThorpe/UIScrollSlidingPages

回答

0

不知怎的,我做的一些功能刪除操作沒有注意到。這解決了上述錯誤

我仍然對任何其他與上述故事板滾動頁面有關的工作感興趣。我做了大量的搜索,並找到了一個資源

謝謝