我想要这个按钮:
<md-button class="md-icon-button">
<md-icon md-svg-src="/icons/ic_create_48px.svg"></md-icon>
</md-button>
放置在图片的左上角:
<img src="{{Img}}" style="width:100%; height:200px;"/>
最好的方法是什么? CSS是否必要?有没有办法在不使用CSS的情况下实现这一目标?
答案 0 :(得分:0)
尝试这样fiddle
Css
<div>
<img src="{{Img}}" style="width:100%; height:200px;"/>
<md-button class="md-icon-button">
<md-icon md-svg-src="/icons/ic_create_48px.svg"></md-icon>
</md-button>
</div>
HTML
if let currentPassDesc = view.currentRenderPassDescriptor,
let currentDrawable = view.currentDrawable
{
let renderCommandEncoder =
commandBuffer.makeRenderCommandEncoder(descriptor: currentPassDesc)
renderCommandEncoder.setRenderPipelineState(renderPipeline)
//set vertex buffers and call draw apis
.......
.......
commandBuffer.present(currentDrawable)
}