Initial Release 1.0
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								Prefs/.DS_Store
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Prefs/.DS_Store
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										17
									
								
								Prefs/Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								Prefs/Makefile
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,17 @@
 | 
			
		||||
ARCHS = arm64 arm64e
 | 
			
		||||
TARGET = iphone:clang:11.2:11.2
 | 
			
		||||
 | 
			
		||||
include $(THEOS)/makefiles/common.mk
 | 
			
		||||
 | 
			
		||||
BUNDLE_NAME = TickPrefs
 | 
			
		||||
$(BUNDLE_NAME)_FILES = $(wildcard *.m)
 | 
			
		||||
$(BUNDLE_NAME)_INSTALL_PATH = /Library/PreferenceBundles
 | 
			
		||||
$(BUNDLE_NAME)_FRAMEWORKS = UIKit
 | 
			
		||||
$(BUNDLE_NAME)_PRIVATE_FRAMEWORKS = Preferences
 | 
			
		||||
$(BUNDLE_NAME)_EXTRA_FRAMEWORKS = Cephei CepheiPrefs
 | 
			
		||||
 | 
			
		||||
include $(THEOS_MAKE_PATH)/bundle.mk
 | 
			
		||||
 | 
			
		||||
internal-stage::
 | 
			
		||||
	$(ECHO_NOTHING)mkdir -p $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences$(ECHO_END)
 | 
			
		||||
	$(ECHO_NOTHING)cp entry.plist $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences/TickPreferences.plist$(ECHO_END)
 | 
			
		||||
							
								
								
									
										35
									
								
								Prefs/NSTask.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								Prefs/NSTask.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,35 @@
 | 
			
		||||
@interface NSTask : NSObject
 | 
			
		||||
 | 
			
		||||
@property (copy) NSArray *arguments;
 | 
			
		||||
@property (copy) NSString *currentDirectoryPath;
 | 
			
		||||
@property (copy) NSDictionary *environment;
 | 
			
		||||
@property (copy) NSString *launchPath;
 | 
			
		||||
@property (readonly) int processIdentifier;
 | 
			
		||||
@property long long qualityOfService;
 | 
			
		||||
@property (getter=isRunning, readonly) bool running;
 | 
			
		||||
@property (retain) id standardError;
 | 
			
		||||
@property (retain) id standardInput;
 | 
			
		||||
@property (retain) id standardOutput;
 | 
			
		||||
@property (copy) id /* block */ terminationHandler;
 | 
			
		||||
@property (readonly) long long terminationReason;
 | 
			
		||||
@property (readonly) int terminationStatus;
 | 
			
		||||
 | 
			
		||||
+ (id)currentTaskDictionary;
 | 
			
		||||
+ (id)launchedTaskWithDictionary:(id)arg1;
 | 
			
		||||
+ (id)launchedTaskWithLaunchPath:(id)arg1 arguments:(id)arg2;
 | 
			
		||||
 | 
			
		||||
- (id)init;
 | 
			
		||||
- (void)interrupt;
 | 
			
		||||
- (bool)isRunning;
 | 
			
		||||
- (void)launch;
 | 
			
		||||
- (int)processIdentifier;
 | 
			
		||||
- (long long)qualityOfService;
 | 
			
		||||
- (bool)resume;
 | 
			
		||||
- (bool)suspend;
 | 
			
		||||
- (long long)suspendCount;
 | 
			
		||||
- (void)terminate;
 | 
			
		||||
- (id /* block */)terminationHandler;
 | 
			
		||||
- (long long)terminationReason;
 | 
			
		||||
- (int)terminationStatus;
 | 
			
		||||
 | 
			
		||||
@end
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								Prefs/Resources/.DS_Store
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Prefs/Resources/.DS_Store
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Prefs/Resources/Banner.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Prefs/Resources/Banner.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 34 KiB  | 
							
								
								
									
										24
									
								
								Prefs/Resources/Info.plist
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								Prefs/Resources/Info.plist
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,24 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 | 
			
		||||
<plist version="1.0">
 | 
			
		||||
