MLBOmniButton 0.0.2

MLBOmniButton 0.0.2

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Oct 2016

Maintained by Meilbn.



  • By
  • meilbn

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];

use AutoLayout

Show Badge

Display Web Image

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

Installation

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];

使用 AutoLayout

显示 Badge

显示网络图片

Bugs

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

功能

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

安装

手动安装

  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 文件。