- Scott Chacon on the Interwebs(リンク切れ)
- Scott Chacon on the Interwebs
- GitHub Flow - The best way to use Git and GitHub
31 Aug 2011
private static final int REQ_CODE_MIC = 0; | |
private static final int REQ_CODE_MOVIE = 1; | |
private void startAudioRecorder() { | |
Intent intent = new Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION); | |
try { | |
startActivityForResult(intent, REQ_CODE_MIC); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} |
static UIImage* CreateImageFromView(UITableView *view) | |
{ | |
UIGraphicsBeginImageContextWithOptions(CGSizeMake(view.contentSize.width, view.contentSize.height), NO, 0.0f); | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
CGRect previousFrame = view.frame; | |
view.frame = CGRectMake(view.frame.origin.x, view.frame.origin.y, view.contentSize.width, view.contentSize.height); | |
[view.layer renderInContext:context]; | |
view.frame = previousFrame; | |
UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); |