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
# Keep in mind that when asking for a `return` after another, only the first one will be output. | |
# This example is meant as a simple starting point, to show how to get the information in the simplest available way. | |
# Google Chrome | |
tell application "Google Chrome" to return URL of active tab of front window | |
tell application "Google Chrome" to return title of active tab of front window | |
# Google Chrome Canary | |
tell application "Google Chrome Canary" to return URL of active tab of front window | |
tell application "Google Chrome Canary" to return title of active tab of front window | |
# Chromium |
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
//NOTE: containsString is implemented in iOS 8 and later by Apple | |
// Please use this version if trying to support iOS 7 and below | |
@interface NSString (StringContents) | |
- (BOOL)containsString:(NSString*)substring; | |
- (BOOL)containsString:(NSString*)substring ignoreCase:(BOOL)ignoreCase; | |
- (BOOL)containsFormat:(NSString*)regex; | |
@end |
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
// | |
// UIView+FindUIViewController.h | |
// | |
// Created by Jonathan Lott on 6/30/15. | |
// Copyright (c) 2015 A Lott Of Ideas. All rights reserved. | |
// | |
@interface ClassProperty : NSObject | |
@property (nonatomic, strong) NSString* name; | |
@property (nonatomic, strong) NSString* type; |
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
// | |
// AppDelegate.m | |
// AnimationExamplesiPhone | |
// | |
// Created by Eric Allam on 10/05/2014. | |
#import "AppDelegate.h" | |
#pragma mark - UIColor Additions |
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 <UIKit/UIKit.h> | |
#import <ImageIO/ImageIO.h> | |
#import <MobileCoreServices/MobileCoreServices.h> | |
- (void)exportAnimatedGif | |
{ | |
UIImage *shacho = [UIImage imageNamed:@"shacho.png"]; | |
UIImage *bucho = [UIImage imageNamed:@"bucho.jpeg"]; | |
NSString *path = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"animated.gif"]; |