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
extension MKMapView | |
{ | |
func setVisibleMapAnnotations(edgePadding: UIEdgeInsets, animated: Bool) | |
{ | |
var zoomRect = MKMapRectNull | |
for annotationObject in annotations | |
{ | |
let annotation = annotationObject as MKAnnotation | |
let annotationPoint = MKMapPointForCoordinate(annotation.coordinate) |
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
// | |
// ParseExtensions.h | |
// | |
// Created by Alejandro Rupérez on 9/12/14. | |
// | |
#import <Foundation/Foundation.h> | |
#import <Parse/Parse.h> | |
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
extension UIImage | |
{ | |
func tint(color: UIColor, blendMode: CGBlendMode) -> UIImage | |
{ | |
let drawRect = CGRectMake(0.0, 0.0, size.width, size.height) | |
UIGraphicsBeginImageContextWithOptions(size, false, scale) | |
let context = UIGraphicsGetCurrentContext() | |
CGContextClipToMask(context, drawRect, CGImage) | |
color.setFill() | |
UIRectFill(drawRect) |
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
- (void)registerForRemoteNotificationTypes:(NSUInteger)notificationTypes categories:(NSSet *)categories | |
{ | |
if ([UIApplication instancesRespondToSelector:@selector(registerUserNotificationSettings:)] && [UIApplication instancesRespondToSelector:@selector(registerForRemoteNotifications)]) | |
{ | |
[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:notificationTypes categories:categories]]; | |
[[UIApplication sharedApplication] registerForRemoteNotifications]; | |
} | |
else if ([UIApplication instancesRespondToSelector:@selector(registerForRemoteNotificationTypes:)]) | |
{ | |
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:notificationTypes]; |
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
// | |
// NSDictionary+AllKeysStartingWith.h | |
// | |
// Copyright (c) 2013 alexruperez. | |
// | |
#import <Foundation/Foundation.h> | |
@interface NSDictionary (AllKeysStartingWith) |
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
// | |
// NSString+SnakeCaseToTitleCase.h | |
// | |
// Copyright (c) 2013 alexruperez. | |
// | |
#import <Foundation/Foundation.h> | |
@interface NSString (SnakeCaseToTitleCase) |
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/bash | |
PRODUCT_NAME=<YOUR_PRODUCT_NAME> | |
API_TOKEN=<YOUR_TESTFLIGHT_API_TOKEN> | |
TEAM_TOKEN=<YOUR_TESTFLIGHT_TEAM_TOKEN> | |
NOTIFY="True" | |
NOTES="Build uploaded via the upload API" | |
if [ "$1" ] | |
then | |
NOTES="$1" |
NewerOlder