This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UIPickerView_SelectionBarLabelSupport.h | |
// | |
// This file adds a new API to UIPickerView that allows to easily recreate | |
// the look and feel of UIDatePicker labeled components. | |
// | |
// Copyright (c) 2009, Andrey Tarantsov <[email protected]> | |
// | |
// Permission to use, copy, modify, and/or distribute this software for any | |
// purpose with or without fee is hereby granted, provided that the above | |
// copyright notice and this permission notice appear in all copies. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#4606367513 { | |
padding: 5px 10px; | |
display: inline-block; | |
background: rgb(30, 30, 30); | |
background: -webkit-gradient(linear, center top, center bottom, | |
color-stop(0.0, rgba(0,0,0, 1)), | |
color-stop(0.05, rgba(30,30,30, 1)), | |
color-stop(1.0, rgba(50, 50, 60, 1))); | |
background: -moz-linear-gradient(270deg, | |
rgba(0,0,0,1) 0%, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>0.811765 0.796078 0.564706 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>Inconsolata - 16.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>1 1 1 1</string> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <QuartzCore/QuartzCore.h> | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
UIImage *image = [UIImage imageNamed:@"photo.png"]; | |
UIView *photoView = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, image.size.width, image.size.height)]; | |
photoView.center = CGPointMake(self.view.center.x, self.view.center.y - 10); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Author: Oleg Andreev <[email protected]> | |
// May 28, 2011 | |
// Do What The Fuck You Want Public License <http://www.wtfpl.net> | |
#import "NSData+OADataHelpers.h" | |
#if !__has_feature(objc_arc) | |
#error ARC must be enabled! | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (UIImage *)imageWithMask:(UIImage *)maskImage andIsWhite:(BOOL)isWhite | |
{ | |
CGRect imageRect = CGRectMake(0, 0, maskImage.size.width, maskImage.size.height); | |
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); | |
CGContextRef ctx = CGBitmapContextCreate(NULL, maskImage.size.width, maskImage.size.height, 8, 0, colorSpace, kCGImageAlphaPremultipliedLast); | |
CGContextClipToMask(ctx, imageRect, maskImage.CGImage); | |
if (isWhite) { | |
CGContextSetRGBFillColor(ctx, 1, 1, 1, 1); | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Found this tip in comment here: http://www.tipb.com/2011/01/04/tipb-bug-home-button-working-iphone/ | |
1.) Open any application | |
2.) Press and hold the power button until the slide to shutdown swipe bar appears. | |
3.) Release Power button | |
4.) Press and hold Home button Lightly | |
until screen returns to icon screen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# On alternate invocations, this script | |
# saves the path of the source file currently open in Xcode | |
# and restores the file at that path in Xcode. | |
# | |
# By setting Xcode (in Behaviors) to run this script when "Run Starts" | |
# and when "Run Completes", you can prevent it from switching to main.m | |
# when a run finishes. | |
# See http://stackoverflow.com/questions/7682277/xcode-4-2-jumps-to-main-m-every-time-after-stopping-simulator |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define $array(OBJS...) ({id objs[]={OBJS}; \ | |
[NSArray arrayWithObjects: objs count: sizeof(objs)/sizeof(id)];}) | |
#define $marray(OBJS...) ({id objs[]={OBJS}; \ | |
[NSMutableArray arrayWithObjects: objs count: sizeof(objs)/sizeof(id)];}) | |
#define $mdict(PAIRS...) ( \ | |
{id pairs[]={PAIRS}; \ | |
NSMutableDictionary *d = [NSMutableDictionary dictionary]; \ | |
int cnt = sizeof(pairs)/sizeof(id); \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
extern UIImage * UIImageWithJPEG2000Data( NSData * data ) ; |
OlderNewer