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 | |
enum CustomColors: AppColor { | |
case primary, secondary | |
var light: UIColor { | |
switch self { | |
case .primary: return UIColor(red: 0, green: 0.8, blue: 0.69, alpha: 1) | |
case .secondary: return UIColor(red: 219/255, green: 230/255, blue: 228/255, alpha: 1.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
import UIKit | |
protocol AppColor { | |
var light: UIColor { get } | |
var dark: UIColor { get } | |
var fallbackColorBeforiOS13: UIColor { get } | |
func color() -> UIColor | |
} | |
extension AppColor { |
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
// swift-tools-version:5.1 | |
// The swift-tools-version declares the minimum version of Swift required to build this package. | |
import PackageDescription | |
let package = Package( | |
name: "MyFramework", | |
products: [ | |
// Products define the executables and libraries produced by a package, and make them visible to other packages. | |
.library( |
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 SwiftUI | |
struct CountDownView : View { | |
@State var nowDate: Date = Date() | |
let referenceDate: Date | |
var timer: Timer { | |
Timer.scheduledTimer(withTimeInterval: 1, repeats: true) {_ in | |
self.nowDate = Date() | |
} |
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
package com.reactnativehelpers.reactpresenter; | |
import android.content.Intent; | |
import android.net.Uri; | |
import android.os.Build; | |
import android.os.Bundle; | |
import android.provider.Settings; | |
import android.support.v7.app.AppCompatActivity; | |
import android.transition.Slide; | |
import android.view.Gravity; |
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
package com.reactnativehelpers.reactpresenter.presentingPackage; | |
import com.facebook.react.bridge.ReactApplicationContext; | |
import com.facebook.react.bridge.ReactContextBaseJavaModule; | |
import com.facebook.react.bridge.ReactMethod; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class PresentingNative extends ReactContextBaseJavaModule { |
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
package com.reactnativehelpers.reactpresenter.presentingPackage; | |
import com.facebook.react.ReactPackage; | |
import com.facebook.react.bridge.NativeModule; | |
import com.facebook.react.bridge.ReactApplicationContext; | |
import com.facebook.react.uimanager.ViewManager; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; |
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 MyViewController: UIViewController, ReactPresenter { | |
... | |
@IBAction func didTapOnShowReactButton(_ sender: Any) { | |
self.showReactViewController(moduleName: "MyReactApp", | |
jsFileName: "main") | |
} | |
... |
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
#ifndef Login_Bridging_Header_h | |
#define Login_Bridging_Header_h | |
#import <React/RCTBridgeModule.h> | |
#endif /* Login_Bridging_Header_h */ |
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
source 'https://github.com/react-native-helpers/Specs.git' | |
source 'https://github.com/CocoaPods/Specs.git' | |
target 'LoginDemo' do | |
use_frameworks! | |
pod 'Login', path: '../' | |
# Pods for ValkyrieDemo | |
target 'LoginDemoTests' do |