From 98b90f54e588c2ef8b8bdbbad9fdcef88876938c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=9B=BD=E6=99=94?= Date: Mon, 3 Mar 2014 00:32:26 +0800 Subject: [PATCH] Fix for not showing Usage in iOS 6 --- Tweak.x | 11 +++++++++-- control | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Tweak.x b/Tweak.x index 0d623ea..2c04941 100644 --- a/Tweak.x +++ b/Tweak.x @@ -9,10 +9,17 @@ %hook PSListController - (NSInteger)tableView:(id)view numberOfRowsInSection:(NSInteger)section { - if ([[self specifier].identifier isEqualToString:@"General"] && (section == 0)) - return 1; + if ((section == 0) && [[self specifier].identifier isEqualToString:@"General"]) + return %orig(view, section) - 1; else return %orig(view, section); } +- (id)tableView:(id)view cellForRowAtIndexPath:(NSIndexPath *)indexPath { + if ((indexPath.section == 0) && (indexPath.row > 0) && [[self specifier].identifier isEqualToString:@"General"]) + return %orig(view, [NSIndexPath indexPathForRow:indexPath.row + 1 inSection:indexPath.section]); + else + return %orig(view, indexPath); +} + %end diff --git a/control b/control index 97c10dd..5cfab64 100644 --- a/control +++ b/control @@ -1,7 +1,7 @@ Package: com.ccdog.hidesoftwareupdate Name: HideSoftwareUpdate Depends: firmware (>= 5.0), mobilesubstrate -Version: 1.0 +Version: 1.1 Architecture: iphoneos-arm Description: Hide Software Update in Preferences.app. Author: CC-Dog