ダブルクォートでは改行が含まれるとエラーが発生します。
// 複数行の文字列 var str string str = `Welcome! Multi lines message! Good job!`ちなみにバッククォート`はMacでは Shift + @ で入力できます
// 複数行の文字列 var str string str = `Welcome! Multi lines message! Good job!`ちなみにバッククォート`はMacでは Shift + @ で入力できます
GAE公式ドキュメントより
For efficiency, App Engine stores and serves static files separately from application files. Static files are not available in the application's file system. If you have data files that need to be read by the application code, the data files must be application files, and must not be matched by a static file pattern.
/Applications/google_appengine/goroot/misc/xcode/4/go.xclangspec
$ su $ echo $GOROOT
$ export GOROOT=/Applications/google_appengine/goroot/
$ sh go4xcode.sh Backing up plugindata file. Adding Go language specification entry. Duplicate Entry Was Skipped: Xcode.SourceCodeLanguage.Go Installing Go language specification file for Xcode. Run 'sudo rm -rf /var/folders/*' and restart Xcode to update change immediately. Syntax coloring must be manually selected from the Editor - Syntax Coloring menu in Xcode.
$ rm -rf /var/folders/*
// BGMのループ再生 game.assets['bgm.mp3'].play(); game.assets['bgm.mp3'].src.loop = true;
// この場合はループ再生されない game.assets['bgm.mp3'].src.loop = true; game.assets['bgm.mp3'].play();
// テキスト表示部分の処理は省略しています var message = 'Where is a pig! I am very hungry... Give me a pig!'; var label = new Label(); label.color = 'black'; label.text = message; // フォントサイズを75px, 行の高さを75pxに指定するが無視される label.font = '75px/75px fantasy'; game.currentScene.addChild(message);
var messages = [ 'Where is a pig!', 'I am very hungry...', 'Give me a pig!' ]; for(var i = 0; i < messages.length; i++) { var label = new Label(); label.color = 'black'; label.text = message; label.font = '75px fantasy'; label.y = 75 * i; // 手動で高さを調整 game.currentScene.addChild(message); }
#import <UIKit/UIKit.h> @interface TaskViewController : UIViewController <UITextFieldDelegate> @endここではUIViewControllerがUITextFieldDelegateプロトコルに対応していることを宣言しています。
#import <UIKit/UIKit.h> @interface TaskViewController : UIViewController <UITextFieldDelegate>// ADD HERE - (BOOL)textFieldShouldReturn:(UITextField *)textField; @end
#import "TaskViewController.h" @interface TaskViewController () @end @implementation TaskViewController // ADD HERE -(BOOL)textFieldShouldReturn:(UITextField *)textField { NSLog(@"tapped return key!"); return YES; } - (void)viewDidLoad { [super viewDidLoad]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; } @end
-(BOOL)textFieldShouldReturn:(UITextField *)textField { [textField resignFirstResponder]; return YES; }