ios - How to add reboot button to Jailbreak Application in Theos -


to make respring button, can write code follows:

- (void)viewwillappear:(bool)animated {     [super viewwillappear:animated];     uibutton *btn = [uibutton buttonwithtype:uibuttontyperoundedrect];     [btn settitle:@"respring" forstate:uicontrolstatenormal];     btn.frame = cgrectmake(100,50,120,100);      [btn addtarget:self action:@selector(buttonpushed:) forcontrolevents:uicontroleventtouchupinside];     [self.view addsubview:btn]; }  - (void)buttonpushed:(id)sender  {     system("killall -9 springboard");     return;  } 

but make reboot button, doesn't seem able .
what code should write?

try doing this:

- (void)buttonpushed:(id)sender  {     [[uiapplication sharedapplication] reboot];     return;  } 

i tried in sample project found here , worked. replaced template's call

[[uiapplication sharedapplication] relaunchspringboard]; 

with

[[uiapplication sharedapplication] reboot]; 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -