玩具熊回家路

最后更新于 2023年06月08日

分类: 喜剧 地区: 捷克 年份:2010 

类型:喜剧 家庭 

状态:HD高清

导演:扬·斯维拉克 

主演:兹旦内克·斯维拉克/帕沃·里斯卡/Jirí·Machácek/Petr·/

又名:酷奇小熊回家记/Kuky回家/库奇/Kooky

2010/捷克/喜剧,家庭

豆瓣评分:7.1分

聚合云播

排序

玩具熊回家路剧情简介

" let dic = ToolsHelper.parserRichText(txt: storyText) DispatchQueue.main.async { self.richTextBox.attributedText = dic["attributedText"] as? NSAttributedString self.contentHeight = dic["height"] as? CGFloat ?? 0 self.contentWidth = dic["width"] as? CGFloat ?? 0 self.updateAttributedString() } } let tag = 200 DispatchQueue.global().asyncAfter(deadline: DispatchTime.now() 1) { let subView = self.view.viewWithTag(tag) if subView != nil { subView?.removeFromSuperview() } } } // 编辑文本 func editText(txt: String) -> Void { let tags = [RichTextTag.Bold: "strong", RichTextTag.Italic: "em", RichTextTag.Underline: "ul", RichTextTag.Deleteline: "del"] var result = "" var otherTxt = txt for item in tags.keys { var tagStart = "", tagEnd = "" if otherTxt.contains(item.begin) && otherTxt.contains(item.end) { tagStart = "<(tags[item] ?? "")>" otherTxt.components(separatedBy: item.begin)[1] tagEnd = tagStart.components(separatedBy: item.end)[0] "" tagEnd tagStart = otherTxt.components(separatedBy: item.begin)[0] tagStart tagEnd = otherTxt.components(separatedBy: item.end)[1] tagEnd } if (tagStart == "") { continue } result = tagStart otherTxt = tagEnd } result = otherTxt print(result) } // 更新AttributedString func updateAttributedString() -> Void { let attributedtext = NSMutableAttributedString(attributedString: richTextBox.attributedText) let attr = attributedtext.attributes(at: 0, longestEffectiveRange: nil, in: NSRange(location: attributedtext.length - 1, length: 1)) let b = (contentHeight 20) > self.view.frame.height let font = UIFont.systemFont(ofSize:Config.TEMPMENUSIZE (b ? -1 : 1)) let paragraphyStyle = NSMutableParagraphStyle() paragraphyStyle.lineSpacing = 5 paragraphyStyle.lineBreakMode = .byTruncatingTail attributedtext.addAttribute(.paragraphStyle, value: paragraphyStyle, range: NSRange(location: 0, length: attributedtext.length)) attributedtext.addAttribute(.font, value: font, range: NSRange(location: 0, length: attributedtext.length)) for item in attr.keys { attributedtext.removeAttribute(item, range: NSRange(location: attributedtext.length - 1, length: 1)) } let constraints = [NSLayoutConstraint(item: view, attribute: .leading, relatedBy: .equal, toItem: view, attribute: .leading, multiplier: 1, constant: 10), NSLayoutConstraint(item: view, attribute: .trailing, relatedBy: .equal, toItem: view, attribute: .trailing, multiplier: 1, constant: -10), NSLayoutConstraint(item: view, attribute: .top, relatedBy: .equal, toItem: view, attribute: .top, multiplier: 1, constant: 10), NSLayoutConstraint(item: view, attribute: .bottom, relatedBy: .equal, toItem: view, attribute: .bottom, multiplier: 1, constant: -10)] let width = view.frame.width - 20 for constraint in constraints { switch constraint.firstAttribute { case .trailing: constraint.constant = width case .leading: constraint.constant = width default:break } } view.addConstraints(constraints) }}

猜你喜欢

傻冒经理

1988/大陆/喜剧

孩子他爸

2004/美国/喜剧

外国佬

2018/美国/澳大利亚/喜剧,动作,犯罪

噢,露西!

2017/日本/美国/剧情,喜剧