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.
我正在开发一个应用程序。我需要在段控件中为段设置图像。所以请告诉我如何做那个。
使用 [segmentedControl setImage: forSegmentAtIndex: ]; 方法
[segmentedControl setImage: forSegmentAtIndex: ];
只需为索引设置一个图像
[segmentedC setImage:[UIImage imageNamed:@"your image"] forSegmentAtIndex:1];