Latest 0.1.3
Homepage https://github.com/robert121/MSMarksButtonList
License MIT
Platforms ios 7.0, requires ARC
Frameworks UIKit
Authors

License MIT
Pod version
Platform info
Support

A group of buttons ,can be used to do a multiple choice component

MSMarksButtonList
MSMarksButtonList

Usage

Setting up padding:

MSButtonConfigurationModel

@property (nonatomic, assign) CGFloat edgeMargin
leading and trailing padding.
最左边的button和最右边的button距离组件两侧边缘的距离

@property (nonatomic, assign) CGFloat horMargin
Horizontal padding between buttons.
水平方向上button与button之间的距离

@property (nonatomic, assign) CGFloat verMargin
Vertical padding between buttons.
垂直方向上button与button之间的距离

@property (nonatomic, assign) CGFloat buttonHeight
height of button.
button的高度

@property (nonatomic, assign) CGFloat fromTopMargin
padding form top.
组件的top距离父view的top的距离.

@property (nonatomic, assign) CGFloat componentWidth
width of component.
组件的宽度

@property (nonatomic, getter=isHide) BOOL hide
hide when initial.
初始化时是否隐藏.

@property (nonatomic, assign) NSInteger numberInaLine

number of buttons in very line.
每一行button的数量

MSButtonConfigurationModel *configuration = [[MSButtonConfigurationModel alloc] initWithEdgeMargin:0.0f
                                                                                             horMargin:10.0f
                                                                                             verMargin:10.0f
                                                                                          buttonHeight:32.0f
                                                                                         fromTopMargin:160
                                                                                        componentWidth:[[UIScreen mainScreen] bounds].size.width
                                                                                         numberInALine:4];

Initialize buttonList:


MSMarksButtonList *buttonList = [[MSMarksButtonList alloc] initWithDataSource:[NSArray array]
                                                                       buttonType:MSButtonTypeOrderScore
                                                                    configuration:configuration];

Tips

I must convert your data model to button model(MSButtonModel),like example.

Requirements

  • ios 7+
  • ARC

Installation

MSMarksButtonList is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "MSMarksButtonList"

Author

LinkRober

License

MSMarksButtonList is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "MSMarksButtonList",
    "version": "0.1.3",
    "summary": "a list of button,like collection view",
    "description": "This CocoaPod provides the ability to use a button list just like a  UICollectionView",
    "homepage": "https://github.com/robert121/MSMarksButtonList",
    "license": "MIT",
    "authors": {
        "u590fu654f": "[email protected]"
    },
    "source": {
        "git": "https://github.com/robert121/MSMarksButtonList.git",
        "tag": "0.1.3"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/MSMarksButtonList/**/*",
    "resource_bundles": {
        "MSMarksButtonList": [
            "Pod/Assets/*.png"
        ]
    },
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This