Skip to content

Instantly share code, notes, and snippets.

View alexrepty's full-sized avatar
🌈
Andrà tutto bene!

Alexander Repty alexrepty

🌈
Andrà tutto bene!
View GitHub Profile
09.10.09 15:59:36 GitNub[19914] TexturedWindow#initWithContentRect_styleMask_backing_defer: NameError: uninitialized constant TexturedWindow::NSMinYEdge
09.10.09 15:59:36 [0x0-0x233d33b].com.alternateidea.rubycocoa.GitNubApp[19914] /System/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_import.rb:192:in `const_missing'
09.10.09 15:59:36 [0x0-0x233d33b].com.alternateidea.rubycocoa.GitNubApp[19914] /Applications/GitNub.app/Contents/Resources/TexturedWindow.rb:14:in `initWithContentRect_styleMask_backing_defer'
09.10.09 15:59:36 [0x0-0x233d33b].com.alternateidea.rubycocoa.GitNubApp[19914] /Applications/GitNub.app/Contents/Resources/rb_main.rb:23:in `NSApplicationMain'
09.10.09 15:59:36 [0x0-0x233d33b].com.alternateidea.rubycocoa.GitNubApp[19914] /Applications/GitNub.app/Contents/Resources/rb_main.rb:23
09.10.09 15:59:36 [0x0-0x233d33b].com.alternateidea.rubycocoa.GitNubApp[19914] /System/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_import.rb:192:in `const_missing': unin
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
if ([self pointInside:point withEvent:event]) {
return _scrollView;
}
return nil;
}
//
// MiniToggle.h
// MiniToggle
//
// Created by jtrim on 2/12/10.
/*
MiniToggle.h & MiniToggle.m:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
- (void)show:(BOOL)animated {
self.alpha = 0.0f;
self.hidden = NO;
if (animated) {
[UIView beginAnimations:nil context:nil];
}
self.alpha = 1.0f;
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
UIImageView *thumbImageView = (UIImageView *)context;
if ([keyPath isEqualToString:kARPageScrubberViewKeypathFrame]) {
self.bubbleView.pageNumber = self.pageIndex + 1;
CGRect bubbleViewFrame = self.bubbleView.frame;
bubbleViewFrame.origin.x = thumbImageView.frame.origin.x - round(bubbleViewFrame.size.width / 2) + _slider.frame.origin.x + round(thumbImageView.frame.size.width / 2);
bubbleViewFrame.origin.y = thumbImageView.frame.origin.y - bubbleViewFrame.size.height;
self.bubbleView.frame = bubbleViewFrame;
if (self.bubbleView.hidden && _slider.tracking) {
@alexrepty
alexrepty / gist:1392024
Created November 24, 2011 19:07
Amazon.de on Diablo III Release Date
Guten Tag,
Amazon.de hat eine wichtige Nachricht zu Ihrer aktuellen Amazon.de-Bestellung
Ihre Bestellung enthält diesen Titel:
=====================================================================
Diablo III
www.amazon.de/gp/product/B0041O5LNM
=====================================================================
@alexrepty
alexrepty / gist:5183042
Created March 17, 2013 18:54
Useful macappstore:// links
Updates page: macappstore://showUpdatesPage?scan=true
Featured page: macappstore://itunes.apple.com/
Direct app link (1): macappstore://itunes.apple.com/app/id%@?mt=12 (ex. macappstore://itunes.apple.com/app/id537386512?mt=12)
Direct app link (2): macappstore://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=%@&mt=12 (ex. macappstore://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=537386512&mt=12)
@alexrepty
alexrepty / main.m
Created October 8, 2013 14:14
Notification Inheritance Issues
#import <Foundation/Foundation.h>
NSString *const kNotificationName = @"NotificationName";
@interface Foobar : NSObject
@end
@implementation Foobar
- (id)init {
self = [super init];
@alexrepty
alexrepty / PlaceholderOrder.m
Created September 26, 2014 12:50
I learned about %1$@, %2$@ etc. today thanks to Wordcrafts
#import <Foundation/Foundation.h>
int main(int argc, char *argv[]) {
NSAutoreleasePool *p = [[NSAutoreleasePool alloc] init];
NSString *foo = @"foo";
NSString *bar = @"bar";
NSString *oldSkool = [NSString stringWithFormat:@"%@ %@", foo, bar];
NSString *original = [NSString stringWithFormat:@"%1$@ %2$@", foo, bar];
@alexrepty
alexrepty / CustomUITableViewCell.m
Created December 22, 2014 11:56
One way to use a custom reorder control in iOS 8 apps.
- (void)addSubview:(UIView *)view {
// For the system-supplied reorder control, we want to eliminate the default
// image and instead use our own. In order to achieve this, we need to use
// the somewhat hacky way of confirming that this is indeed a system-created
// UITableViewCellReorderControl by checking the class name. Icky? Icky.
NSArray *relevantClassnameParts = @[@"ReorderControl"];
NSString *viewClassname = NSStringFromClass([view class]);
for (NSString *classname in relevantClassnameParts) {
if (![viewClassname containsString:classname]) {