Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storyboards Support #219

Open
PanayotCankov opened this issue Jul 13, 2015 · 6 comments
Open

Storyboards Support #219

PanayotCankov opened this issue Jul 13, 2015 · 6 comments

Comments

@PanayotCankov
Copy link
Contributor

Provide support for using Xcode IB with Storyboard and JavaScript for controllers.

This feature will involve generation of Objective-C headers out of the application JavaScript files so that the Xcode's IB can be used for the UI. As directions - we can use TypeScript with out TypeScript definitions (or another language service that is capable of providing static analysis of the JavaScript).

It should integrate with a "live-sync" like solution that will enable watchers on the JavaScript files to regenerate the headers files on save for easier workflow.

It will have certain known limitations. For example dragging a button from the IB on the header to create an IBOutlet may not work since the generated property in the header may not be generated back in the JavaScript.

@fealebenpae
Copy link
Contributor

the generated property in the header may not be generated back in the JavaScript

Analyze the header with Clang and insert the property declaration in JavaScript.

@PanayotCankov
Copy link
Contributor Author

👍 We'll do our best.

@TheBrousse
Copy link

I believe a minimum viable product would be where the developer would have to name his actions and outlets properly in the JavaScript file. And the linking feature would be executed only at compile time.

If the variable (action, outlet, etc.) is not declared, the compilation should simply fail with a useable error message.

Something like:
IBOutlet "myNewButton" is not defined in JavaScript source file "win.ios.js"

As time progresses and the tooling improves, we can help developers by generating these variables for them. Or even checking them when the file is saved (as @PanayotCankov suggested)

@PanayotCankov
Copy link
Contributor Author

Well, if you have to write the header files by hand and have to name the actions and outlets properly in the JavaScript file, and can get the errors at run-time instead of compile-time then we currently support Storyboards.

Would you like me to write out an article about what and how Storyboards are supported and give it a try. After that we can decide whether its satisfactory or identify areas for improvement.

@TheBrousse
Copy link

Yes, that would be great. I think the goal here is to show the power of all you can do with {N} and that such things are possible.

Once developer actually use this feature, it will be easier to determine how it can be improved with the tooling.

@jasssonpet
Copy link
Contributor

I just want to reference our Gameraww example in this issue, which uses a storyboard: https://github.com/NativeScript/ios-runtime/tree/master/examples/Gameraww

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants