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
#ifdef DEBUG | |
# define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); | |
#else | |
# define DLog(...) | |
#endif | |
#ifdef DEBUG | |
# define ULog(fmt, ...) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:@"%s\n [Line %d] ", __PRETTY_FUNCTION__, __LINE__] message:[NSString stringWithFormat:fmt, ##__VA_ARGS__] delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [alert show]; } | |
#else | |
# define ULog(...) | |
#endif |
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
- (void)hideAdBannerViewAnimated:(BOOL)animated | |
{ | |
void (^animations)() = ^void() { | |
CGRect addBannerViewFrame = self.adBannerView.frame; | |
addBannerViewFrame.origin.y = self.view.frame.size.height; | |
self.adBannerView.frame = addBannerViewFrame; | |
}; | |
if (animated) { | |
[UIView animateWithDuration:0.3 delay:0.0 usingSpringWithDamping:1.0 initialSpringVelocity:1.0 options:UIViewAnimationOptionCurveEaseInOut animations:animations completion:nil]; |
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 *fontFamilies = [UIFont familyNames]; | |
for (int i = 0; i < [fontFamilies count]; i++) | |
{ | |
NSString *fontFamily = [fontFamilies objectAtIndex:i]; | |
NSArray *fontNames = [UIFont fontNamesForFamilyName:[fontFamilies objectAtIndex:i]]; | |
NSLog (@"%@: %@", fontFamily, fontNames); | |
} |
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
extension UIDevice { | |
/** | |
Returns the name of the current devices' owner, maybe. | |
Usually iPhones are named something like "Will's iPhone", or "Will's iPad", this method is a simple, unreliable way of getting the persons name from that string. | |
:returns: Optional string that might be the owners name. | |
*/ | |
func ownersName() -> String? { | |
return UIDevice.currentDevice().name.componentsSeparatedByString("'").first |
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
import Foundation | |
import CoreFoundation | |
class Timer { | |
let startTime:CFAbsoluteTime | |
var endTime:CFAbsoluteTime? | |
init() { | |
startTime = CFAbsoluteTimeGetCurrent() |
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
import Foundation | |
import UIKit | |
extension UIImage { | |
class func imageForColor(color: UIColor) -> UIImage { | |
let rect = CGRectMake(0, 0, 1, 1) | |
UIGraphicsBeginImageContext(rect.size) | |
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 | |
# This script downlaods and builds the iOS and Mac openSSL libraries with Bitcode enabled | |
# Credits: | |
# https://github.com/st3fan/ios-openssl | |
# https://github.com/x2on/OpenSSL-for-iPhone/blob/master/build-libssl.sh | |
# https://gist.github.com/foozmeat/5154962 | |
# Peter Steinberger, PSPDFKit GmbH, @steipete. | |
# Felix Schwarz, IOSPIRIT GmbH, @felix_schwarz. |
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
From 968ff57dd5830d9962d429e5757737274305e12f Mon Sep 17 00:00:00 2001 | |
From: =?UTF-8?q?W=20T=20K=C3=BChne?= <will@townsend.io> | |
Date: Fri, 29 Sep 2015 18:34:26 +0200 | |
Subject: [PATCH 13/13] add -fembed-bitcode | |
diff --git a/extras/package/ios/build.sh b/extras/package/ios/build.sh | |
index f514732..4917973 100755 | |
--- a/extras/package/ios/build.sh | |
+++ b/extras/package/ios/build.sh |
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
# Update the system | |
sudo yum update | |
# Install gcc, make, openssl, git | |
sudo yum install gcc-c++ make | |
sudo yum install openssl-devel | |
sudo yum install git | |
# Clone the git repo and build | |
git clone git://github.com/joyent/node.git |
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 /Shared\ Items/Public/AUTO/project | |
BUILDDIR="/Shared Items/Public/AUTO/project_build" | |
NAME="Project" | |
CONFIGURATION="Ad Hoc" | |
API_TOKEN="..." | |
TEAM_TOKEN="..." |
OlderNewer