gpt4 book ai didi

ios - 如何为我的移动基板调整制作首选项包?

转载 作者:塔克拉玛干 更新时间:2023-11-02 10:11:38 26 4
gpt4 key购买 nike

我的 iPhone 上安装了 theos, sdk3

我也创建了一个工作调整,但不知道如何创建一个首选项包来添加一些设置。

我想将“是/否”或“ bool ”按钮添加到首选项按钮中,以查看是否要启用该调整

如果启用或不启用,我如何进行调整以读取?例子:

-(void)Something {
if (Enable = YES) {
/*Method here*/ }
else {
//Do nothing
}
}

请帮忙

最佳答案

尝试检查此链接 http://blog.aehmlo.com/2012/08/03/new-tweak-readme/Aehmlo Lxaitn 详细解释了如何进行简单的调整并添加设置以启用/禁用它。

它对我有用。希望这就是您所需要的。

您可能还想从 Cydia 安装“Theos Tutorials”。它的作者是 ReverseEffect。

另一个教程来自 http://shahiddev.blogspot.com/2011/11/mobilesubstrate-tweak-tutorial-with.html

进入“设置”

What about if the user would like to disable our tweak? We can give him theability to enable or disable it from a preference bundle.(We could use just a plist for something simple like this, but we’ll use apreference bundle project in order to try it out).  I’m going to skip a fewsteps with this, since you can figure them out yourself, looking at thesource code you can download below. - Launch the new instance creator, and initiate a “PreferenceBundle” project.  - Add that project as a “subproject” in your main tweak project, by   adding the SUBPROJECTS = tutorialsettings key in the Makefile. - The structure of the preference bundle is given by a plist containing   a collection os PSSpecifiers, used by the standard Preferences app. - Create a switch controlling the “Enabled” key. - For its “defaults” key set it to the package id you used before   (com.filippobiga.tutorial). This means it’ll write to a plist with   that name in the Preferences folder of the user. - Now you need to modify the code in the Tweak.xm to read the user’s   Settings and determine if it should flash the screen or not.That’s it! 

关于ios - 如何为我的移动基板调整制作首选项包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14788543/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com