Skip to content

Instantly share code, notes, and snippets.

View S1ReX's full-sized avatar

Bradley Friedman S1ReX

View GitHub Profile
- (void)showTweetSheet
{
// Create an instance of the Tweet Sheet
SLComposeViewController *tweetSheet = [SLComposeViewController
composeViewControllerForServiceType:
SLServiceTypeTwitter];
// Sets the completion handler. Note that we don't know which thread the
// block will be called on, so we need to ensure that any UI updates occur
// on the main queue
int userInput;
scanf("%i", userInput);
NSLog(@"%i", userInput * 2);
@S1ReX
S1ReX / Tweak.xm
Created December 5, 2012 12:48
Code for No Carrier Name
/************************************************
No Carrier Name by Bradley Friedman (Sirex_iOS)
Release - 2012
Uploaded to sirex.net16.net
************************************************/
%hook SBTelephonyManager
-(id)operatorName {
@S1ReX
S1ReX / Tweak.xm
Created December 5, 2012 12:46
Code for No Carrier Name
/************************************************
No Operator Name by Bradley Friedman (Sirex_iOS)
Release - 2012
Uploaded to sirex.net16.net
************************************************/
%hook SBTelephonyManager
-(id)operatorName {
UIView *tableView = MSHookIvar<UIView *>(self, "_tableView");
tableView.frame = CGRectMake(0, 0, 320, 0);
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
[tableView setFrame: CGRectMake(0, 0, 320, 480)];
[UIView commitAnimations];
- (void)mediaKeyUp:(struct __GSEvent *)fp8 {
if (brightnessMode) {
[[%c(SBBrightnessController) sharedBrightnessController] adjustBacklightLevel:YES];
}
else {
static UIView *_contentView;
%hook SBAppSwitcherBarView
-(id)initWithFrame {
CGRect viewRect = CGRectMake(0, 0, 100, 100);
UIView *myView = [[UIView alloc] initWithFrame:viewRect];
{_contentView addSubView:myView];
}
@interface SBBulletinBannerItem : NSObject
@end
%hook SBBannerView
-(id)initWithItem:(SBBulletinBannerItem *)item {
UIColor *myColor = [UIColor blueColor];
UIImageView *bannerView = MSHookIvar<UIImageView *>(self, "_bannerView");
bannerView.backgroundColor = underlayView.backgroundColor = myColor;
%hook SBTelephonyManager
-(NSString *)operatorName {
NSString *dateString = @"DateGoesHere";
return dateString;
}
%hook SBTelephonyManager
-(NSString *)operatorName {
NSDate* date = [NSDate date];
return date;
}