小编Sea*_*man的帖子

UIStatusBarStyleLightContent不设置电池白色?

我正在以编程方式将我的状态栏设置为白色:

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
Run Code Online (Sandbox Code Playgroud)

但是电池图标仍然是绿色的?苹果示例在应用此样式时显示电池是否为白色?看到有例子这里.

知道如何将电池从绿色更改为白色吗?:(

statusbar ios uistatusbar ios7

8
推荐指数
1
解决办法
2204
查看次数

在Objective-C中使用数组试图简化大量重复代码

你好StackOverflow大师.这是我在这里的第一个问题所以我很高兴能够直接进入.

我试图更好地理解iOS数组,我已经碰到了一堵砖墙.我正在制作一个使用FMOD的声音应用.我有一切工作完美,但我有9个按钮,所有都执行几乎完全相同的事情,除了每个按下播放不同的.wav文件然后发布停止声音.我想将它放入一个数组中,简化并缩短我的代码,这就是我迷失的地方.我删除了代码以显示我目前正在进行的操作.有任何想法吗?

.H

@interface {

FMOD::Sound    *sound1;
FMOD::Sound    *sound2;
FMOD::Sound    *sound3;
FMOD::Sound    *sound4;
FMOD::Sound    *sound5;
FMOD::Sound    *sound6;
FMOD::Sound    *sound7;
FMOD::Sound    *sound8;
FMOD::Sound    *sound9;

}

- (IBAction)playSound1:(id)sender;
- (IBAction)stopSound1:(id)sender;
- (IBAction)playSound2:(id)sender;
- (IBAction)stopSound2:(id)sender;
- (IBAction)playSound3:(id)sender;
- (IBAction)stopSound3:(id)sender;
- (IBAction)playSound4:(id)sender;
- (IBAction)stopSound4:(id)sender;
- (IBAction)playSound5:(id)sender;
- (IBAction)stopSound5:(id)sender;
- (IBAction)playSound6:(id)sender;
- (IBAction)stopSound6:(id)sender;
- (IBAction)playSound7:(id)sender;
- (IBAction)stopSound7:(id)sender;
- (IBAction)playSound8:(id)sender;
- (IBAction)stopSound8:(id)sender;
- (IBAction)playSound9:(id)sender;
- (IBAction)stopSound9:(id)sender;
Run Code Online (Sandbox Code Playgroud)

- (void)viewWillAppear:(BOOL)animated {

[[NSString stringWithFormat:@"%@/sound1.wav", [[NSBundle mainBundle] resourcePath]] getCString:buffer maxLength:200 encoding:NSASCIIStringEncoding];
    result = system->createSound(buffer, FMOD_SOFTWARE | FMOD_LOOP_NORMAL, NULL, &sound1); …
Run Code Online (Sandbox Code Playgroud)

arrays iphone objective-c fmod ios

2
推荐指数
1
解决办法
348
查看次数

标签 统计

ios ×2

arrays ×1

fmod ×1

ios7 ×1

iphone ×1

objective-c ×1

statusbar ×1

uistatusbar ×1