save_and_open_page
have_button(locator)
// returns a MKCoordinateRegion that encompasses an array of MKAnnotations | |
- (MKCoordinateRegion)regionForAnnotations:(NSArray *)annotations { | |
CLLocationDegrees minLat = 90.0; | |
CLLocationDegrees maxLat = -90.0; | |
CLLocationDegrees minLon = 180.0; | |
CLLocationDegrees maxLon = -180.0; | |
for (id <MKAnnotation> annotation in annotations) { |
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' | \
Read the blog at http://fokkezb.nl/2013/09/20/url-schemes-for-ios-and-android-2/
A list of Sketch plugins hosted at GitHub, in no particular order.
// | |
// ViewController.swift | |
// Tetris | |
// | |
// Created by Julius Parishy on 11/19/14. | |
// Copyright (c) 2014 Julius Parishy. All rights reserved. | |
// | |
import UIKit |
When Swift was first announced, I was gratified to see that one of the (few) philosophies that it shared with Objective-C was that exceptions should not be used for control flow, only for highlighting fatal programming errors at development time.
So it came as a surprise to me when Swift 2 brought (What appeared to be) traditional exception handling to the language.
Similarly surprised were the functional Swift programmers, who had put their faith in the Haskell-style approach to error handling, where every function returns an enum (or monad, if you like) containing either a valid result or an error. This seemed like a natural fit for Swift, so why did Apple instead opt for a solution originally designed for clumsy imperative languages?
I'm going to cover three things in this post:
// Based on Swift 1.2, ObjectMapper 0.15, RealmSwift 0.94.1 | |
// Author: Timo Wälisch <timo@waelisch.de> | |
import UIKit | |
import RealmSwift | |
import ObjectMapper | |
import SwiftyJSON | |
class ArrayTransform<T:RealmSwift.Object where T:Mappable> : TransformType { | |
typealias Object = List<T> |
My friend Michael Jackson turned off github issues on one of his smaller projects. It got me thinking...
Maintainers getting burned out is a problem. Not just for the users of a project but the mental health of the maintainer. It's a big deal for both parties. Consumers want great tools, maintainers want to create them, but maintainers don't want to be L1 tech support, that's why they
// Compile run with: | |
// cc piper.c -o piper ; ./piper | |
// From Season 3 Episode 1 of HBO's Silicon Valley | |
#include <stdio.h> | |
#include <stdlib.h> | |
void _ctx_iface(__int128_t s, int i) | |
{ |