我正在使用Xcode的内置按钮类型"UIButtonTypeInfoLight"制作一个"信息"按钮.
这是我的代码:
self.helpButton= [UIButton buttonWithType:UIButtonTypeInfoLight]; [self.helpButton addTarget:self action:@selector(showHelp) forControlEvents:UIControlEventTouchUpInside]; self.helpButton.frame = CGRectMake(280.0, 440.0, 20, 20); [self.view addSubview:self.helpButton];
但是,有一个问题.我的应用包含一个包含3个不同视图控制器的滚动视图 一个蓝色,一个红色,一个绿色.
应用程序打开的页面上的图标看起来很好(蓝色):
但是,当我滑动到绿色或红色页面时,按钮似乎保持蓝色,并且不像我希望的那样透明:
我怎么能阻止它这样做?我只是希望图标透明?