Coder Social home page Coder Social logo

libtylerd3v's Introduction

libtylerd3v

Library with several classes used in my tweaks.

Initial Setup

If you wish to use this library in your tweak preferences, here's how to set it up:

  • Install libtylerd3v on your device from the Packix Repo
  • Copy the .dylib from your device to your $THEOS/lib folder (I use the scp command to do this)
  • Download the .h files from the include folder and place them in your $THEOS/include folder
  • In the Makefile for your preferences, add the line $(BUNDLE_NAME)_LIBRARIES = tylerd3v
  • Add Depends: xyz.tylerd3v.libtylerd3v to your tweaks control file

TDListController

TDListController is just a regular PSListController, with the ability to easily add an apply button to the navigation bar.

XXXRootListController.h:

#import <TDListController.h>

@interface XXXRootListController : TDListController
@end

XXXRootListController.m

#import "XXXRootListController.h"

@implementation XXXRootListController
- (NSMutableArray *)specifiers {
	return [super specifiers];
}
- (NSString *)plistName {
	return @"Root";
}
- (void)loadView {
	[super loadView];
	_hideApplyButton = NO; // Change to YES to hide Apply button.
}
@end

TDListController also includes the ability to show/hide cells using a PSSwitchCell. Here's an example:

<dict>
	<key>cell</key>
	<string>PSSwitchCell</string>
	<key>default</key>
	<true/>
	<key>defaults</key>
	<string>com.yourtweakprefs.bundleid</string>
	<key>key</key>
	<string>kEnabled</string>
	<key>label</key>
	<string>Enabled</string>
	<key>nestedEntryCount</key> <!-- The identifier for showing/hiding cells. -->
	<integer>1</integer> <!-- Number of Cells to show/hide. Including any PSGroupCells. -->
</dict>

TDImagePicker

TDImagePicker is a modified version of libimagepicker by Muirey03, which implements some design changes by iKilledAppl3. Thanks to iKilledAppl3 for allowing me to implement part of his image picker in my own variation.

Add the line #import <TDImagePicker.h> to your XXXRootListController.h.

In your .plist file:

<dict>
	<key>big</key>
	<true/>
	<key>cell</key>
	<string>PSLinkCell</string>
	<key>cellClass</key>
	<string>TDImagePickerCell</string>
	<key>label</key>
	<string>Choose Image</string>
	<key>action</key>
	<string>chooseImage</string>
	<key>defaults</key>
	<string>com.yourtweakprefs.bundleid</string>
	<key>key</key>
	<string>kCustomImage</string>
	<key>usesJPEG</key>
	<true/>
	<key>usesGIF</key>
	<true/>
	<key>compressionQuality</key>
	<real>1.0</real>
</dict>

TDDiscordCell

TDDiscordCell is a link cell that is made to easily invite users to a Discord server!

Add the line #import <TDDiscordCell.h> to your XXXRootListController.h.

In your .plist file:

<dict>
	<key>cellClass</key>
	<string>TDDiscordCell</string>
	<key>icon</key>
	<string>discord.png</string> <!-- Desired Icon -->
	<key>label</key>
	<string>Discord Server</string>
	<key>subtitle</key>
	<string>Join the Discord!</string>
	<key>link</key>
	<string>s6p62JQ</string> <!-- Discord Invite -->
</dict>

TDTwitterCell

TDTwitterCell is a link cell that is made to easily redirect users to a Twitter profile!

Add the line #import <TDTwitterCell.h> to your XXXRootListController.h.

In your .plist file:

<dict>
	<key>cellClass</key>
	<string>TDTwitterCell</string>
	<key>icon</key>
	<string>twitter.png</string> <!-- Desired Icon -->
	<key>label</key>
	<string>TylerD3V</string>
	<key>subtitle</key>
	<string>Follow Me on Twitter!</string>
	<key>link</key>
	<string>TylerD3V</string> <!-- Twitter Username -->
</dict>

libtylerd3v's People

Stargazers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.