我只是通过修改图像src
并在查找中添加叠加层来修改TVMLCatalog示例附带的showcaseTemplate:
<carousel>
<section>
<lockup>
<img src="${this.BASEURL}resources/images/templates/gft.jpg" width="500" height="600" />
<overlay>
<title>Hello, this is title</title>
</overlay>
</lockup>
</section>
</carousel>
但叠加层没有显示
这是XCODE日志显示的内容:
2015-12-07 11:25:47.851 TVMLCatalog[3953:3684153] #T:[Main] #Notice #SYSTEM : Template element: <IKViewElement: 0x7fcee0781f20>
2015-12-07 11:25:47.858 TVMLCatalog[3953:3684153] #T:[Main] #Notice #SYSTEM : Template controller: <_TVLoadingViewController: 0x7fcee04ba960>
2015-12-07 11:25:47.864 TVMLCatalog[3953:3684153] #T:[Main] #Notice #SYSTEM : Template element: <IKViewElement: 0x7fcee2176a50>
2015-12-07 11:25:47.865 TVMLCatalog[3953:3684153] #T:[Main] #Notice #SYSTEM : Template controller: <_TVShowcaseTemplateController: 0x7fcee0799c90>
Dec 7 11:25:47 TVMLCatalog[3953] <Error>: ImageIO: CreateMetadataFromXMPBufferInternal Threw error #203 (Duplicate property or field node)
Dec 7 11:25:47 TVMLCatalog[3953] <Error>: ImageIO: CreateMetadataFromXMPBufferInternal Threw error #203 (Duplicate property or field node)
2015-12-07 11:25:48.996 TVMLCatalog[3953:3684153] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x7fcee0564910 h=--& v=--& V:[_TVStackingPosterView:0x7fcee051a1e0(46)]>",
"<NSLayoutConstraint:0x7fcee0554000 V:[TVLabel:0x7fcee0561020'Image1'(62)]>",
"<NSLayoutConstraint:0x7fcee0564250 V:|-(0)-[TVLabel:0x7fcee0561020'Image1'] (Names: '|':_TVStackingPosterView:0x7fcee051a1e0 )>",
"<NSLayoutConstraint:0x7fcee0564720 TVLabel:0x7fcee0561020'Image1'.bottom == _TVStackingPosterView:0x7fcee051a1e0.bottom>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fcee0564720 TVLabel:0x7fcee0561020'Image1'.bottom == _TVStackingPosterView:0x7fcee051a1e0.bottom>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
请注意,之前我从未使用过Swift或Objective-C。所以我完全迷失在这里。 任何帮助将非常感谢
答案 0 :(得分:0)
Apple开发人员论坛中的更多信息:
已向Apple提交了几个错误报告。