首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Theos偏好捆绑包

Theos偏好捆绑包
EN

Stack Overflow用户
提问于 2014-04-19 17:08:31
回答 1查看 1.4K关注 0票数 0

我是一个业余开发人员,在objective C方面有一些基本技能。

我做了一些小的基板调整--最后一个调整是为Facebook做的全屏。现在,我想为我的调整创建一个首选项包。

我在网上阅读了大量的指南,但没有一个有帮助。我知道我应该在theos中创建一个首选项包,并修改plist,然后放入某种代码来引导我的调整进入首选项路径,并为切换设置一个条件--类似于:

代码语言:javascript
复制
 if ((toggle = enabled )) (activate tweak) else ( return %orig) 

...or之类的东西。然而,我似乎在任何地方都找不到如何实现这一点或我应该满足的条件的示例。

这是我的代码

代码语言:javascript
复制
#import<UIKit/UIKit.h>
%hook UIApplication -
(BOOL)isStatusBarHidden{return TRUE;}%end
%hook UIStatusBar -
(id)styleForRequestedStyle{return nil;}%end
%hook UIStatusBar -
(id)_forgroundStyleForStatusBarStyle{return nil;}%end
%hook UIStatusBar -
(id)_foregroundAlphaForStatusBarStyle{return nil;}%end
%hook UIStatusBar -
(id)initWithFrame:showForegroundView{return nil;}%end
EN

回答 1

Stack Overflow用户

发布于 2014-04-30 10:16:37

您必须从plist文件中获取这些值。

NSMutableDictionary *settings = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/com.your.package.plist"];

查看我的Github或insanj's中的示例

https://github.com/twodayslate/ https://github.com/insanj/

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23168089

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档