Skip to content

Instantly share code, notes, and snippets.

Invisible ball - https://www.reddit.com/r/RocketLeague/comments/5elsf9/idea_make_ball_invisibility_a_mutator/
@tinkertims
tinkertims / hidebar.m
Created June 10, 2016 12:06
Hide status bar programmatically with animation
-(void)hideStatusbar{
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];
[UIView beginAnimations:@"Statusbar hide" context:nil];
[UIView setAnimationDuration:0.5];
[self.view setFrame:CGRectMake(0, 0, 320, 480)];
[UIView commitAnimations];
}
@tinkertims
tinkertims / uiview.m
Created June 10, 2016 07:55
UIAlertView
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@”Title”
message:@”The body!”
delegate:nil
cancelButtonTitle:@”no!”
otherButtonTitles:nil];
[alert show];
[alert release];
@tinkertims
tinkertims / text2buttonAlert.m
Created June 10, 2016 07:34
Alert using UIAlertController (TextField and Two buttons)
// Show a text entry alert with two custom buttons.
- (void)showTextEntryAlert {
NSString *title = NSLocalizedString(@"Short_title", nil);
NSString *message = NSLocalizedString(@"Message", nil);
NSString *cancelButtonTitle = NSLocalizedString(@"Cancel", nil);
NSString *otherButtonTitle = NSLocalizedString(@"OK", nil);
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
@tinkertims
tinkertims / install_byobu_on_centos7.sh
Last active February 26, 2024 05:44
Install byobu to CentOS 7
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
rpm -ivh epel-release-7-5.noarch.rpm
sudo yum install byobu -y --enablerepo=epel-testing