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
override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | |
//1. Make sure you are using the correct segue | |
if segue.identifier == "ShowNameSegue" { | |
//2. Get the instance of your detail view from the segue's destination | |
//3. Get the index path for the row that the user tapped | |
if let detailViewController = segue.destination as? NameDetailViewController, | |
let indexPath = tableView.indexPathForSelectedRow { | |
//4. Initialize the word with indexPath |
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
import UIKit | |
class NameDetailViewController: UIViewController { | |
var name: String? | |
@IBOutlet var NameLabel: UILabel! | |
override func viewDidLoad() { | |
super.viewDidLoad() |
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
import UIKit | |
var names = ["Harry Potter", "Hermoine Granger", "Ron Weasley", "Albus Dumbledore", "Draco Malfoy"] | |
class NameTableViewController: UITableViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
} |
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
FTypeError: Cannot read property 'title' of null | |
at Topic.findOne.then (/Users/clmaciel/bloc/bloccit/spec/integration/topics_spec.js:215:20) | |
at tryCatcher (/Users/clmaciel/bloc/bloccit/node_modules/bluebird/js/release/util.js:16:23) | |
at Promise._settlePromiseFromHandler (/Users/clmaciel/bloc/bloccit/node_modules/bluebird/js/release/promise.js:512:31) | |
at Promise._settlePromise (/Users/clmaciel/bloc/bloccit/node_modules/bluebird/js/release/promise.js:569:18) | |
at Promise._settlePromise0 (/Users/clmaciel/bloc/bloccit/node_modules/bluebird/js/release/promise.js:614:10) | |
at Promise._settlePromises (/Users/clmaciel/bloc/bloccit/node_modules/bluebird/js/release/promise.js:693:18) | |
at Async._drainQueue (/Users/clmaciel/bloc/bloccit/node_modules/bluebird/js/release/async.js:133:16) | |
at Async._drainQueues (/Users/clmaciel/bloc/bloccit/node_modules/bluebird/js/release/async.js:143:10) | |
at Immediate.Async.drainQueues (/Users/clmaciel/bloc/bloccit/node_modules/bluebird/js/release/async.js:17:1 |
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
App.defaultProps = { | |
instructors: [ | |
{ | |
id: 0, | |
name: "Michael", | |
avatar: | |
"https://www.rithmschool.com/content/react_fundamentals/michael.jpg", | |
hobby: "hiking" | |
}, | |
{ |
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
class Person extends React.Component { | |
render() { | |
var age = this.props.age; | |
var message = ""; | |
if (age >= 21 ){ | |
message = "Have a Drink!" | |
} else { | |
message = "You must be 21" | |
} | |
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
class App extends React.Component { | |
render() { | |
return ( | |
<div> | |
<h1>Hello JSX and the World!</h1> | |
</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
class App extends React.Component { | |
render() { | |
return ( | |
<div> | |
<h1>Here is my first React App!</h1> | |
</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
id | title | author | |
------+------------------------------------------+--------------------- | |
1259 | Eloquent Ruby | Russell A. Olson | |
1593 | JavaScript: The Good Parts | Douglas Crockford | |
8982 | Designing Object-Oriented Software | Rebecca Wirfs-Brock | |
7265 | Practical Object-Oriented Design in Ruby | Sandi Metz |
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
id | title | author | |
------+------------------------------------------+--------------------- | |
1259 | Eloquent Ruby | Russell A. Olson | |
1593 | JavaScript: The Good Parts | Douglas Crockford | |
8982 | Designing Object-Oriented Software | Rebecca Wirfs-Brock | |
7265 | Practical Object-Oriented Design in Ruby | Sandi Metz |