Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Hartani Yassir Yassir4

🎯
Focusing
Block or report user

Report or block Yassir4

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Yassir4
Yassir4 / resetXcode.sh
Created Oct 9, 2019 — forked from maciekish/resetXcode.sh
Reset Xcode. Clean, clear module cache, Derived Data and Xcode Caches. You can thank me later.
View resetXcode.sh
#!/bin/bash
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode/*
open /Applications/Xcode.app
View index.js
export const pushScreen = props => {
const { componentId } = props;
Navigation.push(componentId, {
component: {
name: 'PushedScreen',
},
});
};
export const openModal = () => {
@Yassir4
Yassir4 / index.js
Created Aug 13, 2019
export navigation functions Navigation/index.js
View index.js
export const pushScreen = props => {
const { componentId } = props;
Navigation.push(componentId, {
component: {
name: 'PushedScreen',
},
});
};
export const openModal = () => {
@Yassir4
Yassir4 / styles.js
Created Aug 4, 2019
ModalScreen/styles.js
View styles.js
// ModalScreen/styles.js
import {StyleSheet} from 'react-native';
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'skyblue',
},
@Yassir4
Yassir4 / index.js
Created Aug 4, 2019
ModalScreen/index.js
View index.js
// ModalScreen/index.js
import React, {Component} from 'react';
import {View, Text, TouchableOpacity} from 'react-native';
import {Navigation} from 'react-native-navigation';
import styles from './styles';
class ModalScreen extends Component {
constructor(props) {
super(props);
Navigation.events().bindComponent(this);
@Yassir4
Yassir4 / index.js
Last active Aug 4, 2019
Home/index.js
View index.js
import React from 'react';
import {View, Text, TouchableOpacity} from 'react-native';
import {Navigation} from 'react-native-navigation';
import styles from './styles';
const pushScreen = props => {
const {componentId} = props;
Navigation.push(componentId, {
component: {
name: 'PushedScreen',
View index.js
// PushedScreen/index.js
import React from 'react';
import {View, Text, TouchableOpacity} from 'react-native';
import {Navigation} from 'react-native-navigation';
import styles from './styles';
const goBack = ({componentId}) => Navigation.pop(componentId);
const PushedScreen = props => {
return (
<View style={styles.container}>
@Yassir4
Yassir4 / styles.js
Created Jul 31, 2019
PushedScreen styles
View styles.js
import {StyleSheet} from 'react-native';
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'skyblue',
},
headerText: {
@Yassir4
Yassir4 / index.js
Created Jul 31, 2019
PushScreen component
View index.js
import React from 'react';
import {View, Text, TouchableOpacity} from 'react-native';
import styles from './styles';
const PushedScreen = props => {
return (
<View style={styles.container}>
<Text style={styles.headerText}>Pushed Screen</Text>
<TouchableOpacity style={styles.backButton}>
<Text style={styles.backButtonText}>Go Back</Text>
View index.js
import React from 'react';
import {View, Text, TouchableOpacity} from 'react-native';
import {Navigation} from 'react-native-navigation';
import styles from './styles';
const pushScreen = props => {
const {componentId} = props;
Navigation.push(componentId, {
component: {
name: 'PushedScreen',
You can’t perform that action at this time.