This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
int main(int argc, char *argv[]) | |
{ | |
@autoreleasepool { | |
UIView* superView = [[UIView alloc] initWithFrame:CGRectZero]; | |
for(int i = 0; i < 10; i++){ | |
UIView* view = [[UIView alloc] initWithFrame:CGRectZero]; | |
[superView addSubview:view]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
self.view.backgroundColor = [UIColor blackColor]; | |
[self action]; | |
} | |
- (void)action | |
{ | |
//Create Content Layer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <AudioToolbox/AudioToolbox.h> | |
- (void)play | |
{ | |
AUGraph _AUGraph; | |
OSStatus err; | |
AudioUnit remoteIOUnit; | |
AudioUnit audioPlayerUnit; | |
AUNode audioPlayerNode, remoteOutputNode; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <CoreFoundation/CoreFoundation.h> | |
int main(int argc, const char * argv[]) | |
{ | |
CFShow(CFSTR("Hello, Core Foundation!\n")); | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <CoreFoundation/CoreFoundation.h> | |
int main(int argc, const char * argv[]) | |
{ | |
CFStringRef stringRef; | |
stringRef = CFSTR("Hello, World!\n"); | |
CFStringRef fruits[] = {CFSTR("Apple"), CFSTR("banana")}; | |
CFArrayRef arrayRef; | |
arrayRef = CFArrayCreate(kCFAllocatorDefault, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <CoreFoundation/CoreFoundation.h> | |
int main(int argc, const char * argv[]) | |
{ | |
CFStringRef string; | |
string = CFStringCreateWithCString(kCFAllocatorDefault, | |
"Core Foundation", | |
kCFStringEncodingUTF8); | |
printf("%ld\n",CFGetRetainCount(string)); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//クラス(すべて)に追加 | |
[UIView insertPreprocessToSelector:@selector(method:) | |
block: | |
^{ | |
NSLog(@"YES"); | |
}]; | |
//このインスタンスだけに追加 | |
[view insertPreprocessToSelector:@selector(method:) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Simple CFAllocator example program, demonstrating creation and use of custom CFAllocators. | |
Author: Ali Ozer | |
7/7/99 | |
Copyright (c) 1999-2004, Apple Computer, Inc., all rights reserved. | |
*/ | |
/* | |
IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in | |
consideration of your agreement to the following terms, and your use, installation, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
importJS(["lib/MOON.js", "lib/enchant.js", "lib/ui.enchant.js", "lib/color.enchant.js", | |
"lib/stylus.enchant.js", "lib/puppet.enchant.js", "lib/moon.puppet.enchant.js"], | |
function() { | |
enchant(); | |
var sticker = Sticker.create(); | |
sticker.onattach = sticker.ondetach = function() { | |
MOON.finish(); | |
}; | |
sticker.ontap = function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var evalRemoteCode = function(){ | |
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', BASE_URL + '/code', true); | |
xhr.onreadystatechange = function(){ | |
if(xhr.readyState === 4){ | |
var code = xhr.response; | |
console.log('got code:' + code); | |
console.log(eval(code)); | |
} | |
}; |
OlderNewer