Instantly share code, notes, and snippets.

What would you like to do?
import Foundation
import UIKit
import SpreadsheetView
class SampleView: UIView {
let label = UILabel(frame: CGRect(x: 0, y: 0, width: 150, height: 50))
private var _txt: String = "This is swift"
override init(frame: CGRect) {
super.init(frame: frame)
self.label.text = "This is SWIFT"
let controller = ViewController();
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
var txt: NSString? {
set {
if newValue != nil {
self._txt = newValue! as String;
self.label.text = self._txt;
get {
return nil;
import Foundation
class SampleViewManager : RCTViewManager {
override func view() -> UIView! {
return SampleView();
#import <Foundation/Foundation.h>
#import <React/RCTView.h>
@interface SampleViewModule : RCTView
@property (nonatomic, assign) NSString *txt;
#import <React/RCTBridgeModule.h>
#import <React/RCTViewManager.h>
#import "SampleViewModule.h"
@interface RCT_EXTERN_MODULE(SampleViewManager, RCTViewManager)
#import "React/RCTViewManager.h"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment