簡體   English   中英

模擬所有物理按鈕,例如iOS 7上的主頁按鈕上的壓力(越獄)

[英]Simulate all physical buttons like the pressure on the home button on iOS 7 (Jailbreak)

我正在嘗試模擬iOS 7上的“主頁按鈕”,但iOS 6上使用的上一個方法不起作用。 我說的是一個越獄裝置。

#include "GSEvent.h"

    - (void)simulateHomeButton
    {
       struct GSEventRecord record;
       memset(&record, 0, sizeof(record));
       record.type = kGSEventMenuButtonDown;
       record.timestamp = GSCurrentEventTimestamp();
       GSSendSystemEvent(&record);
       record.type = kGSEventMenuButtonUp;
       GSSendSystemEvent(&record);
    }

*更新我真正需要的是一種通用的方法,比如舊方法,讓我模擬所有物理按鈕的壓力

嘗試這個。

[[%c(SBUIController)sharedInstance] clickedMenuButton];

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM