Board logo

标题: HMSegmentedControl源代码解析(2) [打印本页]

作者: look_w    时间: 2019-2-19 17:33     标题: HMSegmentedControl源代码解析(2)

@property (nonatomic, strong) NSArray<NSString *> *sectionTitles; // section标题
@property (nonatomic, strong) NSArray<UIImage *> *sectionImages;  // section图片
@property (nonatomic, strong) NSArray<UIImage *> *sectionSelectedImages; // 选中的section图片

/**
Provide a block to be executed when selected index is changed.

Alternativly, you could use `addTarget:action:forControlEvents:`
*/

/**
选中index之后的回调
可以使用`addTarget:action:forControlEvents:`替代
*/
@property (nonatomic, copy) IndexChangeBlock indexChangeBlock;

/**
Used to apply custom text styling to titles when set.

When this block is set, no additional styling is applied to the `NSAttributedString` object returned from this block.
*/

/**
自定义富文本标题
*/
@property (nonatomic, copy) HMTitleFormatterBlock titleFormatter;

/**
Text attributes to apply to item title text.
*/

/**
标题 text 属性
*/
@property (nonatomic, strong) NSDictionary *titleTextAttributes UI_APPEARANCE_SELECTOR;

/*
Text attributes to apply to selected item title text.

Attributes not set in this dictionary are inherited from `titleTextAttributes`.
*/
@property (nonatomic, strong) NSDictionary *selectedTitleTextAttributes UI_APPEARANCE_SELECTOR;

/**
Segmented control background color.

Default is `[UIColor whiteColor]`
*/

/**
背景颜色
*/
@property (nonatomic, strong) UIColor *backgroundColor UI_APPEARANCE_SELECTOR;

/**
Color for the selection indicator stripe

Default is `R:52, G:181, B:229`
*/
/**
指示器颜色
*/
@property (nonatomic, strong) UIColor *selectionIndicatorColor UI_APPEARANCE_SELECTOR;

/**
Color for the selection indicator box

Default is selectionIndicatorColor
*/

/**
box颜色
*/





欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0