Skip to content

Instantly share code, notes, and snippets.

Avatar

Tomasz Szulc tomkowz

View GitHub Profile
@saiday
saiday / UIImage+CornerRadius.m
Created Aug 9, 2016
Effective corner radius
View UIImage+CornerRadius.m
- (UIImage *)cutCircleImage {
UIGraphicsBeginImageContextWithOptions(self.size, NO, 0.0);
CGContextRef ctr = UIGraphicsGetCurrentContext();
CGRect rect = CGRectMake(0, 0, self.size.width, self.size.height);
CGContextAddEllipseInRect(ctr, rect);
CGContextClip(ctr);
[self drawInRect:rect];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
@Ashton-W
Ashton-W / Breakpoints_v2.xcbkptlist
Last active Jul 18, 2021
My User Breakpoints_v2.xcbkptlist
View Breakpoints_v2.xcbkptlist
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "2"
version = "2.0">
<Breakpoints>
<!-- All Exceptions -->
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
<BreakpointContent
@igordeoliveirasa
igordeoliveirasa / gist:78a310f0348fcad9b270
Created Mar 26, 2015
iOS Loading Overlay View - SWIFT
View gist:78a310f0348fcad9b270
//
// LoadingOverlay.swift
// app
//
// Created by Igor de Oliveira Sa on 25/03/15.
// Copyright (c) 2015 Igor de Oliveira Sa. All rights reserved.
//
// Usage:
//
// # Show Overlay
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active Nov 26, 2021
OS X Screencast to animated GIF
View GIF-Screencast-OSX.md

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@djbriane
djbriane / GeneratePhotoThumbnail.m
Created Aug 3, 2009
Method that Creates a Thumbnail from a UIImage
View GeneratePhotoThumbnail.m
+ (UIImage *)generatePhotoThumbnail:(UIImage *)image {
// Create a thumbnail version of the image for the event object.
CGSize size = image.size;
CGSize croppedSize;
CGFloat ratio = 64.0;
CGFloat offsetX = 0.0;
CGFloat offsetY = 0.0;
// check the size of the image, we want to make it
// a square with sides the size of the smallest dimension