ios - tabtab - uitabbarcontroller
Android喜歡在iOS上使用標籤的瀏覽器 (0)
我想知道什麼是最好的方式來實現一個類似於在國際足聯世界杯的應用程序
我能想到的各種方法是:
- 自定義UITabBarController與滑動和平底鍋的手勢 - 我試過這個和刷卡的經驗不像國際足聯的應用程序流暢。 它像新的Skype應用程序一樣遲鈍(認為他們正在使用這種方法)。
- 頁面視圖控制器 - 我也試過,但碰到一些奇怪的問題。 那之後沒有太多嘗試。
- 集合視圖控制器與水平分頁 - 這似乎是對我來說最好的方法,但我不知道內存管理。
我目前的實施 - 截至目前 ,我有三個標籤欄條目。 我有他們每個人單獨的視圖控制器。 這是我使用水平分頁收集視圖實現它的方式:
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
NSInteger indexNumber = indexPath.row;
UICollectionViewCell *cell;
switch (indexNumber) {
case 0:
cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"collectionViewCell1" forIndexPath:indexPath];
[cell.contentView addSubview:self.firstViewControllerObject.view];
break;
case 1:
cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"collectionViewCell2" forIndexPath:indexPath];
[cell.contentView addSubview:self.secondViewControllerObject.view];
break;
case 2:
cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"collectionViewCell3" forIndexPath:indexPath];
[cell.contentView addSubview:self.thirdViewControllerObject.view];
break;
default:
break;
}
return cell;
}
我想不出一種更好的方式來管理細胞,因此我做了不同的實體。 我怎樣才能更好地使用這種方法,或者如果這種方法不好,我應該使用什麼?