diff --git a/CustomKeyboard/View/KBFunctionView.m b/CustomKeyboard/View/KBFunctionView.m index 916cf5c..87d1d23 100644 --- a/CustomKeyboard/View/KBFunctionView.m +++ b/CustomKeyboard/View/KBFunctionView.m @@ -21,8 +21,6 @@ #import "KBFunctionTagListView.h" #import "KBStreamFetcher.h" // 网络流封装 -static NSString * const kKBFunctionTagCellId = @"KBFunctionTagCellId"; - @interface KBFunctionView () // UI @property (nonatomic, strong) KBFunctionBarView *barViewInternal; @@ -167,34 +165,7 @@ static NSString * const kKBFunctionTagCellId = @"KBFunctionTagCellId"; [self.tagListView setItems:self.itemsInternal]; } -#pragma mark - UICollectionView - -- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { - return self.itemsInternal.count; -} - -- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { - KBFunctionTagCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:kKBFunctionTagCellId forIndexPath:indexPath]; - cell.titleLabel.text = self.itemsInternal[indexPath.item]; - return cell; -} - -- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { - // 三列等宽 - CGFloat totalW = collectionView.bounds.size.width; - CGFloat space = 10.0; - NSInteger columns = 3; - CGFloat width = floor((totalW - space * (columns - 1)) / columns); - return CGSizeMake(width, 48); -} - -- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section { - return 10.0; -} - -- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section { - return 12.0; -} +// UICollectionView 逻辑已下沉至 KBFunctionTagListView - (void)kb_showStreamTextViewIfNeededWithTitle:(NSString *)title { // 已有则不重复创建 diff --git a/keyBoard/Class/Base/VC/BaseTabBarController.m b/keyBoard/Class/Base/VC/BaseTabBarController.m index 442e0b7..31d1f8b 100644 --- a/keyBoard/Class/Base/VC/BaseTabBarController.m +++ b/keyBoard/Class/Base/VC/BaseTabBarController.m @@ -61,7 +61,8 @@ self.viewControllers = @[navHome, navShop, navCommunity, navMy]; // 测试储存Token - /*[[KBAuthManager shared] saveAccessToken:@"TEST" refreshToken:nil expiryDate:[NSDate dateWithTimeIntervalSinceNow:3600] userIdentifier:nil]*/; +// [[KBAuthManager shared] saveAccessToken:@"TEST" refreshToken:nil expiryDate:[NSDate dateWithTimeIntervalSinceNow:3600] userIdentifier:nil]; + [[KBAuthManager shared] signOut]; } - (void)setupTabbarAppearance{