From 0aead49816b4628a94279733e5c23fe18fc4cf87 Mon Sep 17 00:00:00 2001 From: CodeST <694468528@qq.com> Date: Wed, 12 Nov 2025 19:46:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E5=85=B3=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=20=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CustomKeyboard/View/KBFunctionView.m | 31 +------------------ keyBoard/Class/Base/VC/BaseTabBarController.m | 3 +- 2 files changed, 3 insertions(+), 31 deletions(-) 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{