CakePHP in iPhone App

3,197 views
3,078 views

Published on

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,197
On SlideShare
0
From Embeds
0
Number of Embeds
122
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide
  • アンケート
    ・iPhone 持っている方
    ・iPhone アプリを開発したことがある方
  • Webアプリケーション Safari + HTML5, JavaScript, PHP,
    ネイティブアプリケーション AppStore, Objective-C
  • ランキングシステム
    XML パース面倒
    JSON いいけど、結局表示部分って面倒
    ランキング表示は HTML で!
  • CakePHP in iPhone App

    1. 1. CakePHP in iPhone Application Akihiro Matsuura@syuhari
    2. 2. About Me • • Blog : Sun Limited Mt. http://www.syuhari.jp/blog/ • Twitter : @syuhari
    3. 3. Questionnaire
    4. 4. iPhone Application Web Application Native Application
    5. 5. CakePHP in iPhone App
    6. 6. Ranking System by CakePHP • • • Today, Week, Total) • Pagination)
    7. 7. - (id)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { webView = [[UIWebView alloc] initWithFrame:CGRectZero]; webView.opaque = NO; webView.alpha = 0.8f; webView.backgroundColor = [UIColor clearColor]; [self addSubview:webView]; } return self; } - (void)setFrame:(CGRect)rect { [super setFrame:CGRectMake(0, 0, rect.size.width, 320)]; self.center = CGPointMake(480/2, 320/2); } - (void)layoutSubviews { CGFloat buttonTop; for (UIView *view in self.subviews) { if ([[[view class] description] isEqualToString:@"UIThreePartButton"]) { view.frame = CGRectMake(view.frame.origin.x, self.bounds.size.height - view.frame.size.height - 15, view.frame.size.width, view.frame.size.height); buttonTop = view.frame.origin.y; } } buttonTop -= 7; buttonTop -= 100; webView.frame = CGRectMake(12, 35, self.frame.size.width - 53, 220); NSString* path=[[NSBundle mainBundle] pathForResource:@"default" ofType:@"html"]; NSURL* url=[NSURL fileURLWithPath:path]; [webView loadRequest:[NSURLRequest requestWithURL:url]]; [webView loadRequest: [NSURLRequest requestWithURL:[NSURL URLWithString: [NSString stringWithFormat:RANKING_URL, GAME_ID]]]]; }
    8. 8. Make it!
    9. 9. Twitter @syuhari or #cakematsuri

    ×