Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
UISlider 框架最小宽度为 22,最小高度为 34。 即使我设置了框架CGRectMake(0,0,1,1),它也无法正确更改。
CGRectMake(0,0,1,1)
UISlider *slider = [[UISlider alloc] init]; slider.frame = CGRectMake(0,0,1,1)
我认为,Apple 将 UISlider 的最小尺寸设为 34。不是 42 而是 34
试试代码:
UISlider *slider = [[UISlider alloc] init]; slider.frame = CGRectMake(0,0,36,36)