MHSegmentedView 是使用 UISegmentedControl 切换视图的嵌入式标签视图容器。
采用 MHSegmentedView 代理的类必须实现以下方法
// returns the number of views which will be contained in the MHSegmentedView
- (NSInteger)numberOfSegmentsInSegmentedView:(MHSegmentedView *)segmentedView;
// returns the title of the view at the index. The title will be shown in the corresponding segment in the UISegmentedControl
- (NSString *)titleForSegmentAtIndex:(NSInteger)index inSegmentedView:(MHSegmentedView *)segmentedView;
// returns the view which will be presented for the index in the UISegmentedControl
- (UIView *)viewForSegmentIndex:(NSInteger)index inSegmentedView:(MHSegmentedView *)segmentedView;
Martin Hartl,[email protected]
MHSegmentedView 在 MIT 许可证下提供。有关更多信息,请参阅 LICENSE 文件。