Skip to content

Instantly share code, notes, and snippets.

View aquarius's full-sized avatar

Markus Müller-Simhofer aquarius

View GitHub Profile
@aquarius
aquarius / UIViewController+Convenience.m
Created August 22, 2011 11:02
Hide and present new modal view animated
@implementation UIViewController (Convenience)
- (void)mn_hideCurrentModalControllerAndPresentController:(UIViewController *)controller
{
if (self.modalViewController) {
[self dismissModalViewControllerAnimated:YES];
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 0.5 * NSEC_PER_SEC);
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
[self presentModalViewController:controller animated:YES];
});
@aquarius
aquarius / gist:1295218
Created October 18, 2011 11:32
Workaround to get a continuous build number in git
v=`git log --pretty=format:'' | wc -l`
defaults write "${TARGET_BUILD_DIR}"/"${CONTENTS_FOLDER_PATH}"/Info CFBundleVersion $v
@aquarius
aquarius / gist:1297890
Created October 19, 2011 10:08
Prevent Quincy from reporting older crash logs on first launch
if (![[NSUserDefaults standardUserDefaults] valueForKey: @"CrashReportSender.lastCrashDate"]) {
[[NSUserDefaults standardUserDefaults] setValue: [NSDate date]
forKey: @"CrashReportSender.lastCrashDate"];
}
@aquarius
aquarius / gist:1313112
Created October 25, 2011 15:22
MindNode touch Crash Report
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0x60000008
Crashed Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x00003fbc objc_msgSend + 16
1 UIKit 0x0001e0bf -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 215
2 UIKit 0x0001881b -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 471
3 UIKit 0x0001dfb9 -[UIViewAnimationState animationDidStop:finished:] + 53
4 QuartzCore 0x0002bba7 CA::Layer::run_animation_callbacks(void*) + 203
@aquarius
aquarius / gist:1313895
Created October 25, 2011 19:14
MindNode touch 2.0.1 Change Log
- Fixes a launch issue related to loading cross connections.
- Fixes a launch issue related to error handling when failing to load a document.
- Fixes a crash when trying to export a document with only one main node to FreeMind.
- Fixes a crash when downloading or uploading a file to dropbox fails.
- Correctly draw rounded caps during image and PDF export.
- Draw cross connection during PDF export.
- Fixes an issue were lines where not fully drawn during PDF export.
- Correctly size image in the export format dialog.
@aquarius
aquarius / gist:1322028
Created October 28, 2011 10:17
Export all image file types with a transparent background in MindNode Pro
defaults write com.mindnode.MindNodePro MNDefaultsIgnoreBackgroundWhenDrawingOffScreen YES
@aquarius
aquarius / gist:1339172
Created November 4, 2011 11:45
Crash Log
Incident Identifier: [TODO]
CrashReporter Key: [TODO]
Process: MindNode [1957]
Path: /var/mobile/Applications/5C216CA6-CCB6-414F-8E2A-FD79AA2C5FF1/MindNode.app/MindNode
Identifier: com.mindnode.mindnodetouch
Version: 1109
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2554-10-30 17:36:11 +0000
@aquarius
aquarius / gist:1399872
Created November 28, 2011 10:16
What is the best way to get notified when all callbacks have returned?
for (myObject in objects) {
[myObject doWithCallback: ^(BOOL success){
//
}];
}
//
// MNDocumentConflictResolutionViewController.h
// MindNodeTouch
//
// Created by Markus Müller on 15.12.11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
@class MNDocumentReference;
@aquarius
aquarius / gist:1467983
Created December 12, 2011 15:53
KKGridView Crash
#0 0x0000adf2 in -[KKGridView _configureAuxiliaryView:inSection:withStickPoint:height:] at /Users/markusm/ScratchPad/KKGridView/KKGridView/KKGridView.mm:553
#1 0x000098d8 in __33-[KKGridView _layoutVisibleCells]_block_invoke_0177 ()
#2 0x328e6510 in +[UIView(UIViewAnimationWithBlocks) _setupAnimationWithDuration:delay:view:options:animations:start:completion:] ()
#3 0x328e6310 in +[UIView(UIViewAnimationWithBlocks) animateWithDuration:delay:options:animations:completion:] ()
#4 0x00008716 in -[KKGridView _layoutVisibleCells] ()
#5 0x000060d6 in -[KKGridView _layoutGridView] ()
#6 0x0000e320 in -[KKGridView insertItemsAtIndexPaths:withAnimation:] ()
#7 0x00003c26 in -[GridViewDemoViewController addItems:] ()
#8 0x3432d434 in -[NSObject performSelector:withObject:withObject:] ()
#9 0x328de9ea in -[UIApplication sendAction:to:from:forEvent:] ()