This file contains hidden or 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
# launch app in the simulator | |
xcrun simctl launch "iPhone 11 Pro Max" com.ihak.Example |
This file contains hidden or 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
# instal app in the simulator | |
xcrun simctl install \ | |
"iPhone 11 Pro Max" \ | |
./build/Build/Products/Debug-iphonesimulator/Example.app |
This file contains hidden or 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
# if you have a project | |
xcodebuild -project Example.xcodeproj \ | |
-scheme Example \ | |
-configuration Debug \ | |
-destination 'platform=iOS Simulator,name=iPhone 11 Pro Max,OS=13.1' \ | |
-derivedDataPath build | |
# if you have a workspace | |
xcodebuild -workspace Example.xcworkspace \ | |
-scheme Example \ |
This file contains hidden or 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
#!/bin/bash | |
# Clean the build | |
rm -rf ./build | |
# Build the project | |
xcodebuild -project \ | |
Example.xcodeproj \ | |
-scheme Example \ | |
-configuration Debug \ |
This file contains hidden or 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
// This is a class method that instantiates the MealListingVC | |
// using the Meal storyboard in which it resides | |
// with the "MealListingVC" storyboard identifier | |
static func instantiate() -> MealListingVC? { | |
return Storyboard.Meal.viewController(withIdentifier: "MealListingVC") as? MealListingVC | |
} |
This file contains hidden or 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
enum Storyboard: String { | |
case Main, Meal | |
var instance: UIStoryboard { | |
return UIStoryboard(name: self.rawValue, bundle: nil) | |
} | |
// Instantiates the default initial | |
// viewcontroller for current storybaord | |
func initialViewController() -> UIViewController? { |
This file contains hidden or 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
render() { | |
const ratingObj = { | |
ratings: 3, | |
views: 34000 | |
} | |
return ( | |
<View style={styles.container}> | |
<StarRating ratingObj={ratingObj}/> | |
</View> |
This file contains hidden or 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
render() { | |
// Recieve the ratings object from the props | |
let ratingObj = this.props.ratingObj; | |
return ( | |
<View style={ styles.container }> | |
<Image | |
style={styles.image} | |
source={require('./star-filled.png')} |
This file contains hidden or 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
render() { | |
// Recieve the ratings object from the props | |
let ratingObj = this.props.ratingObj; | |
// This array will contain our star tags. We will include this | |
// array between the view tag. | |
let stars = []; | |
// Loop 5 times | |
for (var i = 1; i <= 5; i++) { | |
// Set the path to filled stars |
This file contains hidden or 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 React, { Component } from 'react'; | |
import { | |
StyleSheet, | |
View, | |
Text | |
} from 'react-native'; | |
type Props = { | |
}; |
NewerOlder