/\_/\ /\_/\ =( owo )= =( owo )= \\ ) ( ) ( // \\(_ _ _) (_ _ _)//
- C
let toImage = UIImage(named:"image.png") | |
UIView.transitionWithView(self.imageView, | |
duration:5, | |
options: .TransitionCrossDissolve, | |
animations: { self.imageView.image = toImage }, | |
completion: nil) |
// direct check for external keyboard | |
+ (BOOL)_isExternalKeyboardAttached | |
{ | |
BOOL externalKeyboardAttached = NO; | |
@try { | |
NSString *keyboardClassName = [@[@"UI", @"Key", @"boa", @"rd", @"Im", @"pl"] componentsJoinedByString:@""]; | |
Class c = NSClassFromString(keyboardClassName); | |
SEL sharedInstanceSEL = NSSelectorFromString(@"sharedInstance"); | |
if (c == Nil || ![c respondsToSelector:sharedInstanceSEL]) { |
/\_/\ /\_/\ =( owo )= =( owo )= \\ ) ( ) ( // \\(_ _ _) (_ _ _)//
extension NSAttributedString { | |
func replaceHTMLTag(tag: String, withAttributes attributes: [String: AnyObject]) -> NSAttributedString { | |
let openTag = "<\(tag)>" | |
let closeTag = "</\(tag)>" | |
let resultingText: NSMutableAttributedString = self.mutableCopy() as NSMutableAttributedString | |
while true { | |
let plainString = resultingText.string as NSString | |
let openTagRange = plainString.rangeOfString(openTag) | |
if openTagRange.length == 0 { |
create dummy images | |
curl -L "http://dummyimage.com/600x400/000/fff&text=DummyImage%20[01-10]" -o image_#1.png | |
get page headers | |
curl --head http://google.com | |
send parameters to page | |
curl.exe -L -G "http://yoururl.com" --data-urlencode "text=DESIGN6 daily backup started" | |
send formdata & files to page |
- (void)listSubviewsOfView:(UIView *)view { | |
[self listSubviewsOfView:(UIView *)view withPrefix:@""]; | |
} | |
- (void)listSubviewsOfView:(UIView *)view withPrefix:(NSString *)prefix { | |
NSArray *subviews = [view subviews]; | |
for (UIView *subview in subviews) { | |
NSLog(@"%@ %@ (%d %d; %d %d)", prefix, subview.class | |
, (int)subview.frame.origin.x | |
, (int)subview.frame.origin.y | |
, (int)subview.frame.size.width |
facepunch
_base_
in the download URL to _test_
as the base image does not have developer tools enabledrm -rf `find . -type d -name .svn` |
// | |
// NSString+XML.h | |
// Customizable string XML parser for NSString, NSMutableString, NSAttributedString, and NSMutableAttributedString. | |
// | |
// Created by Shilo White on 8/31/13. | |
// Copyright (c) 2013 XIDA Design & Technik. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |