public override void TappedLinkAttribute(ASTextNode textNode, string attribute, NSObject value, CGPoint point, NSRange textRange) { var launcherService = Dependencies.Container.Resolve <ILauncherService>(); launcherService.OpenUrl(((NSUrl)value).AbsoluteString); }
public InfoMessageNode(ChatMessageViewModel viewModel) { _infoTextNode = new ASTextNode(); var attributedInfoText = viewModel?.Body.BuildAttributedString() .Font(UIFont.SystemFontOfSize(11, UIFontWeight.Semibold)) .Foreground(UIColor.FromRGB(141, 141, 141)); _infoTextNode.AttributedText = attributedInfoText; SelectionStyle = UITableViewCellSelectionStyle.None; AutomaticallyManagesSubnodes = true; SetNeedsLayout(); }
public override void ViewDidLoad() { base.ViewDidLoad(); View.BackgroundColor = UIColor.White; var viewSize = View.Frame.Size; DispatchQueue.DefaultGlobalQueue.DispatchAsync(() => { var node = new ASTextNode(); node.AttributedString = new NSAttributedString("hello"); node.Measure(viewSize); node.Frame = new CGRect(new CGPoint(10,40), node.CalculatedSize); DispatchQueue.MainQueue.DispatchAsync(() => View.AddSubview(node.View)); }); }
public override void ViewDidLoad() { base.ViewDidLoad(); View.BackgroundColor = UIColor.White; var viewSize = View.Frame.Size; DispatchQueue.DefaultGlobalQueue.DispatchAsync(() => { var node = new ASTextNode(); node.AttributedString = new NSAttributedString("hello"); node.Measure(viewSize); node.Frame = new CGRect(new CGPoint(10, 40), node.CalculatedSize); DispatchQueue.MainQueue.DispatchAsync(() => View.AddSubview(node.View)); }); }
public override bool ShouldHighlightLinkAttribute(ASTextNode textNode, string attribute, NSObject value, CGPoint point) { return(true); }