More Related Content
PDF
PDF
ODP
PDF
PDF
PDF
for JSDeferred Code Reading PDF
PDF
What's hot
PDF
PDF
PDF
Grails-1.1を斬る!~Grails-1.1からのチーム開発~ in Tokyo KEY
PPTX
Marionettejs getting started PPTX
CakePHP+Smartyハイブリッドによるラクラク開発 PDF
PDF
「Html sql」で図書館hpにアクセスしてみよう PDF
PPT
PDF
PDF
Backbone model collection (jscafe 8) PDF
asm.js x emscripten: The foundation of the next level Web games PDF
CakeRequest::onlyAllow() について PPTX
PDF
第3回Webkit/HTML5勉強会 - File APIと加速度センサー PDF
Yapc -asia 2012 lt @studio3104 PDF
Chiba.pm #1 lt @studio3104 PDF
PDF
Viewers also liked
PDF
KEY
PDF
PDF
KEY
PDF
PDF
FileReader and canvas and server silde Similar to Ll xcode
PDF
PPTX
2012 05-19第44回cocoa勉強会発表資料 KEY
PPT
PDF
PDF
PDF
24時間でiOSアプリ-Twitterクライアント-の作成にチャレンジ ver1.1 PDF
24時間でiOSアプリ-Twitterクライアント-の作成にチャレンジ PDF
PDF
Apple審査を一発通過!iOS開発経験0でも出来るじげん流Swift開発のすべて PDF
iPhone develop for Beginner KEY
軽量EvernoteクライアントSmartEverにおけるアプリ高速化の工夫と課題 PDF
PDF
PDF
20140822 Swift 勉強会 vol.3 - はぢめての Swift PDF
PDF
Swift事情2014夏 ~ Swift入門 beta6対応 PDF
PPTX
KEY
More from Net Kanayan
PDF
PDF
PDF
PDF
PDF
PDF
PDF
Browser push notifications PDF
PDF
ODP
PDF
KEY
KEY
KEY
KEY
PDF
PDF
PDF
PDF
PDF
Ll xcode
- 1.
- 2.
- 3.
Xcode とは?
ソフトウェアを開発するための
アップルの統合開発環境
例:
IPhone IPad のアプリケーション
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
1.始めるキッカケ
ブルーベリーの栽培記録を
その場で残せるアプリが欲しかった
(土壌PH や 農薬 や 肥料など)
↓↓↓↓↓
作ればいいじゃない!?
- 11.
- 12.
- 13.
アプリの構成
HTTP
Web API
農作物や日記の入力
データの保存
描画
呼び出し
- 14.
- 15.
- 16.
- 17.
苦戦した箇所
javascript(Jquery) の場合
$.ajax({
type: "POST",
url: "http://example.com",
data: "xxx=yyy",
success: function(msg){
alert( "成功: " + msg );
}
});
- 18.
苦戦した箇所
objective-c の場合
みなさん使ってるライブラリあるのかな∼?
っとググってみる....
↓↓↓↓↓
自作ライブラリ配布してる人はいたけど...
多くがコツコツ書いてる...
- 19.
苦戦した箇所
objective-c の場合
NSURL *nsurl = [NSURL URLWithString:@”http://example.com”];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:
nsurl];
[request setHTTPMethod: @"POST"];
[request setValue:@"application/x-www-form-urlencoded"
forHTTPHeaderField:@"Content-Type"];
[request setValue:[NSString stringWithFormat:@"%d", [sendData length]]
forHTTPHeaderField:@"Content-Length"];
[request setHTTPBody: sendData];
NSError *error;
NSURLResponse *response;
NSData *buffer = [NSURLConnection sendSynchronousRequest:request
returningResponse:&response error:&error];
- 20.
- 21.
2. HTML との違い
例: Table 表示
HTML の場合
<table width=100% border=1 width=100%>
<tr>
<td>セル1</td>
</tr>
<tr>
<td>セル2</td>
</tr>
<tr>
<td>セル3</td>
</tr>
</table>
- 22.
- 23.
//セルの数
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
//table_list の中身は配列
return [table_list count];
}
// セルの中身の設定
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"product_items";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
NSInteger row = [indexPath row];
if (cell == nil)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:CellIdentifier];
}
cell.textLabel.font = [UIFont boldSystemFontOfSize:18];
NSDictionary *table_row = [table_list objectAtIndex:row];
cell.textLabel.text = [table_row objectForKey:@"subject"];
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
return cell;
}
//セルの高さ
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 42;
}
- 24.
- 25.
苦戦しなかった箇所
JSON ( javascript )
var json_string = { status : ok } ;
var json_obj = JSON.parse(json_string);
console.log( json_obj.status ); // -> ok
- 26.
苦戦しなかった箇所
JSON
Objective-c
// json_string にjson文字列 json_string = ‘{”status”:”ok”}’
NSData *json_data = [json_string dataUsingEncoding:NSUTF8StringEncoding];
NSMutableArray *ret = [NSJSONSerialization JSONObjectWithData:json_data
options:NSJSONReadingAllowFragments error:nil];
[ret objectForKey:@"status"]; // -> ok
- 27.
- 28.
- 29.
- 30.
- 31.
- 32.
- 33.
- 34.