<dict>
 | 
			
		||||
	<key>CFBundleDevelopmentRegion</key>
 | 
			
		||||
	<string>English</string>
 | 
			
		||||
	<key>CFBundleExecutable</key>
 | 
			
		||||
	<string>TickPrefs</string>
 | 
			
		||||
	<key>CFBundleIdentifier</key>
 | 
			
		||||
	<string>me.shymemoriees.tickpreferences</string>
 | 
			
		||||
	<key>CFBundleInfoDictionaryVersion</key>
 | 
			
		||||
	<string>6.0</string>
 | 
			
		||||
	<key>CFBundlePackageType</key>
 | 
			
		||||
	<string>BNDL</string>
 | 
			
		||||
	<key>CFBundleShortVersionString</key>
 | 
			
		||||
	<string>1.0.0</string>
 | 
			
		||||
	<key>CFBundleSignature</key>
 | 
			
		||||
	<string>????</string>
 | 
			
		||||
	<key>CFBundleVersion</key>
 | 
			
		||||
	<string>1.0</string>
 | 
			
		||||
	<key>NSPrincipalClass</key>
 | 
			
		||||
	<string>TCKRootListController</string>
 | 
			
		||||
</dict>
 | 
			
		||||
</plist>
 | 
			
		||||
							
								
								
									
										118
									
								
								Prefs/Resources/Root.plist
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										118
									
								
								Prefs/Resources/Root.plist
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,118 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 | 
			
		||||
<plist version="1.0">
 | 
			
		||||
