- ARMv8/ARM64:
iPhone 6
,iPhone 5s
,iPad Air
,Retina iPad Mini
- ARMv7s:
iPhone 5
,iPhone 5c
,iPad 4
- ARMv7:
iPhone 3GS
,iPhone 4
,iPhone 4S
,iPod 3G/4G/5G
,iPad
,iPad 2
,iPad 3
,iPad Mini
- ARMv6:
iPhone
,iPhone 3G
,iPod 1G/2G
This file contains 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 * image = ... | |
// Redraw image with rotation | |
CGSize originalSize = image.size; | |
CGSize finalSize = CGSizeMake(originalSize.height, originalSize.width); | |
UIGraphicsBeginImageContext(finalSize); | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
CGAffineTransform transform = CGAffineTransformIdentity; |
This file contains 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
static inline NSPUIImageType NSPUIImageTypeFromData(NSData *imageData) | |
{ | |
if (imageData.length > 4) { | |
const unsigned char * bytes = [imageData bytes]; | |
if (bytes[0] == 0xff && | |
bytes[1] == 0xd8 && | |
bytes[2] == 0xff) | |
{ | |
return NSPUIImageType_JPEG; |
This file contains 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
######################### | |
# .gitignore file for Xcode4 / OS X Source projects | |
# | |
# Version 2.0 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# | |
# 2013 updates: | |
# - fixed the broken "save personal Schemes" | |
# | |
# NB: if you are storing "built" products, this WILL NOT WORK, |
This file contains 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
- (NSArray *)keyCommands | |
{ | |
return @[[UIKeyCommand keyCommandWithInput:@"\r" | |
modifierFlags:0 | |
action:@selector(didPressExternalKeyboardReturnButton)]]; | |
} | |
- (void)didPressExternalKeyboardReturnButton | |
{ | |
// do ur action here |
This file contains 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/bash | |
# | |
# Xcode run script for version, whenever build a new version, | |
# can choose to increase bundle version, update build date | |
# & git latest commit hash. | |
# | |
# | |
# Usage: | |
# | |
# Copy this file under the root folder of the project, and make sure it's executable: |
This file contains 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
// Put it in as the browser address & press ENTER, after you have opened a web page. | |
javascript:document.body.contentEditable='true';document.designMode='on';void 0 |
This file contains 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: Kjuly(Kj Yu) | |
* Date: 09/29/2011 | |
* Feel free to use this code snippet. ;) | |
* | |
*/ | |
$(function() { | |
$(window).scroll(function() { | |
if ($(this).scrollTop() >= 100) { // The Logo's above the topbar is 100px |
This file contains 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/bash | |
cd $PROJECT_DIR | |
# BUILD_VERSION=`/usr/local/bin/git rev-parse --short HEAD` | |
BUILD_VERSION=`git rev-parse --short HEAD` | |
cd $BUILT_PRODUCTS_DIR/$PRODUCT_NAME.app | |
# Note: It's Info.plist, not Proj-Info.plist | |
RELEASE_VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" Info.plist) | |
/usr/libexec/PlistBuddy -c "Set CFBundleVersion $BUILD_VERSION" Info.plist | |
# here, 5 is my index of version part in |PreferenceSpecifiers| array | |
/usr/libexec/PlistBuddy -c "Set :PreferenceSpecifiers:5:DefaultValue $RELEASE_VERSION ($BUILD_VERSION)" Settings.bundle/Root.plist |
OlderNewer