iPhone在状态栏中添加图标(电池指示灯) [英] iPhone add icon in status bar (a la Battery Indicator)

查看:190
本文介绍了iPhone在状态栏中添加图标(电池指示灯)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以在iPhone状态栏中添加图标,就像电池和wifi指示灯一样。我该怎么做?

I was wondering if it is possible to add an icon to the iPhone status bar, much like the battery and wifi indicator. How can I do this?

谢谢。

推荐答案

如前所述据报道,使用SDK无法实现这一目的。

As previously reported, it's not possible to do so with the SDK.

如果您正在为越狱环境工作,状态栏图标需要放在/ System / Library /中CoreServices / SpringBoard.app有两个版本:Default_NAME.png和FSO_NAME.png。默认用于轻型菜单栏状态栏,主屏幕上的FSO或使用黑色状态栏的应用程序。

If you're working for a jailbroken environment, status bar icons need to be placed within /System/Library/CoreServices/SpringBoard.app with two versions: Default_NAME.png and FSO_NAME.png. Default is used in the light menubar-like status bar, FSO on the home screen or apps that use the black status bar.

SBStatusBarController有一个名为addStatusBarItem:的方法,只是用@NAME作为你的参数调用它,它将为你处理其余部分。

SBStatusBarController has a method called addStatusBarItem:, just call it with @"NAME" as your argument and it will handle the rest for you.

这篇关于iPhone在状态栏中添加图标(电池指示灯)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