2016-10-02 61 views
2

我覺得這是一個非常愚蠢的問題,但我似乎無法將我的UIScrollView掛鉤到containerView屬性。我在故事板中有一個UIViewController,其類是MyCustomClass。 MyCustomerClass繼承自ButtonBarPagerTabStripViewController。但是,故事板中沒有出現ButtonBarPagerTabStripViewController的出口?xlpagertabstrip無法掛接容器查看

回答

1

我認爲你做了這樣的事情

class exampleViewController: ButtonBarPagerTabStripViewController { 
    ... 
} 

screenshot1

然後在我的情況,我可以在網點看到containerView

screenshot2

而且你可以將它拖到到你的滾動視圖。

+0

哇它很好,謝謝! –

+0

@ ioio007對我來說containerView&buttonBarView沒有顯示在網點,我已經做了這樣的只有'exampleViewController:ButtonBarPagerTabStripViewController' 任何想法或指導,請 –

0

我也有同樣的問題。

當通過Carthage安裝庫時似乎會發生這種情況。

我發現在XLPagerTabStrip庫中提到的問題https://github.com/xmartlabs/XLPagerTabStrip/issues/244

解決方案:

您可以通過故事板拖動一個自己containerView,命名不要重複containerView的XLPagerTabStrip,例如:xxxcontainerView,超級然後之前。 viewDidLoad(),你可以這樣做:self.containerView = self.xxxcontainerView &相同的buttonBarView