-
-
Notifications
You must be signed in to change notification settings - Fork 241
Closed
Description
I am trying to add UILabel
returned from a cocoapods library in place of a placeholder
{N} element. As a simple test/experiment I created the label within the creatingView()
event as show below,
public creatingView(e: any) {
var nativeLabel = new UILabel(CGRectMake(10,30, 200, 60));
nativeLabel.text = "Native";
console.log(e.object); // Placeholder(8)
console.log(e.view); // undefined
e.view = nativeLabel;
console.log(e.view); //<UILabel: 0x7a942e60; frame = (0 0; 200 60); text = 'Native'; userInteractionEnabled = NO; layer = <_UILabelLayer: 0x7a9438a0>>`
}
// My template
<Label text="above the placeholder"></Label>
<Placeholder (creatingView)="creatingView($event)"></Placeholder>
<Label text="below the placeholder"></Label>
e.view = nativeLabel; //<UILabel: 0x7a942e60; frame = (0 ...
Though the placeholder seems to have updated with the UILabel the simulator does not show it. Any thoughts?
Metadata
Metadata
Assignees
Labels
No labels