<dict>
 | 
			
		||||
	<key>items</key>
 | 
			
		||||
	<array>
 | 
			
		||||
 | 
			
		||||
		<dict>
 | 
			
		||||
            <key>action</key>
 | 
			
		||||
            <string>twitterShy</string>
 | 
			
		||||
            <key>cell</key>
 | 
			
		||||
            <string>PSButtonCell</string>
 | 
			
		||||
            <key>label</key>
 | 
			
		||||
            <string>@ShyMemoriees</string>
 | 
			
		||||
            <key>cellClass</key>
 | 
			
		||||
            <string>HBTwitterCell</string>
 | 
			
		||||
            <key>label</key>
 | 
			
		||||
            <string>ShyMemoriees</string>
 | 
			
		||||
            <key>user</key>
 | 
			
		||||
            <string>ShyMemoriees</string>
 | 
			
		||||
        </dict>
 | 
			
		||||
		<dict>
 | 
			
		||||
			<key>cell</key>
 | 
			
		||||
			<string>PSSwitchCell</string>
 | 
			
		||||
			<key>default</key>
 | 
			
		||||
			<true/>
 | 
			
		||||
			<key>defaults</key>
 | 
			
		||||
			<string>me.shymemoriees.tickpreferences</string>
 | 
			
		||||
			<key>key</key>
 | 
			
		||||
			<string>Enabled</string>
 | 
			
		||||
			<key>label</key>
 | 
			
		||||
			<string>Enabled (Respring required)</string>
 | 
			
		||||
			<key>PostNotification</key>
 | 
			
		||||
			<string>me.shymemoriees.tickpreferences/ReloadPrefs</string>
 | 
			
		||||
		</dict>
 | 
			
		||||
 | 
			
		||||
						<!-- Loudness Controller -->
 | 
			
		||||
		<dict>
 | 
			
		||||
			<key>cell</key>
 | 
			
		||||
			<string>PSGroupCell</string>
 | 
			
		||||
			<key>label</key>
 | 
			
		||||
			<string>Loudness Of The Sound</string>
 | 
			
		||||
		</dict>
 | 
			
		||||
		<dict>
 | 
			
		||||
			<key>cell</key>
 | 
			
		||||
			<string>PSSegmentCell</string>
 | 
			
		||||
			<key>default</key>
 | 
			
		||||
			<integer>0</integer>
 | 
			
		||||
			<key>defaults</key>
 | 
			
		||||
			<string>me.shymemoriees.tickpreferences</string>
 | 
			
		||||
			<key>key</key>
 | 
			
		||||
			<string>Loudness</string>
 | 
			
		||||
			<key>validValues</key>
 | 
			
		||||
			<array>
 | 
			
		||||
				<integer>0</integer>
 | 
			
		||||
				<integer>1</integer>
 | 
			
		||||
				<integer>2</integer>
 | 
			
		||||
			</array>
 | 
			
		||||
			<key>validTitles</key>
 | 
			
		||||
			<array>
 | 
			
		||||
				<string>Original</string>
 | 
			
		||||
				<string>Normal</string>
 | 
			
		||||
				<string>Loud</string>
 | 
			
		||||
			</array>
 | 
			
		||||
			<key>alignment</key>
 | 
			
		||||
			<string>3</string>
 | 
			
		||||
			<key>PostNotification</key>
 | 
			
		||||
			<string>me.shymemoriees.tickpreferences/ReloadPrefs</string>
 | 
			
		||||
		</dict>
 | 
			
		||||
 | 
			
		||||
		<!-- Support Me -->
 | 
			
		||||
		<dict>
 | 
			
		||||
			<key>cell</key>
 | 
			
		||||
			<string>PSGroupCell</string>
 | 
			
		||||
			<key>label</key>
 | 
			
		||||
			<string>Support Me</string>
 | 
			
		||||
		</dict>
 | 
			
		||||
		<dict>
 | 
			
		||||
			<key>cellClass</key>
 | 
			
		||||
			<string>HBLinkTableCell</string>
 | 
			
		||||
			<key>label</key>
 | 
			
		||||
			<string>Little Donation 🌺</string>
 | 
			
		||||
			<key>subtitle</key>
 | 
			
		||||
			<string>Helps Me To Pay For My Server</string>
 | 
			
		||||
			<key>url</key>
 | 
			
		||||
			<string>https://paypal.me/ShyMemoriees</string>
 | 
			
		||||
		</dict>
 | 
			
		||||
		<dict>
 | 
			
		||||
			<key>cellClass</key>
 | 
			
		||||
			<string>HBLinkTableCell</string>
 | 
			
		||||
			<key>label</key>
 | 
			
		||||
			<string>Source Code 🌙</string>
 | 
			
		||||
			<key>subtitle</key>
 | 
			
		||||
			<string>Github</string>
 | 
			
		||||
			<key>url</key>
 | 
			
		||||
			<string>https://github.com/ShyMemoriees/Tick</string>
 | 
			
		||||
		</dict>
 | 
			
		||||
		<dict>
 | 
			
		||||
			<key>cellClass</key>
 | 
			
		||||
			<string>HBLinkTableCell</string>
 | 
			
		||||
			<key>label</key>
 | 
			
		||||
			<string>Found A Bug? 🌧</string>
 | 
			
		||||
			<key>subtitle</key>
 | 
			
		||||
			<string>Leave A Bug Report Here</string>
 | 
			
		||||
			<key>url</key>
 | 
			
		||||
			<string>https://github.com/ShyMemoriees/Tick/issues/new</string>
 | 
			
		||||
		</dict>
 | 
			
		||||
		<dict>
 | 
			
		||||
			<key>cell</key>
 | 
			
		||||
			<string>PSGroupCell</string>
 | 
			
		||||
			<key>label</key>
 | 
			
		||||
			<string>Tick By ShyMemoriees, Made With ❤️</string>
 | 
			
		||||
		</dict>
 | 
			
		||||
	</array>
 | 
			
		||||
	<key>title</key>
 | 
			
		||||
	<string>Tick</string>
 | 
			
		||||
</dict>
 | 
			
		||||
</plist>
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								Prefs/Resources/icon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Prefs/Resources/icon.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 1.2 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Prefs/Resources/icon@2x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Prefs/Resources/icon@2x.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 2.7 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Prefs/Resources/tick.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Prefs/Resources/tick.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 53 KiB  | 
							
								
								
									
										33
									
								
								Prefs/TCKAppearanceSettings.m
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								Prefs/TCKAppearanceSettings.m
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,33 @@
 | 
			
		||||
#import "TCKRootListController.h"
 | 
			
		||||
 | 
			
		||||
@implementation TCKAppearanceSettings
 | 
			
		||||
 | 
			
		||||
