Skip to content

Instantly share code, notes, and snippets.

View stonyw's full-sized avatar

Stony Wang stonyw

  • Tianrang
  • Shanghai, CN
View GitHub Profile
@butelo
butelo / callbacks.md
Created January 31, 2014 10:44
Create Callbacks on Android: A Fragment or View makes a Callback to the hosting Activity

Steps to make a Fragment or View to have a Callback to its parent Activity.

Step by step from info taken from here:

http://developer.android.com/guide/components/fragments.html#CommunicatingWithActivity


  • We have an Activity that hosts a Fragment or a View
  • We have a Fragment or View with a ListView or a Button or some element that we want the Activity to know about. i.e. we load detailed info of an element chosen on a ListView or something.
@janodev
janodev / gist:4175830
Created November 30, 2012 13:50
Dynamic properties
#import <objc/runtime.h>
#import <Foundation/Foundation.h>
@interface Person : NSObject
@property (nonatomic,strong) NSMutableDictionary *properties;
@end
@implementation Person
@jonah-williams
jonah-williams / build.sh
Created April 30, 2011 17:46
Command line iOS project builds and over-the-air distribution
#!/bin/bash
# https://gist.github.com/949831
# http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/
# command line OTA distribution references and examples
# http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson
# http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution
# http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/
# http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html