SlideShare a Scribd company logo
CakePHP in iPhone Application


        Akihiro Matsuura@syuhari
About Me
•
• Blog : Sun Limited Mt.
        http://www.syuhari.jp/blog/

• Twitter : @syuhari
Questionnaire
iPhone Application




 Web Application   Native Application
CakePHP in iPhone App
Ranking System by CakePHP
•
•
•            Today, Week, Total)

•        Pagination)
CakePHP in iPhone App
- (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]]]];
}
Make it!
Twitter

  @syuhari
     or
#cakematsuri

More Related Content

PPTX
лукьянченко л.а. пос 10а
PDF
סרג' קרול
PDF
Codigo123
KEY
Barcamp GoogleMaps - praktické ukázky kódu
PDF
まよいの墓(WebVR編)
KEY
iPhone/iPad开发讲座 第五讲 定制视图和多点触摸
лукьянченко л.а. пос 10а
סרג' קרול
Codigo123
Barcamp GoogleMaps - praktické ukázky kódu
まよいの墓(WebVR編)
iPhone/iPad开发讲座 第五讲 定制视图和多点触摸

What's hot (10)

PPTX
Obscure Wordpress Functions That Are Actually Quite Useful
PDF
Django Show
PDF
Gkm referral program
PDF
Angular in the Enterprise
PDF
Parceiros tkd
PDF
GSS FED 別亂來交給我們來 Bear
PDF
An Impromptu Introduction to HTML5 Canvas
PDF
第四屆程式碼研習高峰會 Vue.js
DOCX
Aalifassura 170209203254
PDF
Get Moving! (with HTML5 canvas)
Obscure Wordpress Functions That Are Actually Quite Useful
Django Show
Gkm referral program
Angular in the Enterprise
Parceiros tkd
GSS FED 別亂來交給我們來 Bear
An Impromptu Introduction to HTML5 Canvas
第四屆程式碼研習高峰會 Vue.js
Aalifassura 170209203254
Get Moving! (with HTML5 canvas)
Ad

Similar to CakePHP in iPhone App (20)

PDF
Synchronizing without internet - Multipeer Connectivity (iOS)
PDF
Курсы по мобильной разработке под iOS. 4 лекция. Возможности телефона
PDF
Leaving Interface Builder Behind
PDF
HTML5 & The Open Web - at Nackademin
KEY
Desenvolvimento iOS - Aula 4
KEY
CocoaHeads Toulouse - Guillaume Cerquant - UIView
KEY
I phone勉強会 (2011.11.23)
PDF
Hızlı Cocoa Geliştirme (Develop your next cocoa app faster!)
KEY
UIWebView Tips
TXT
Li How To2 10
PDF
303 TANSTAAFL: Using Open Source iPhone UI Code
PDF
iOS 7 SDK特訓班
PDF
Formacion en movilidad: Conceptos de desarrollo en iOS (III)
PDF
Cocoa Heads Tricity - Design Patterns
DOCX
Borrador del blog
PDF
Intro to HTML5
PDF
Conceitos e prática no desenvolvimento iOS - Mobile Conf 2014
PDF
I os 04
PDF
MOPCON 2014 - Best software architecture in app development
Synchronizing without internet - Multipeer Connectivity (iOS)
Курсы по мобильной разработке под iOS. 4 лекция. Возможности телефона
Leaving Interface Builder Behind
HTML5 & The Open Web - at Nackademin
Desenvolvimento iOS - Aula 4
CocoaHeads Toulouse - Guillaume Cerquant - UIView
I phone勉強会 (2011.11.23)
Hızlı Cocoa Geliştirme (Develop your next cocoa app faster!)
UIWebView Tips
Li How To2 10
303 TANSTAAFL: Using Open Source iPhone UI Code
iOS 7 SDK特訓班
Formacion en movilidad: Conceptos de desarrollo en iOS (III)
Cocoa Heads Tricity - Design Patterns
Borrador del blog
Intro to HTML5
Conceitos e prática no desenvolvimento iOS - Mobile Conf 2014
I os 04
MOPCON 2014 - Best software architecture in app development
Ad

More from Akihiro Matsuura (16)

PDF
SQLite の暗号化
PDF
SQLite の暗号化
PDF
Cocos2d-x Console @Cocos Talks #3
PDF
Cocos2d-x でのクラウドサービス活用方法 - 週刊アスキーセミナー
PDF
Cocos2d-xを用いたゲームアプリ「めちゃギントン」開発の裏側
PDF
Cocos2dx Tips - Box2d, Normal mapping
PDF
Cocos2d-x ver.3 開発の効率化
PDF
Cocos2d-x によるスマートフォンアプリ開発のこれまでとこれから
PDF
SimpleAudioEngine のカスタマイズ
PDF
Yidev cocos2dx
PDF
cocos2d-x 開発の効率化
PDF
What I talk about When I talk about Cocos2d-x
KEY
Cocos2dx tips
KEY
Cocos2dx 基本編
KEY
Cocos2dx 勉強会
PDF
cocos2d で遊ぼう
SQLite の暗号化
SQLite の暗号化
Cocos2d-x Console @Cocos Talks #3
Cocos2d-x でのクラウドサービス活用方法 - 週刊アスキーセミナー
Cocos2d-xを用いたゲームアプリ「めちゃギントン」開発の裏側
Cocos2dx Tips - Box2d, Normal mapping
Cocos2d-x ver.3 開発の効率化
Cocos2d-x によるスマートフォンアプリ開発のこれまでとこれから
SimpleAudioEngine のカスタマイズ
Yidev cocos2dx
cocos2d-x 開発の効率化
What I talk about When I talk about Cocos2d-x
Cocos2dx tips
Cocos2dx 基本編
Cocos2dx 勉強会
cocos2d で遊ぼう

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Big Data Technologies - Introduction.pptx
PDF
Encapsulation theory and applications.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
sap open course for s4hana steps from ECC to s4
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Approach and Philosophy of On baking technology
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Diabetes mellitus diagnosis method based random forest with bat algorithm
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Spectral efficient network and resource selection model in 5G networks
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Big Data Technologies - Introduction.pptx
Encapsulation theory and applications.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Unlocking AI with Model Context Protocol (MCP)
sap open course for s4hana steps from ECC to s4
“AI and Expert System Decision Support & Business Intelligence Systems”
Digital-Transformation-Roadmap-for-Companies.pptx
20250228 LYD VKU AI Blended-Learning.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Understanding_Digital_Forensics_Presentation.pptx
Approach and Philosophy of On baking technology
Programs and apps: productivity, graphics, security and other tools
How UI/UX Design Impacts User Retention in Mobile Apps.pdf

CakePHP in iPhone App

  • 1. CakePHP in iPhone Application Akihiro Matsuura@syuhari
  • 2. About Me • • Blog : Sun Limited Mt. http://www.syuhari.jp/blog/ • Twitter : @syuhari
  • 4. iPhone Application Web Application Native Application
  • 6. Ranking System by CakePHP • • • Today, Week, Total) • Pagination)
  • 8. - (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]]]]; }
  • 10. Twitter @syuhari or #cakematsuri

Editor's Notes

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