使UISlider高度更大? [英] Make UISlider height larger?

查看:89
本文介绍了使UISlider高度更大?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找一种方法让 UISlider 进度条更高,也就是说,增加高度。但是,我没有取得任何成功。我不想使用自定义图像或任何东西,只是让它更高,所以 UISlider 看起来不那么薄。我错过了一些非常明显的东西吗

I've been searching for a way to make the UISlider progress bar taller, that is, increase the height. However, I haven't had any success. I don't want to use a custom image or anything, just make it taller, so the UISlider doesn't look so thin. Am I missing something super obvious?

推荐答案

我找到了我要找的东西。以下方法只需要在子类中进行编辑。

I found what I was looking for. The following method just needs to be edited in a subclass.

- (CGRect)trackRectForBounds:(CGRect)bounds{
    CGRect customBounds = ...
    return customBounds;
}

这篇关于使UISlider高度更大?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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