Slide 1

Slide 1 text

BY-NC-SA 31 mars 2010 - iPhone + iPad DevCamp Qc Développement Web sur iPhone HTML, CSS et Javascript Rémi Prévost, iXmédia inc.

Slide 2

Slide 2 text

Mobile Safari

Slide 3

Slide 3 text

HTML CSS Javascript Flash No Flash, LOL.

Slide 4

Slide 4 text

} HTML CSS Javascript HTML 5

Slide 5

Slide 5 text

HTML

Slide 6

Slide 6 text

Nouveaux éléments HTML header footer nav section article time figure hgroup progress audio video

Slide 7

Slide 7 text

video HTML › Nouveaux éléments

Slide 8

Slide 8 text

Nouveaux attributs HTML required contenteditable placeholder role autofocus

Slide 9

Slide 9 text

placeholder HTML › Nouveaux attributs

Slide 10

Slide 10 text

Nouveaux types de champs HTML search email tel range url datetime month color time number

Slide 11

Slide 11 text

email et number HTML › Nouveaux types de champs

Slide 12

Slide 12 text

Meta-données HTML viewport format-detection apple-touch-icon apple-touch-startup-image apple-mobile-web-app-capable apple-mobile-web-app-status-bar-style

Slide 13

Slide 13 text

viewport HTML › Méta-données iPhone

Slide 14

Slide 14 text

format-detection HTML › Méta-données iPhone

Slide 15

Slide 15 text

apple-touch-icon HTML › Méta-données iPhone

Slide 16

Slide 16 text

apple-touch-startup-image HTML › Méta-données iPhone

Slide 17

Slide 17 text

HTML › Méta-données iPhone apple-mobile-web-app-capable

Slide 18

Slide 18 text

HTML › Méta-données iPhone apple-mobile-web-status-bar- style

Slide 19

Slide 19 text

CSS WebKit

Slide 20

Slide 20 text

-webkit-border-radius CSS -webkit-border-radius: 1em;

Slide 21

Slide 21 text

-webkit-transform: rotate(90deg) scale(1.5); -webkit-transform CSS

Slide 22

Slide 22 text

Source : ledevoir.com -webkit-box-shadow CSS -webkit-box-shadow: 9px 9px 30px rgba(255,0,255,0.9);

Slide 23

Slide 23 text

OMG text-shadow CSS text-shadow: 15px 15px 2px #ffff66;

Slide 24

Slide 24 text

@font-face CSS @font-face { font-family: 'Megalopolis'; src: url('Megalopolis.svg#MegalopolisExtra') format('svg'); } h1 { font-family: 'Megalopolis'; }

Slide 25

Slide 25 text

@font-face CSS

Slide 26

Slide 26 text

-webkit-tap-highlight-color CSS propriété non-déclarée -webkit-tap-highlight-color: rgba(255,0,0,0.5);

Slide 27

Slide 27 text

Javascript

Slide 28

Slide 28 text

ontouchstart ontouchmove ontouchend ontouchcancel Nouveaux événements Javascript

Slide 29

Slide 29 text

ongesturestart ongesturechange ongestureend Nouveaux événements Javascript

Slide 30

Slide 30 text

onorientationchange Nouveaux événements Javascript window.onorientationchange = function() { alert(window.orientation); // 0, 90, -90 ou 180 };

Slide 31

Slide 31 text

Événements supportés différemment Javascript onmouseover onmousemove onmousedown onmouseup onclick

Slide 32

Slide 32 text

Événements supportés différemment Javascript onfocus onblur

Slide 33

Slide 33 text

Événements non supportés Javascript oncut oncopy onpaste onselection

Slide 34

Slide 34 text

Événements non supportés Javascript ondrag ondrop

Slide 35

Slide 35 text

Géolocalisation : obtenir la position Javascript navigator .geolocation .getCurrentPosition(function(p) { alert(p.coords.latitude+', '+p.coords.longitude); });

Slide 36

Slide 36 text

Géolocalisation : obtenir la position Javascript

Slide 37

Slide 37 text

Géolocalisation : surveiller le changement de position Javascript navigator .geolocation .watchPosition(function(p) { alert(p.coords.latitude+', '+p.coords.longitude); });

Slide 38

Slide 38 text

Stockage : sauvegarder des données en local Javascript localStorage.setItem('foo', 'bar'); localStorage.getItem('foo'); // 'bar' localStorage['foo'] = 'bar'; localStorage['foo']; // 'bar' localStorage.clear();

Slide 39

Slide 39 text

Stockage : sauvegarder des données en local Javascript

Slide 40

Slide 40 text

c = document.getElementById('toile').getContext('2d'); c.fillStyle = "#f00"; c.fillRect(10,10,100,100); Canvas : créer des éléments graphiques Javascript

Slide 41

Slide 41 text

Canvas : créer des éléments graphiques Javascript

Slide 42

Slide 42 text

} HTML CSS Javascript HTML 5

Slide 43

Slide 43 text

Code source github.com/remiprev/iphonedevcampqc En action iphonedevcampqc.exomel.com Twitter : @remi