This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
#import <AFNetworking.h> | |
@interface UIImageView (AFNetworkingFadeInAdditions) | |
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholderImage fadeInWithDuration:(CGFloat)duration; | |
@end |
Generate the list yourself:
$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./* | \
sed 's/NS_AVAILABLE_IOS(.*)//g' | \
sed 's/NS_DEPRECATED_IOS(.*)//g' | \
sed 's/API_AVAILABLE(.*)//g' | \
sed 's/API_UNAVAILABLE(.*)//g' | \
sed 's/UI_APPEARANCE_SELECTOR//g' | \
--- | |
language: objective-c | |
before_script: | |
- ./scripts/travis/add-key.sh | |
after_script: | |
- ./scripts/travis/remove-key.sh | |
after_success: | |
- ./scripts/travis/testflight.sh | |
env: | |
global: |
- (void)customKeyboardOnSearchBar:(UISearchBar *)searchBar | |
{ | |
for(UIView *subView in searchBar.subviews) { | |
if([subView conformsToProtocol:@protocol(UITextInputTraits)]) { | |
[(UITextField *)subView setKeyboardAppearance:UIKeyboardAppearanceAlert]; | |
[(UITextField *)subView setReturnKeyType:UIReturnKeyDone]; | |
} else { | |
for(UIView *subSubView in [subView subviews]) { | |
if([subSubView conformsToProtocol:@protocol(UITextInputTraits)]) { | |
[(UITextField *)subSubView setReturnKeyType:UIReturnKeyDone]; |
import Foundation | |
extension Array { | |
func indexOfObject(object : AnyObject) -> NSInteger { | |
return (self as NSArray).indexOfObject(object) | |
} | |
mutating func removeObject(object : AnyObject) { | |
for var index = self.indexOfObject(object); index != NSNotFound; index = self.indexOfObject(object) { | |
self.removeAtIndex(index) |
// Playground - noun: a place where people can play | |
import Foundation | |
func toRoman(number: Int) -> String { | |
let romanValues = ["M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"] | |
let arabicValues = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1] | |
var romanValue = "" |
// | |
// FlagView.swift | |
// Bandeira Brasil | |
// | |
// Created by Danilo Altheman on 01/07/14. | |
// Copyright (c) 2014 Quaddro. All rights reserved. | |
// | |
import UIKit |
import Foundation | |
/// Find first differing character between two strings | |
/// | |
/// :param: s1 First String | |
/// :param: s2 Second String | |
/// | |
/// :returns: .DifferenceAtIndex(i) or .NoDifference | |
public func firstDifferenceBetweenStrings(s1: NSString, s2: NSString) -> FirstDifferenceResult { |