如何使用角上的关闭按钮创建视图? [英] How to create view with close button above the corner?

查看:53
本文介绍了如何使用角上的关闭按钮创建视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常如何使用左上角的按钮创建视图以创建类似图片上显示的视图的东西?

How do you usually create views with button in top-left corner to create something like view presented at the picture?

我是否必须简单地将按钮与图像一起放置在拐角处?还是有一些最好的做法? :)只是想知道。

Do I have to simply place button with image over the corner? Or there are some best pratices? :) Just wondering.

推荐答案

您将放置按钮的偏移量,如-10 (如果按钮约为30x30) 表示X和Y。

You will place the offset of the button like -10 (if your button is around 30x30) for X and Y.

在您的示例中,它看起来像 Pro Switcher ,只需查看那里的源代码,看看他是如何做到的。

In your example, that looks like Pro Switcher, just look at the source there and see how he has done it.

这篇关于如何使用角上的关闭按钮创建视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