Skip to content

Instantly share code, notes, and snippets.


  • Google
  • New York
Block or report user

Report or block jmig

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Apple TV Tech Talks

tvOS Fundamentals

  • Living Room experience
  • Always connected
  • Powerful hardware
  • Separate SDK with optional Universal Purchase
  • Developer tools and tech

Designing for tvOS

mackuba /
Last active Sep 17, 2019
New stuff from WWDC 2015

Here's my own list of the interesting stuff announced during this year's WWDC, collected from the keynotes, various Apple docs, blog posts and tweets.

If you're planning to watch the videos, I really recommend this Mac app that helps you download and watch them:

OS X El Capitan

  • split view - two apps side by side on full screen
steipete / gist:d76549ec262430354e7c
Last active Dec 3, 2018
Our set of warnings in PSPDFKit
View gist:d76549ec262430354e7c
// Warnings.xcconfig
// The list of warnings we (don’t) use, and the reasons why.
// :MARK: Warnings in use:
// :MARK: -everything
// We want the best possible diagnostics, so we simply enable everything that exists, and then opt–out of what doesn’t make sense for us.
// :MARK: - Warnings not to be promoted:
staltz /
Last active Nov 12, 2019
The introduction to Reactive Programming you've been missing
steipete / UITableViewMore.m
Last active Jan 29, 2018
Using the "More" button. Of course the simple way that Apple uses in Mail/iOS is not public. rdar://16600859
View UITableViewMore.m
- (NSString *)tableView:(UITableView *)tableView titleForSwipeAccessoryButtonForRowAtIndexPath:(NSIndexPath *)indexPath {
return @"More";
- (void)tableView:(UITableView *)tableView swipeAccessoryButtonPushedForRowAtIndexPath:(NSIndexPath *)indexPath {
NSLog(@"I wanted to be a pretty public API, but then time ran out and they forgot me...");
// Hide the More/Delete menu.
[self setEditing:NO animated:YES];
mattt / UTTypeForImageData.m
Created Mar 27, 2014
A quick function for determining an image's file type by its first couple of bytes
View UTTypeForImageData.m
@import MobileCoreServices;
static CFStringRef UTTypeForImageData(NSData *data) {
const unsigned char * bytes = [data bytes];
if (data.length >= 8) {
if (bytes[0] == 0x89 && bytes[1] == 0x50 && bytes[2] == 0x4E && bytes[3] == 0x47 && bytes[4] == 0x0D && bytes[5] == 0x0A && bytes[6] == 0x1A && bytes[7] == 0x0A) {
return kUTTypePNG;
steipete / UIKitLegacyDetector.m
Last active Oct 21, 2019
A simple way to detect at runtime if we're running in UIKit legacy mode or the new "flat" variant. Written for our PDF iOS SDK (, where the precompiled binary needs to detect at runtime in what variant it's running. Want more stuff like that? Follow me on Twitter:
View UIKitLegacyDetector.m
// Taken from This snippet is under public domain.
#define UIKitVersionNumber_iOS_7_0 0xB57
BOOL PSPDFIsUIKitFlatMode(void) {
static BOOL isUIKitFlatMode = NO;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
// We get the modern UIKit if system is running >= iOS 7 and we were linked with >= SDK 7.
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_7_0) {
isUIKitFlatMode = (NSVersionOfLinkTimeLibrary("UIKit") >> 16) >= UIKitVersionNumber_iOS_7_0;
View gist:6526790
extern uint32_t dyld_get_program_sdk_version() WEAK_IMPORT_ATTRIBUTE;
extern BOOL DZApplicationUsesLegacyUI(void)
static dispatch_once_t onceToken;
static BOOL legacyUI = NO;
dispatch_once(&onceToken, ^{
if (dyld_get_program_sdk_version != NULL) {
sdk = dyld_get_program_sdk_version();
johanneswuerbach / .travis.yml
Last active Nov 9, 2019
Deploy an iOS app to testflight using Travis CI
View .travis.yml
language: objective-c
- ./scripts/travis/
- ./scripts/travis/
- ./scripts/travis/
View gist:2871154
This was nice and fast... but it takes up WAY TOO MUCH space. And it's annoying to write.
(I like the way I can just step into the function that calls the delegate for debugging)
What's a better way to not make me call respondsToSelector in the middle of my code? Some proxy?
struct {
unsigned int delegateWillDisplayDocument:1;
unsigned int delegateDidDisplayDocument:1;
unsigned int delegateDidShowPageView:1;
unsigned int delegateDidRenderPageView:1;
You can’t perform that action at this time.