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 | |
| #usage: sh ./iOS_Icons_Maker.sh path/to/sourceImage.png | |
| ITUNES_ARTWORK="$1" | |
| FOLDER=$(dirname "$ITUNES_ARTWORK") | |
| sips -z 29 29 "$ITUNES_ARTWORK" --out "${FOLDER}/Icon-Small.png" | |
| sips -z 58 58 "$ITUNES_ARTWORK" --out "${FOLDER}/Icon-Small@2x.png" | |
| sips -z 87 87 "$ITUNES_ARTWORK" --out "${FOLDER}/Icon-Small@3x.png" | |
| sips -z 40 40 "$ITUNES_ARTWORK" --out "${FOLDER}/Icon-40.png" |
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
| #imagemagick is needed http://www.imagemagick.org/ | |
| #reference: http://stackoverflow.com/questions/18663013/icon-file-names-ios-7 | |
| convert $1 -resize 29x29 Icon-Small.png | |
| convert $1 -resize 58x58 Icon-Small@2x.png | |
| convert $1 -resize 40x40 Icon-40.png | |
| convert $1 -resize 80x80 Icon-40@2x.png | |
| convert $1 -resize 57x57 Icon.png | |
| convert $1 -resize 114x114 Icon@2x.png | |
| convert $1 -resize 120x120 Icon-60@2x.png | |
| convert $1 -resize 76x76 Icon-76.png |
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
| NSUInteger PSPDFHashFromCGRect(CGRect rect) { | |
| return (*(NSUInteger *)&rect.origin.x << 10 ^ *(NSUInteger *)&rect.origin.y) + (*(NSUInteger *)&rect.size.width << 10 ^ *(NSUInteger *)&rect.size.height); | |
| } |
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
| typedef NS_ENUM(NSInteger, kErrorCode) { | |
| kErrorCodeInternal = 431432, | |
| }; | |
| //! generate error and log it. | |
| extern NSError *pixle_NSErrorMake(NSString *message, NSUInteger code, NSDictionary *aUserInfo, SEL selector); | |
| #define AssertTrueOrReturnBlock(condition, block) do{ NSAssert((condition), @"Invalid condition not satisfying: %s", #condition);\ | |
| if(!(condition)) { block(pixle_NSErrorMake([NSString stringWithFormat:@"Invalid condition not satisfying: %s", #condition], kErrorCodeInternal, nil, _cmd)); return;} }while(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
| http://devstreaming.apple.com/videos/wwdc/2013/710xfx3xn8197k4i9s2rvyb/710/710-HD.mov?dl=1 | |
| http://devstreaming.apple.com/videos/wwdc/2013/202xdx2x47ezp1wein/202/202-HD.mov?dl=1 | |
| http://devstreaming.apple.com/videos/wwdc/2013/200xdx2x35e1pxiinm/200/200-HD.mov?dl=1 | |
| http://devstreaming.apple.com/videos/wwdc/2013/413xdx5x97itb5ek4yex3r7/413/413-HD.mov?dl=1 | |
| http://devstreaming.apple.com/videos/wwdc/2013/612xax4xx65z1ervy5np1qb/612/612-HD.mov?dl=1 | |
| http://devstreaming.apple.com/videos/wwdc/2013/221xex4xxohbllf4hblyngt/221/221-HD.mov?dl=1 | |
| http://devstreaming.apple.com/videos/wwdc/2013/220xbx4xipaxfd1tggxuoib/220/220-HD.mov?dl=1 | |
| http://devstreaming.apple.com/videos/wwdc/2013/711xcx4x8yuutk8sady6t9f/711/711-HD.mov?dl=1 | |
| http://devstreaming.apple.com/videos/wwdc/2013/404xbx2xvp1eaaqonr8zokm/404/404-HD.mov?dl=1 | |
| http://devstreaming.apple.com/videos/wwdc/2013/505xbx4xrgmhwby4oiwkrpp/505/505-HD.mov?dl=1 |