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呃我可以熟悉的例子,或者可以幫助我用我的東西。
https://github.com/TomThorpe/UIScrollSlidingPages