Latest 0.0.2
Homepage https://github.com/meilbn/MLBOmniButton
License MIT
Platforms ios 7.0, requires ARC
Dependencies SDWebImage
Authors

License MIT
CocoaPods
Language
Platform
Support

An Easy-to-use UIButton custom controls, including some of the common needs of the feature.

中文介绍

Demo Project

See MLBOmniButtonDemo/MLBOmniButtonDemo.xcworkspace.

use Frame

You can specified button’s size of frame:

MLBOmniButton *button = [[MLBOmniButton alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];

or let them adaptive size:

MLBOmniButton *button = [[MLBOmniButton alloc] init];

MLBOmniButton

use AutoLayout

MLBOmniButton

Show Badge

MLBOmniButton

MLBOmniButton

Display Web Image

MLBOmniButton

Bugs

  • [x] Not yet supported Masonry or NSLayoutConstraint to add Constraints, will CRASH!

Features

  • [x] Easy to use
  • [x] Use with Storyboards, XIBs, Code
  • [x] Can show badges
  • [ ] Design in Storyboard or XIB
  • [x] Button’s imageView support web image

Version History

  • 0.0.2 removed NSLog().
  • 0.0.1 first version, contains common features.

Installation

CocoaPods

  1. Add pod 'MLBOmniButton' to your Podfile.
  2. Run pod install or pod update.
  3. Import <MLBOmniButton/MLBOmniButton.h>.

Carthage

Not yet supported.

Manually

  1. Download all the files in the MLBOmniButton subdirectory.
  2. Add the source files to your Xcode project.
  3. Add SDWebImage,version ~> 3.8.2.
  4. Import MLBOmniButton.h.

Requirements

This library requires iOS 7.0+Xcode 7.3.1+.

Tested devices

Device

iPhone 5S (iOS 8.3)

iPhone 7 Plus (iOS 10.0.2) Not yet tested

Simulator

iPhone 6 (iOS 9.3)

License

MLBOmniButton is provided under the MIT license. See LICENSE file for details.

中文介绍

简单易用的 UIButton 自定义控件,包含一些常见需求的功能。

演示项目

运行 MLBOmniButtonDemo/MLBOmniButtonDemo.xcworkspace

纯 Frame

可以指定大小:

MLBOmniButton *button = [[MLBOmniButton alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];

也可以让控件自适应大小:

MLBOmniButton *button = [[MLBOmniButton alloc] init];

MLBOmniButton

使用 AutoLayout

MLBOmniButton

显示 Badge

MLBOmniButton

MLBOmniButton

显示网络图片

MLBOmniButton

Bugs

  • [x] 还不支持 Masonry 和 NSLayoutConstant 添加约束,会 崩溃

功能

  • [x] 使用简单
  • [x] 可以在 Storyboards、XIB 中使用,当然也可以通过代码创建
  • [x] 可以显示 Badges
  • [ ] 可以在 Storyboard 或者 XIB 中配置自定义属性
  • [x] 按钮的 imageView 支持显示网络图片

版本历史

  • 0.0.2 移除 NSLog 语句。
  • 0.0.1 第一版,包含常用功能。

安装

CocoaPods

  1. 在 Podfile 中添加 pod 'MLBOmniButton'
  2. 执行 pod installpod update
  3. 导入 <MLBOmniButton/MLBOmniButton.h>。

Carthage

暂未支持。

手动安装

  1. 下载 MLBOmniButton 文件夹内所有源文件。
  2. 将 MLBOmniButton 文件夹内所有源文件添加(拖入)到你的工程中。
  3. 添加 SDWebImage,版本 ~> 3.8.2。
  4. 导入 MLBOmniButton.h

系统要求

该项目最低支持 iOS 7.0Xcode 7.3.1

测试设备

真机

iPhone 5S (iOS 8.3)

iPhone 7 Plus (iOS 10.0.2) 还未测试

模拟器

iPhone 6 (iOS 9.3)

许可证

MLBOmniButton 使用 MIT 许可证,详情见 LICENSE 文件。

Latest podspec

{
    "name": "MLBOmniButton",
    "version": "0.0.2",
    "summary": "An Easy-to-use UIButton custom controls.",
    "description": "- An Easy-to-use UIButton custom controls, including some of the common needs of the feature.n- Like ImageView top of Label, or bottom, left, right.n- Button can show Badge.n- Can show web image.",
    "homepage": "https://github.com/meilbn/MLBOmniButton",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "meilbn": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/meilbn/MLBOmniButton.git",
        "tag": "0.0.2"
    },
    "source_files": [
        "MLBOmniButton",
        "MLBOmniButton/**/*.{h,m}"
    ],
    "exclude_files": "Classes/Exclude",
    "requires_arc": true,
    "dependencies": {
        "SDWebImage": [
            "~> 3.8.2"
        ]
    }
}

Pin It on Pinterest

Share This