Suche senden
Hochladen
よこへな3 15発表資料 最近ViewController をどんな感じで書いているか
•
0 gefällt mir
•
1,309 views
Yuichiro Suzuki
Folgen
Technologie
Melden
Teilen
Melden
Teilen
1 von 8
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
Auto Layout Tips
Auto Layout Tips
Kosuke Usami
JavaScript + CSS3を活用して スマートフォンサイト/アプリに 動きを付けてみよう
JavaScript + CSS3を活用して スマートフォンサイト/アプリに 動きを付けてみよう
Hiroaki Wakamatsu
introduction to Marionette.js (jscafe14)
introduction to Marionette.js (jscafe14)
Ryuma Tsukano
XIBで作ったカスタムセルの扱い方
XIBで作ったカスタムセルの扱い方
Satoshi Anai
HTML5で作るスマホブラウザゲーム
HTML5で作るスマホブラウザゲーム
Takumi Ohashi
実践Backbone.Marionette 現場の悩みと解決まで
実践Backbone.Marionette 現場の悩みと解決まで
Ryuma Tsukano
レスポンシブWebデザイン【発展編】
レスポンシブWebデザイン【発展編】
Yasuhito Yabe
公式page改ざんで学ぶjQuery入門 (jscafe7)
公式page改ざんで学ぶjQuery入門 (jscafe7)
Ryuma Tsukano
Empfohlen
Auto Layout Tips
Auto Layout Tips
Kosuke Usami
JavaScript + CSS3を活用して スマートフォンサイト/アプリに 動きを付けてみよう
JavaScript + CSS3を活用して スマートフォンサイト/アプリに 動きを付けてみよう
Hiroaki Wakamatsu
introduction to Marionette.js (jscafe14)
introduction to Marionette.js (jscafe14)
Ryuma Tsukano
XIBで作ったカスタムセルの扱い方
XIBで作ったカスタムセルの扱い方
Satoshi Anai
HTML5で作るスマホブラウザゲーム
HTML5で作るスマホブラウザゲーム
Takumi Ohashi
実践Backbone.Marionette 現場の悩みと解決まで
実践Backbone.Marionette 現場の悩みと解決まで
Ryuma Tsukano
レスポンシブWebデザイン【発展編】
レスポンシブWebデザイン【発展編】
Yasuhito Yabe
公式page改ざんで学ぶjQuery入門 (jscafe7)
公式page改ざんで学ぶjQuery入門 (jscafe7)
Ryuma Tsukano
Enhancements with 3D Touch
Enhancements with 3D Touch
Satoshi Ohki
絶望しない! コミケ
絶望しない! コミケ
Kazutoshi Kashimoto
jQueryで気をつけてほしいこと
jQueryで気をつけてほしいこと
良太 増子
Jsのビルド環境
Jsのビルド環境
fourside
Study Intro Backbone
Study Intro Backbone
Gensei Kawasaki
Apple watch対応アプリのポイントや基本実装・連携tips
Apple watch対応アプリのポイントや基本実装・連携tips
Fumiya Sakai
Effective flutter
Effective flutter
小川 昌吾
Alt01-LT
Alt01-LT
Yuta Hiroto
YUI
YUI
Tatsuya Sasaki
JavaScriptと共に歩いて行く決意をした君へ
JavaScriptと共に歩いて行く決意をした君へ
Muyuu Fujita
SQLアンチパターン読書会 15章 ランダムセレクション 説明資料
SQLアンチパターン読書会 15章 ランダムセレクション 説明資料
Nao Yamamoto
Excel 方眼紙撲滅委員会 活動報告 2012.11 #odstudy
Excel 方眼紙撲滅委員会 活動報告 2012.11 #odstudy
Takeshi Komiya
Alvaro Fides - Use of hierarchical model-view-controller architecture for use...
Alvaro Fides - Use of hierarchical model-view-controller architecture for use...
WTHS
Wellington Residences - Lisa
Wellington Residences - Lisa
nikatherez
Paper María Iglesia - CEIB: A R&D services in bioimaging oriented to integrat...
Paper María Iglesia - CEIB: A R&D services in bioimaging oriented to integrat...
WTHS
Registry of Course Trainers For 2013
Registry of Course Trainers For 2013
sohainstitute
Paper Florencio Cano - Patient data security in a wireless and mobile world
Paper Florencio Cano - Patient data security in a wireless and mobile world
WTHS
The Maori :background
The Maori :background
MRINCON002
Beni Gómez - APTIC a knowledge repository for parents and caregivers of chil...
Beni Gómez - APTIC a knowledge repository for parents and caregivers of chil...
WTHS
عامر عرموش
عامر عرموش
Amer Armoush
Basic html
Basic html
dand_01
Alejandro Gonzalez - An iPhone-based application for promoting type 2 diabeti...
Alejandro Gonzalez - An iPhone-based application for promoting type 2 diabeti...
WTHS
Weitere ähnliche Inhalte
Was ist angesagt?
Enhancements with 3D Touch
Enhancements with 3D Touch
Satoshi Ohki
絶望しない! コミケ
絶望しない! コミケ
Kazutoshi Kashimoto
jQueryで気をつけてほしいこと
jQueryで気をつけてほしいこと
良太 増子
Jsのビルド環境
Jsのビルド環境
fourside
Study Intro Backbone
Study Intro Backbone
Gensei Kawasaki
Apple watch対応アプリのポイントや基本実装・連携tips
Apple watch対応アプリのポイントや基本実装・連携tips
Fumiya Sakai
Effective flutter
Effective flutter
小川 昌吾
Alt01-LT
Alt01-LT
Yuta Hiroto
YUI
YUI
Tatsuya Sasaki
JavaScriptと共に歩いて行く決意をした君へ
JavaScriptと共に歩いて行く決意をした君へ
Muyuu Fujita
SQLアンチパターン読書会 15章 ランダムセレクション 説明資料
SQLアンチパターン読書会 15章 ランダムセレクション 説明資料
Nao Yamamoto
Excel 方眼紙撲滅委員会 活動報告 2012.11 #odstudy
Excel 方眼紙撲滅委員会 活動報告 2012.11 #odstudy
Takeshi Komiya
Was ist angesagt?
(12)
Enhancements with 3D Touch
Enhancements with 3D Touch
絶望しない! コミケ
絶望しない! コミケ
jQueryで気をつけてほしいこと
jQueryで気をつけてほしいこと
Jsのビルド環境
Jsのビルド環境
Study Intro Backbone
Study Intro Backbone
Apple watch対応アプリのポイントや基本実装・連携tips
Apple watch対応アプリのポイントや基本実装・連携tips
Effective flutter
Effective flutter
Alt01-LT
Alt01-LT
YUI
YUI
JavaScriptと共に歩いて行く決意をした君へ
JavaScriptと共に歩いて行く決意をした君へ
SQLアンチパターン読書会 15章 ランダムセレクション 説明資料
SQLアンチパターン読書会 15章 ランダムセレクション 説明資料
Excel 方眼紙撲滅委員会 活動報告 2012.11 #odstudy
Excel 方眼紙撲滅委員会 活動報告 2012.11 #odstudy
Andere mochten auch
Alvaro Fides - Use of hierarchical model-view-controller architecture for use...
Alvaro Fides - Use of hierarchical model-view-controller architecture for use...
WTHS
Wellington Residences - Lisa
Wellington Residences - Lisa
nikatherez
Paper María Iglesia - CEIB: A R&D services in bioimaging oriented to integrat...
Paper María Iglesia - CEIB: A R&D services in bioimaging oriented to integrat...
WTHS
Registry of Course Trainers For 2013
Registry of Course Trainers For 2013
sohainstitute
Paper Florencio Cano - Patient data security in a wireless and mobile world
Paper Florencio Cano - Patient data security in a wireless and mobile world
WTHS
The Maori :background
The Maori :background
MRINCON002
Beni Gómez - APTIC a knowledge repository for parents and caregivers of chil...
Beni Gómez - APTIC a knowledge repository for parents and caregivers of chil...
WTHS
عامر عرموش
عامر عرموش
Amer Armoush
Basic html
Basic html
dand_01
Alejandro Gonzalez - An iPhone-based application for promoting type 2 diabeti...
Alejandro Gonzalez - An iPhone-based application for promoting type 2 diabeti...
WTHS
Presentation finale3 sfr2011
Presentation finale3 sfr2011
larhumato
Audience research
Audience research
sherieallen
Mercedes Serrano - Guía metabólica: empowerment through health 2.0 tools in ...
Mercedes Serrano - Guía metabólica: empowerment through health 2.0 tools in ...
WTHS
Chapter13
Chapter13
MRINCON002
Cintai pangan lokal
Cintai pangan lokal
Yayasan Perempuan Kaisa Indonesia
Question 2 - Evaluation
Question 2 - Evaluation
FayBurmingham
Manuel Armañones - Mesa redonda: Health 2.0
Manuel Armañones - Mesa redonda: Health 2.0
WTHS
New Year’s Eve in New York City
New Year’s Eve in New York City
rogerfranquesa
Buildings by jihad awad
Buildings by jihad awad
Jihad Awad
Professional Innovator Development
Professional Innovator Development
danaclarke
Andere mochten auch
(20)
Alvaro Fides - Use of hierarchical model-view-controller architecture for use...
Alvaro Fides - Use of hierarchical model-view-controller architecture for use...
Wellington Residences - Lisa
Wellington Residences - Lisa
Paper María Iglesia - CEIB: A R&D services in bioimaging oriented to integrat...
Paper María Iglesia - CEIB: A R&D services in bioimaging oriented to integrat...
Registry of Course Trainers For 2013
Registry of Course Trainers For 2013
Paper Florencio Cano - Patient data security in a wireless and mobile world
Paper Florencio Cano - Patient data security in a wireless and mobile world
The Maori :background
The Maori :background
Beni Gómez - APTIC a knowledge repository for parents and caregivers of chil...
Beni Gómez - APTIC a knowledge repository for parents and caregivers of chil...
عامر عرموش
عامر عرموش
Basic html
Basic html
Alejandro Gonzalez - An iPhone-based application for promoting type 2 diabeti...
Alejandro Gonzalez - An iPhone-based application for promoting type 2 diabeti...
Presentation finale3 sfr2011
Presentation finale3 sfr2011
Audience research
Audience research
Mercedes Serrano - Guía metabólica: empowerment through health 2.0 tools in ...
Mercedes Serrano - Guía metabólica: empowerment through health 2.0 tools in ...
Chapter13
Chapter13
Cintai pangan lokal
Cintai pangan lokal
Question 2 - Evaluation
Question 2 - Evaluation
Manuel Armañones - Mesa redonda: Health 2.0
Manuel Armañones - Mesa redonda: Health 2.0
New Year’s Eve in New York City
New Year’s Eve in New York City
Buildings by jihad awad
Buildings by jihad awad
Professional Innovator Development
Professional Innovator Development
Ähnlich wie よこへな3 15発表資料 最近ViewController をどんな感じで書いているか
20121201yidev hirobe iPad miniでRetina
20121201yidev hirobe iPad miniでRetina
Kazuya Hirobe
iOS 9 Bootcamp #6 UIKit
iOS 9 Bootcamp #6 UIKit
Shingo Hiraya
BaseViewControllerは作りたくない
BaseViewControllerは作りたくない
今城 善矩
UI要素を動的に利用する
UI要素を動的に利用する
HideoMiyake
2012 05-19第44回cocoa勉強会発表資料
2012 05-19第44回cocoa勉強会発表資料
OCHI Shuji
RxDataSourceをNSDiffableDataSourceへ置き換える際のTips集紹介
RxDataSourceをNSDiffableDataSourceへ置き換える際のTips集紹介
Fumiya Sakai
試して感覚を掴んでみるUICollectionViewCompositionalLayout & Combine
試して感覚を掴んでみるUICollectionViewCompositionalLayout & Combine
Fumiya Sakai
Css nite(2010.09.23)
Css nite(2010.09.23)
Yoshiki Ushida
Introduction for Browser Side MVC
Introduction for Browser Side MVC
Ryunosuke SATO
iOSのUI構築小技集(小さなとこから始められる編)
iOSのUI構築小技集(小さなとこから始められる編)
Fumiya Sakai
Extra view @ kyobashi.swift
Extra view @ kyobashi.swift
Keisuke Tsukagoshi
Knockout
Knockout
Kazuhiro Eguchi
UIImagePickerController よもやま話
UIImagePickerController よもやま話
Kei Kusakari
Mapkitframework io9week
Mapkitframework io9week
Yuki Hirai
WKWebViewとUIWebView
WKWebViewとUIWebView
Yuki Hirai
iOS WebView App
iOS WebView App
hagino 3000
UIViewController のコンテナ機能
UIViewController のコンテナ機能
Yuichi Fujishige
デザイナーとエンジニアが話す、iOSアプリケーション開発
デザイナーとエンジニアが話す、iOSアプリケーション開発
Kenta Ohsugi
魅せるUIの作り方 | iOS 7エンジニア勉強会
魅せるUIの作り方 | iOS 7エンジニア勉強会
Yahoo!デベロッパーネットワーク
UIViewController in XIB + IBDesignable
UIViewController in XIB + IBDesignable
Fukaya Akifumi
Ähnlich wie よこへな3 15発表資料 最近ViewController をどんな感じで書いているか
(20)
20121201yidev hirobe iPad miniでRetina
20121201yidev hirobe iPad miniでRetina
iOS 9 Bootcamp #6 UIKit
iOS 9 Bootcamp #6 UIKit
BaseViewControllerは作りたくない
BaseViewControllerは作りたくない
UI要素を動的に利用する
UI要素を動的に利用する
2012 05-19第44回cocoa勉強会発表資料
2012 05-19第44回cocoa勉強会発表資料
RxDataSourceをNSDiffableDataSourceへ置き換える際のTips集紹介
RxDataSourceをNSDiffableDataSourceへ置き換える際のTips集紹介
試して感覚を掴んでみるUICollectionViewCompositionalLayout & Combine
試して感覚を掴んでみるUICollectionViewCompositionalLayout & Combine
Css nite(2010.09.23)
Css nite(2010.09.23)
Introduction for Browser Side MVC
Introduction for Browser Side MVC
iOSのUI構築小技集(小さなとこから始められる編)
iOSのUI構築小技集(小さなとこから始められる編)
Extra view @ kyobashi.swift
Extra view @ kyobashi.swift
Knockout
Knockout
UIImagePickerController よもやま話
UIImagePickerController よもやま話
Mapkitframework io9week
Mapkitframework io9week
WKWebViewとUIWebView
WKWebViewとUIWebView
iOS WebView App
iOS WebView App
UIViewController のコンテナ機能
UIViewController のコンテナ機能
デザイナーとエンジニアが話す、iOSアプリケーション開発
デザイナーとエンジニアが話す、iOSアプリケーション開発
魅せるUIの作り方 | iOS 7エンジニア勉強会
魅せるUIの作り方 | iOS 7エンジニア勉強会
UIViewController in XIB + IBDesignable
UIViewController in XIB + IBDesignable
よこへな3 15発表資料 最近ViewController をどんな感じで書いているか
1.
最近ViewControllerを どんな風に書いているか @u16suzu http://u16suzu.hatenablog.com/
2.
自己紹介 • @u16suzu • iOSを仕事で初めて1年と2ヶ月くらい •
Railsもやります. プログラミング大好き!
3.
今日の内容 • xib, story
boardを使わないでコードだけで iOSを 書くときに,どういう風にViewControllerをかいて いるか • 主にビューの描画部分について
4.
- (void)viewDidLoad{ [super viewDidLoad]; ! UIButton*btn
= [UIButton buttonWithType:UIButtonTypeSystem]; btn.frame = CGRectMake(100, 100, 100, 50); [btn setTitle:@"Button" forState:UIControlStateNormal]; [btn sizeToFit]; [self.view addSubview:btn]; UILabel*l = [[UILabel alloc]initWithFrame:CGRectMake(100, 150, 100, 50)]; l.text = @"label"; [self.view addSubview:l]; } 昔 viewDidLoad にコントロールの初期化と位置指定 のコードが全て書いてある
5.
今 コントロールの初期化と位置指定を分けている @interface ViewController () @property
(nonatomic) UIView*titleView; @property (nonatomic) CustomView*customView; @end ! @implementation ViewController - (void)loadView{ [super loadView]; [self.view addSubview:self.titleView]; [self.view addSubview:self.customView]; } ! - (void)viewDidLayoutSubviews{ [super viewDidLayoutSubviews]; CGRect titleViewFrame = CGRectMake(50, 50, 50, 50); self.titleView.frame = titleViewFrame; CGRect customViewFrame = CGRectMake(50, 100, 300, 100); self.customView.frame = customViewFrame; } ! #pragma mark - Views ! - (UIView*)titleView{ if(!_titleView){ _titleView = [UIView new]; _titleView.backgroundColor = [UIColor redColor]; } return _titleView; } ! - (CustomView*)customView{ if(!_customView){ _customView = [CustomView new]; } return _customView; } ! @end プロパティで宣言 アクセッサで初期化 viewDidLayoutSubviews で位置指定 loadViewでaddSubview
6.
改善ポイント • コントロールの位置の変更が容易 • ソースコードが読みやすくなった •
カスタムビューに分割しやすい
7.
- (id)initWithFrame:(CGRect)frame{ self =
[super initWithFrame:frame]; if (self) { [self addSubview:self.firstButton]; } return self; } ! #pragma - Views ! - (void)layoutSubviews{ [super layoutSubviews]; [self.firstButton sizeToFit]; CGRect frame = CGRectMake(0, 0, 60, 30); self.firstButton.frame = frame; } ! - (UIButton*)firstButton{ if(!_firstButton){ _firstButton = [UIButton buttonWithType:UIButtonTypeSystem]; [_firstButton setTitle:@"firstButton" forState:UIControlStateNormal]; } return _firstButton; } 今のカスタムビュー layoutSubviewsで位置指定 initWithFrameで addSubview あとは VCと同じ
8.
以上です!
Jetzt herunterladen