NativeScript: Cannot get nativeView from N view (iOS)
I am loading a {N} view from a file using Loader:
var view = builder.load({
path: "~/Views/Slides",
name: "slider-view"
});
Then i need to convert this view to UIView to add it programmatically to another UIView:
var obj = <any>view;
obj._onAttached();
viewController.view = obj.ios;
Doing some debugging i can see that obj._subViews contains the {N} UI elements but i get a white screen.
It seems obj.ios, obj._view and obj._nativeView are null at this point.
Any ideas?
I am using the same in Android and it works with the difference that in android i am passing context to _onAttached.
obj._onAttached(application.android.currentContext);
container.addView(obj.android);
In this case obj.android contains the native view.
Thanks.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 22 (6 by maintainers)
@3rror404 You can use the build-in functionality of Xcode for this. Examining the View Hierarchy