如何在TabBar中删除和重置顶行-对于iOS 13 +

问题描述 投票:-1回答:1

[我正在尝试在iOS 13.2.2中删除TabBar中的顶行,但下面的帖子中的所有答案都不再适用于iOS 13.2.2

链接-Remove top line from TabBar

  1. 最近是否有API更改?

  2. 如何在iOS 13.2.2中的TabBar中删除和重置顶行?

ios objective-c swift uitabbar
1个回答
0
投票
#import "ViewController.h" @protocol TabBarDelegate; @interface TabBar : UIView{ id<TabBarDelegate> delegate; UIView *backgroundView; UIButton *btn1; UIButton *btn2; UIImageView *img1; UIImageView *img2; UIView *hubHolder; } @property (nonatomic, retain) UIView *backgroundView; @property (nonatomic, retain) id<TabBarDelegate> delegate; @property (nonatomic, retain) UIButton *btn1; @property (nonatomic, retain) UIButton *btn2; @property (nonatomic, retain) UIImageView *img1; @property (nonatomic, retain) UIImageView *img2; - (id) initWithFrame:(CGRect)frame; @end @protocol TabBarDelegate<NSObject> @optional - (void) tabbarTapped:(int)index; @end

您可以轻松地定义带有按钮的视图(按钮编号取决于您要通过选项卡栏转到多少个控制器),并委派控制一个按钮是否被点击。由于这是一个UIView,因此您可以操纵它的外观。希望对您有所帮助。

© www.soinside.com 2019 - 2024. All rights reserved.