This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Playground - noun: a place where people can play | |
// Running in Xcode6-Beta5 | |
import UIKit | |
var delay : NSTimeInterval | |
// best appraoch: use arc4random_uniform (benefit you don't have to seed rand()) | |
delay = NSTimeInterval(arc4random_uniform(900)+100) / 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Playground - noun: a place where people can play | |
import UIKit | |
// delay is type NSTimeInterval (alias for type 'Double') | |
var delay:NSTimeInterval | |
// random number btween 1.0 and 20.0 | |
delay = NSTimeInterval(arc4random_uniform(20)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let openAnimationDuration = 0.5 | |
let numberOfSecondsToPresent = 1 | |
let closeAnimationDuration = 0.5 | |
UIView.animateWithDuration(openAnimationDuration, animations: { | |
// do changes to animate showing the popover here... | |
}, completion: { finished in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="cafe-card"> | |
<h2> {{ name }}</h2> | |
<p>Airy neighborhood coffee house with daily roasted espresso & drip coffee, plus bagels & pastries.</p> | |
<h3>Hours</h3> | |
<p>Mon-Fri: 6:30-8</p> | |
<p>Sat-Sun: 8-8</p> | |
<p>{{ address }}</p> | |
</div> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="cafe-card"> | |
<h2> {{ name }}</h2> | |
<p>Airy neighborhood coffee house with daily roasted espresso & drip coffee, plus bagels & pastries.</p> | |
<h3>Hours</h3> | |
<p>Mon-Fri: 6:30-8</p> | |
<p>Sat-Sun: 8-8</p> | |
<p>{{ address }}</p> | |
</div> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Coffee Finder ☕️ New York</title> | |
</head> | |
<body> | |
<nav> | |
<h1>☕️ Coffee Finder <a >New York</a></h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Not great practice, but for a quick start I like to reset all elements to 1rem */ | |
* { | |
font-size: 1rem; | |
color: #4A4A4A; | |
} | |
h1, h2, h3, h4, h5 { | |
margin: 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="cafe-card"> | |
<h1>Daily Press</h1> | |
<p class="description">Airy neighborhood coffee house with daily roasted espresso & drip coffee, plus bagels & pastries.</p> | |
<dl class="address"> | |
<dt>Address</dt> | |
<dd>505 Franklin Ave, Brooklyn, NY 11238</dd> | |
</dl> | |
<div class="map"></div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>☕️ Coffee Finder New York</title> | |
</head> | |
<body> | |
<nav> | |
<h1>☕️ Coffee Finder <a href="#">New York</a></h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- template code --> | |
<template> | |
<div class="cafe-card"> | |
<h1>Cafe Grumpy</h1> | |
<p class="description">Hip local coffeehouse chain serving a range of house-roasted brews in a relaxed setting.</p> | |
<dl class="address"> | |
<dt>Address</dt> | |
<dd>224 W 20th St, New York, NY 10011</dd> | |
</dl> | |
<div class="map"></div> |
OlderNewer