-(UIColor *)tintColor {
 | 
			
		||||
    return [UIColor colorWithRed:0.17 green:0.09 blue:0.19 alpha:1.0];;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
-(UIColor *)statusBarTintColor {
 | 
			
		||||
    return [UIColor whiteColor];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
-(UIColor *)navigationBarTitleColor {
 | 
			
		||||
    return [UIColor whiteColor];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
-(UIColor *)navigationBarTintColor {
 | 
			
		||||
    return [UIColor whiteColor];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
-(UIColor *)tableViewCellSeparatorColor {
 | 
			
		||||
    return [UIColor colorWithWhite:0 alpha:0];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
-(UIColor *)navigationBarBackgroundColor {
 | 
			
		||||
    return [UIColor colorWithRed:0.17 green:0.09 blue:0.19 alpha:1.0];;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
-(BOOL)translucentNavigationBar {
 | 
			
		||||
    return NO;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@end
 | 
			
		||||
							
								
								
									
										23
									
								
								Prefs/TCKRootListController.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								Prefs/TCKRootListController.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,23 @@
 | 
			
		||||
#import <Preferences/PSListController.h>
 | 
			
		||||
#import <Preferences/PSSpecifier.h>
 | 
			
		||||
#import <CepheiPrefs/HBRootListController.h>
 | 
			
		||||
#import <CepheiPrefs/HBAppearanceSettings.h>
 | 
			
		||||
#import <Cephei/HBPreferences.h>
 | 
			
		||||
#import "NSTask.h"
 | 
			
		||||
 | 
			
		||||
@interface TCKAppearanceSettings : HBAppearanceSettings
 | 
			
		||||
@end
 | 
			
		||||
 | 
			
		||||
@interface TCKRootListController : HBRootListController {
 | 
			
		||||
    UITableView * _table;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@property (nonatomic, retain) UIBarButtonItem *respringButton;
 | 
			
		||||
@property (nonatomic, retain) UIView *headerView;
 | 
			
		||||
@property (nonatomic, retain) UIImageView *headerImageView;
 | 
			
		||||
@property (nonatomic, retain) UILabel *titleLabel;
 | 
			
		||||
@property (nonatomic, retain) UIImageView *iconView;
 | 
			
		||||
 | 
			
		||||
-(void)respring;
 | 
			
		||||
-(void)respringUtil;
 | 
			
		||||
@end
 | 
			
		||||
							
								
								
									
										152
									
								
								Prefs/TCKRootListController.m
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										152
									
								
								Prefs/TCKRootListController.m
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,152 @@
 | 
			
		||||
#include "TCKRootListController.h"
 | 
			
		||||
 | 
			
		||||
@implementation TCKRootListController
 | 
			
		||||
 | 
			
		||||
- (instancetype)init {
 | 
			
		||||
    self = [super init];
 | 
			
		||||
 | 
			
		||||
    if (self) {
 | 
			
		||||
        TCKAppearanceSettings *appearanceSettings = [[TCKAppearanceSettings alloc] init];
 | 
			
		||||
        self.hb_appearanceSettings = appearanceSettings;
 | 
			
		||||
        self.respringButton = [[UIBarButtonItem alloc] initWithTitle:@"ReSpring" 
 | 
			
		||||
                                    style:UIBarButtonItemStylePlain
 | 
			
		||||
                                    target:self 
 | 
			
		||||
                                    action:@selector(respring)];
 | 
			
		||||
        self.respringButton.tintColor = [UIColor whiteColor];
 | 
			
		||||
        self.navigationItem.rightBarButtonItem = self.respringButton;
 | 
			
		||||
 | 
			
		||||
        self.navigationItem.titleView = [UIView new];
 | 
			
		||||
        self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0,0,10,10)];
 | 
			
		||||
        self.titleLabel.font = [UIFont boldSystemFontOfSize:17];
 | 
			
		||||
        self.titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
 | 
			
		||||
        self.titleLabel.text = @"Tick";
 | 
			
		||||
        self.titleLabel.textColor = [UIColor whiteColor];
 | 
			
		||||
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
 | 
			
		||||
        [self.navigationItem.titleView addSubview:self.titleLabel];
 | 
			
		||||
 | 
			
		||||
        self.iconView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,10,10)];
 | 
			
		||||
        self.iconView.contentMode = UIViewContentModeScaleAspectFit;
 | 
			
		||||
        self.iconView.image = [UIImage imageWithContentsOfFile:@"/Library/PreferenceBundles/TickPrefs.bundle/icon@2x.png"];
 | 
			
		||||
        self.iconView.translatesAutoresizingMaskIntoConstraints = NO;
 | 
			
		||||
        self.iconView.alpha = 0.0;
 | 
			
		||||
        [self.navigationItem.titleView addSubview:self.iconView];
 | 
			
		||||
        
 | 
			
		||||
        [NSLayoutConstraint activateConstraints:@[
 | 
			
		||||
            [self.titleLabel.topAnchor constraintEqualToAnchor:self.navigationItem.titleView.topAnchor],
 | 
			
		||||
            [self.titleLabel.leadingAnchor constraintEqualToAnchor:self.navigationItem.titleView.leadingAnchor],
 | 
			
		||||
            [self.titleLabel.trailingAnchor constraintEqualToAnchor:self.navigationItem.titleView.trailingAnchor],
 | 
			
		||||
            [self.titleLabel.bottomAnchor constraintEqualToAnchor:self.navigationItem.titleView.bottomAnchor],
 | 
			
		||||
            [self.iconView.topAnchor constraintEqualToAnchor:self.navigationItem.titleView.topAnchor],
 | 
			
		||||
            [self.iconView.leadingAnchor constraintEqualToAnchor:self.navigationItem.titleView.leadingAnchor],
 | 
			
		||||
            [self.iconView.trailingAnchor constraintEqualToAnchor:self.navigationItem.titleView.trailingAnchor],
 | 
			
		||||
            [self.iconView.bottomAnchor constraintEqualToAnchor:self.navigationItem.titleView.bottomAnchor],
 | 
			
		||||
        ]];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return self;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
-(NSArray *)specifiers {
 | 
			
		||||
	if (_specifiers == nil) {
 | 
			
		||||
		_specifiers = [[self loadSpecifiersFromPlistName:@"Root" target:self] retain];
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return _specifiers;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
- (void)viewDidLoad {
 | 
			
		||||
    [super viewDidLoad];
 | 
			
		||||
 | 
			
		||||
    self.headerView = [[UIView alloc] initWithFrame:CGRectMake(0,0,200,200)];
 | 
			
		||||
    self.headerImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,200,200)];
 | 
			
		||||
    self.headerImageView.contentMode = UIViewContentModeScaleAspectFill;
 | 
			
		||||
    self.headerImageView.image = [UIImage imageWithContentsOfFile:@"/Library/PreferenceBundles/TickPrefs.bundle/Banner.png"];
 | 
			
		||||
    self.headerImageView.translatesAutoresizingMaskIntoConstraints = NO;
 | 
			
		||||
 | 
			
		||||
    [self.headerView addSubview:self.headerImageView];
 | 
			
		||||
    [NSLayoutConstraint activateConstraints:@[
 | 
			
		||||
        [self.headerImageView.topAnchor constraintEqualToAnchor:self.headerView.topAnchor],
 | 
			
		||||
        [self.headerImageView.leadingAnchor constraintEqualToAnchor:self.headerView.leadingAnchor],
 | 
			
		||||
        [self.headerImageView.trailingAnchor constraintEqualToAnchor:self.headerView.trailingAnchor],
 | 
			
		||||
        [self.headerImageView.bottomAnchor constraintEqualToAnchor:self.headerView.bottomAnchor],
 | 
			
		||||
    ]];
 | 
			
		||||
 | 
			
		||||
    _table.tableHeaderView = self.headerView;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
 | 
			
		||||
    tableView.tableHeaderView = self.headerView;
 | 
			
		||||
    return [super tableView:tableView cellForRowAtIndexPath:indexPath];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
- (void)viewWillAppear:(BOOL)animated {
 | 
			
		||||
    [super viewWillAppear:animated];
 | 
			
		||||
 | 
			
		||||
    CGRect frame = self.table.bounds;
 | 
			
		||||
    frame.origin.y = -frame.size.height;
 | 
			
		||||
 | 
			
		||||
    self.navigationController.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0.17 green:0.09 blue:0.19 alpha:1.0];
 | 
			
		||||
    [self.navigationController.navigationController.navigationBar setShadowImage: [UIImage new]];
 | 
			
		||||
    self.navigationController.navigationController.navigationBar.tintColor = [UIColor whiteColor];
 | 
			
		||||
    self.navigationController.navigationController.navigationBar.translucent = NO;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
- (void)viewDidAppear:(BOOL)animated {
 | 
			
		||||
    [super viewDidAppear:animated];
 | 
			
		||||
 | 
			
		||||
    [self.navigationController.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]}];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
- (void)viewWillDisappear:(BOOL)animated {
 | 
			
		||||
    [super viewWillDisappear:animated];
 | 
			
		||||
 | 
			
		||||
    [self.navigationController.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor blackColor]}];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
 | 
			
		||||
    CGFloat offsetY = scrollView.contentOffset.y;
 | 
			
		||||
 | 
			
		||||
    if (offsetY > 200) {
 | 
			
		||||
        [UIView animateWithDuration:0.2 animations:^{
 | 
			
		||||
            self.iconView.alpha = 1.0;
 | 
			
		||||
            self.titleLabel.alpha = 0.0;
 | 
			
		||||
        }];
 | 
			
		||||
    } else {
 | 
			
		||||
        [UIView animateWithDuration:0.2 animations:^{
 | 
			
		||||
            self.iconView.alpha = 0.0;
 | 
			
		||||
            self.titleLabel.alpha = 1.0;
 | 
			
		||||
        }];
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    if (offsetY > 0) offsetY = 0;
 | 
			
		||||
    self.headerImageView.frame = CGRectMake(0, offsetY, self.headerView.frame.size.width, 200 - offsetY);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
-(void)respring {
 | 
			
		||||
	UIAlertController *respring = [UIAlertController alertControllerWithTitle:@"Tick"
 | 
			
		||||
													 message:@"Do you really want to ReSpring?"
 | 
			
		||||
													 preferredStyle:UIAlertControllerStyleAlert];
 | 
			
		||||
	UIAlertAction *confirmAction = [UIAlertAction actionWithTitle:@"Confirm" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * action) {
 | 
			
		||||
			[self respringUtil];
 | 
			
		||||
	}];
 | 
			
		||||
 | 
			
		||||
	UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil];
 | 
			
		||||
	[respring addAction:confirmAction];
 | 
			
		||||
	[respring addAction:cancelAction];
 | 
			
		||||
	[self presentViewController:respring animated:YES completion:nil];
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
-(void)respringUtil {
 | 
			
		||||
	NSTask *t = [[NSTask alloc] init];
 | 
			
		||||
    [t setLaunchPath:@"/usr/bin/killall"];
 | 
			
		||||
    [t setArguments:[NSArray arrayWithObjects:@"backboardd", nil]];
 | 
			
		||||
    [t launch];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
-(IBAction)twitterEsquilli {
 | 
			
		||||
    NSURL *URL = [NSURL URLWithString: @"https://github.com/ShyMemoriees"];
 | 
			
		||||
    [[UIApplication sharedApplication] openURL:URL options:@{} completionHandler:nil];
 | 
			
		||||
}
 | 
			
		||||
@end
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										21
									
								
								Prefs/entry.plist
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								Prefs/entry.plist
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,21 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 | 
			
		||||
<plist version="1.0">
 | 
			
		||||
<dict>
 | 
			
		||||
	<key>entry</key>
 | 
			
		||||
	<dict>
 | 
			
		||||
		<key>bundle</key>
 | 
			
		||||
		<string>TickPrefs</string>
 | 
			
		||||
		<key>cell</key>
 | 
			
		||||
		<string>PSLinkCell</string>
 | 
			
		||||
		<key>detail</key>
 | 
			
		||||
		<string>TCKRootListController</string>
 | 
			
		||||
		<key>icon</key>
 | 
			
		||||
		<string>icon.png</string>
 | 
			
		||||
		<key>isController</key>
 | 
			
		||||
		<true/>
 | 
			
		||||
		<key>label</key>
 | 
			
		||||
		<string>Tick</string>
 | 
			
		||||
	</dict>
 | 
			
		||||
</dict>
 | 
			
		||||
</plist>
 | 
			
		||||
		Reference in New Issue
	
	Block a user