2013-02-09 56 views
2

我已經theossdk3安裝在我的iPhone如何爲我的移動襯底調整製作首選項包?

我創建了一個工作調整過,但不知道如何創建一個偏好束添加一些設置。

我想是/否或BOOL按鈕被添加到優選項按鈕,看看是否TWEAK要啓用或不

如何使如果啓用或不讀我的好辦法? 〔實施例:

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

請幫

回答

3

嘗試查看詳細如何做一個簡單的修改並添加一個設置來啓用/禁用此鏈接http://blog.aehmlo.com/2012/08/03/new-tweak-readme/ Aehmlo Lxaitn解釋。

它適用於我。 希望這是你需要的。

您可能還想安裝Cydia的「Theos Tutorials」。它的作者是ReverseEffect。

Anothe教程從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 the 
ability to enable or disable it from a preference bundle. 
(We could use just a plist for something simple like this, but we’ll use a 
preference bundle project in order to try it out). I’m going to skip a few 
steps with this, since you can figure them out yourself, looking at the 
source 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!
+0

謝謝您的回答。我現在會查看它。我有他們的教程設置,但他的教程對偏好套餐的調整不適合我 – junyi00 2013-02-10 09:34:11

+0

爲什麼我無法在iPhone中打開該頁面? – junyi00 2013-02-10 09:47:17

+0

不知道爲什麼。嘗試從電腦。 – AlexanderZ 2013-02-10 11:07:22

相關問題