关于第三方IOS的checkBox框架的使用
*:first-child {
margin-top: 0 !important; }
body > *:last-child {
margin-bottom: 0 !important; }
a {
color: #4183C4; }
a.absent {
color: #cc0000; }
a.anchor {
display: block;
padding-left: 30px;
margin-left: -30px;
cursor: pointer;
position: absolute;
top: 0;
left: 0;
bottom: 0; }
h1, h2, h3, h4, h5, h6 {
margin: 20px 0 10px;
padding: 0;
font-weight: bold;
-webkit-font-smoothing: antialiased;
cursor: text;
position: relative; }
h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA09pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoMTMuMCAyMDEyMDMwNS5tLjQxNSAyMDEyLzAzLzA1OjIxOjAwOjAwKSAgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUM2NjlDQjI4ODBGMTFFMTg1ODlEODNERDJBRjUwQTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUM2NjlDQjM4ODBGMTFFMTg1ODlEODNERDJBRjUwQTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QzY2OUNCMDg4MEYxMUUxODU4OUQ4M0REMkFGNTBBNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QzY2OUNCMTg4MEYxMUUxODU4OUQ4M0REMkFGNTBBNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsQhXeAAAABfSURBVHjaYvz//z8DJYCRUgMYQAbAMBQIAvEqkBQWXI6sHqwHiwG70TTBxGaiWwjCTGgOUgJiF1J8wMRAIUA34B4Q76HUBelAfJYSA0CuMIEaRP8wGIkGMA54bgQIMACAmkXJi0hKJQAAAABJRU5ErkJggg==) no-repeat 10px center;
text-decoration: none; }
h1 tt, h1 code {
font-size: inherit; }
h2 tt, h2 code {
font-size: inherit; }
h3 tt, h3 code {
font-size: inherit; }
h4 tt, h4 code {
font-size: inherit; }
h5 tt, h5 code {
font-size: inherit; }
h6 tt, h6 code {
font-size: inherit; }
h1 {
font-size: 28px;
color: black; }
h2 {
font-size: 24px;
border-bottom: 1px solid #cccccc;
color: black; }
h3 {
font-size: 18px; }
h4 {
font-size: 16px; }
h5 {
font-size: 14px; }
h6 {
color: #777777;
font-size: 14px; }
p, blockquote, ul, ol, dl, li, table, pre {
margin: 15px 0; }
hr {
background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAYAAACtBE5DA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pEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqqezsUAAAAfSURBVHjaYmRABcYwBiM2QSA4y4hNEKYDQxAEAAIMAHNGAzhkPOlYAAAAAElFTkSuQmCC) repeat-x 0 0;
border: 0 none;
color: #cccccc;
height: 4px;
padding: 0;
}
body > h2:first-child {
margin-top: 0;
padding-top: 0; }
body > h1:first-child {
margin-top: 0;
padding-top: 0; }
body > h1:first-child + h2 {
margin-top: 0;
padding-top: 0; }
body > h3:first-child, body > h4:first-child, body > h5:first-child, body > h6:first-child {
margin-top: 0;
padding-top: 0; }
a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
margin-top: 0;
padding-top: 0; }
h1 p, h2 p, h3 p, h4 p, h5 p, h6 p {
margin-top: 0; }
li p.first {
display: inline-block; }
li {
margin: 0; }
ul, ol {
padding-left: 30px; }
ul :first-child, ol :first-child {
margin-top: 0; }
dl {
padding: 0; }
dl dt {
font-size: 14px;
font-weight: bold;
font-style: italic;
padding: 0;
margin: 15px 0 5px; }
dl dt:first-child {
padding: 0; }
dl dt > :first-child {
margin-top: 0; }
dl dt > :last-child {
margin-bottom: 0; }
dl dd {
margin: 0 0 15px;
padding: 0 15px; }
dl dd > :first-child {
margin-top: 0; }
dl dd > :last-child {
margin-bottom: 0; }
blockquote {
border-left: 4px solid #dddddd;
padding: 0 15px;
color: #777777; }
blockquote > :first-child {
margin-top: 0; }
blockquote > :last-child {
margin-bottom: 0; }
table {
padding: 0;border-collapse: collapse; }
table tr {
border-top: 1px solid #cccccc;
background-color: white;
margin: 0;
padding: 0; }
table tr:nth-child(2n) {
background-color: #f8f8f8; }
table tr th {
font-weight: bold;
border: 1px solid #cccccc;
margin: 0;
padding: 6px 13px; }
table tr td {
border: 1px solid #cccccc;
margin: 0;
padding: 6px 13px; }
table tr th :first-child, table tr td :first-child {
margin-top: 0; }
table tr th :last-child, table tr td :last-child {
margin-bottom: 0; }
img {
max-width: 100%; }
span.frame {
display: block;
overflow: hidden; }
span.frame > span {
border: 1px solid #dddddd;
display: block;
float: left;
overflow: hidden;
margin: 13px 0 0;
padding: 7px;
width: auto; }
span.frame span img {
display: block;
float: left; }
span.frame span span {
clear: both;
color: #333333;
display: block;
padding: 5px 0 0; }
span.align-center {
display: block;
overflow: hidden;
clear: both; }
span.align-center > span {
display: block;
overflow: hidden;
margin: 13px auto 0;
text-align: center; }
span.align-center span img {
margin: 0 auto;
text-align: center; }
span.align-right {
display: block;
overflow: hidden;
clear: both; }
span.align-right > span {
display: block;
overflow: hidden;
margin: 13px 0 0;
text-align: right; }
span.align-right span img {
margin: 0;
text-align: right; }
span.float-left {
display: block;
margin-right: 13px;
overflow: hidden;
float: left; }
span.float-left span {
margin: 13px 0 0; }
span.float-right {
display: block;
margin-left: 13px;
overflow: hidden;
float: right; }
span.float-right > span {
display: block;
overflow: hidden;
margin: 13px auto 0;
text-align: right; }
code, tt {
margin: 0 2px;
padding: 0 5px;
white-space: nowrap;
border: 1px solid #eaeaea;
background-color: #f8f8f8;
border-radius: 3px; }
pre code {
margin: 0;
padding: 0;
white-space: pre;
border: none;
background: transparent; }
.highlight pre {
background-color: #f8f8f8;
border: 1px solid #cccccc;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px; }
pre {
background-color: #f8f8f8;
border: 1px solid #cccccc;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px; }
pre code, pre tt {
background-color: transparent;
border: none; }
sup {
font-size: 0.83em;
vertical-align: super;
line-height: 0;
}
* {
-webkit-print-color-adjust: exact;
}
@media screen and (min-width: 914px) {
body {
width: 854px;
margin:0 auto;
}
}
@media print {
table, pre {
page-break-inside: avoid;
}
pre {
word-wrap: break-word;
}
}
-->
code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #a67f59;
background: hsla(0, 0%, 100%, .5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function {
color: #DD4A68;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
-->
关于第三方IOS的checkBox框架的使用
这个框架是从github上下载获取的:M13Checkbox。
只是github的源码项目工程比较久远,所以我把代码部分拷贝到XCode 7.1.0新建的项目里。
下面是展示效果
客户端源码使用参考:
#import "ViewController.h"
#import "M13Checkbox.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad
{
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
// Do any additional setup after loading the view, typically from a nib. //Create just a box with the default size
M13Checkbox *allDefaults = [[M13Checkbox alloc] init];
allDefaults.frame = CGRectMake(, , allDefaults.frame.size.width, allDefaults.frame.size.height);
[allDefaults addTarget:self action:@selector(checkChangedValue:) forControlEvents:UIControlEventValueChanged];
[self.view addSubview:allDefaults]; //Basic Title
M13Checkbox *basicTitle = [[M13Checkbox alloc] initWithTitle:@"Basic Title"];
basicTitle.frame = CGRectMake(, allDefaults.frame.origin.y + allDefaults.frame.size.height + , basicTitle.frame.size.width, basicTitle.frame.size.height);
[self.view addSubview:basicTitle]; //Title With custom height
M13Checkbox *titleWithHeight = [[M13Checkbox alloc] initWithFrame:CGRectMake(, basicTitle.frame.origin.y + basicTitle.frame.size.height + , , ) title:@"Custom Height" checkHeight:30.0];
[self.view addSubview:titleWithHeight]; //Left Alignment
M13Checkbox *leftAlignment = [[M13Checkbox alloc] initWithTitle:@"M13CheckboxAlignmentLeft"];
[leftAlignment setCheckAlignment:M13CheckboxAlignmentLeft];
leftAlignment.frame = CGRectMake(, titleWithHeight.frame.origin.y +titleWithHeight.frame.size.height + , leftAlignment.frame.size.width, leftAlignment.frame.size.height); [self.view addSubview:leftAlignment]; //Mixed
M13Checkbox *mixed = [[M13Checkbox alloc] initWithTitle:@"M13CheckboxStateMixed"];
[mixed setCheckState:M13CheckboxStateMixed];
mixed.frame = CGRectMake(, leftAlignment.frame.origin.y + leftAlignment.frame.size.height + , mixed.frame.size.width, mixed.frame.size.height);
[self.view addSubview:mixed]; //OSX-Style
M13Checkbox *osx = [[M13Checkbox alloc] initWithTitle:@"OSX Style"];
osx.flat = NO;
osx.frame = CGRectMake(, mixed.frame.origin.y + mixed.frame.size.height + , osx.frame.size.width, osx.frame.size.height);
osx.strokeColor = [UIColor colorWithRed: 0.167 green: 0.198 blue: 0.429 alpha: ];
osx.checkColor = [UIColor colorWithRed:0.0 green:0.129 blue:0.252 alpha:1.0];
osx.tintColor = [UIColor colorWithRed: 0.616 green: 0.82 blue: 0.982 alpha: ];
osx.uncheckedColor = [UIColor colorWithRed:0.925 green:0.925 blue:0.925 alpha:1.0];
[self.view addSubview:osx]; //Custom Stroke
M13Checkbox *stroke = [[M13Checkbox alloc] initWithFrame:CGRectMake(, osx.frame.origin.y + osx.frame.size.height + , , ) title:@"Custom Stroke" checkHeight:30.0];
stroke.strokeColor = [UIColor redColor];
stroke.strokeWidth = 3.0;
[stroke autoFitWidthToText];
[self.view addSubview:stroke]; //Custom Check Color
M13Checkbox *check = [[M13Checkbox alloc] initWithTitle:@"Custom Check Color"];
check.checkColor = [UIColor blueColor];
check.frame = CGRectMake(, stroke.frame.origin.y + stroke.frame.size.height + , check.frame.size.width, check.frame.size.height);
[self.view addSubview:check]; //Custom tint color
M13Checkbox *tint = [[M13Checkbox alloc] initWithTitle:@"Custom Tint Color"];
tint.tintColor = [UIColor colorWithRed: 0.608 green: 0.967 blue: 0.646 alpha: ];
tint.frame = CGRectMake(, check.frame.origin.y + check.frame.size.height + , tint.frame.size.width, tint.frame.size.height);
[self.view addSubview:tint]; //Custom Unchecked Color
M13Checkbox *unchecked = [[M13Checkbox alloc] initWithTitle:@"Custom Unchecked Color"];
unchecked.uncheckedColor = [UIColor colorWithRed:. green:. blue:. alpha:1.0];
unchecked.frame = CGRectMake(, tint.frame.origin.y + tint.frame.size.height + , unchecked.frame.size.width, unchecked.frame.size.height);
[self.view addSubview:unchecked]; //Custom Radius
M13Checkbox *radius = [[M13Checkbox alloc] initWithTitle:@"Custom Radius"];
radius.radius = 5.0;
radius.frame = CGRectMake(, unchecked.frame.origin.y + unchecked.frame.size.height + , radius.frame.size.width, radius.frame.size.height);
[self.view addSubview:radius]; //Disabled
M13Checkbox *disabled = [[M13Checkbox alloc] initWithTitle:@"Disabled"];
disabled.enabled = NO;
disabled.frame = CGRectMake(, radius.frame.origin.y + radius.frame.size.height + , disabled.frame.size.width, disabled.frame.size.height);
[self.view addSubview:disabled]; //Disabled Checked
M13Checkbox *disabledChecked = [[M13Checkbox alloc] initWithTitle:@"Disabled Checked"];
disabledChecked.enabled = NO;
[disabledChecked setCheckState:M13CheckboxStateChecked];
disabledChecked.frame = CGRectMake(, disabled.frame.origin.y + disabled.frame.size.height + , disabledChecked.frame.size.width, disabledChecked.frame.size.height);
[self.view addSubview:disabledChecked]; //Custom Frame + Multiline text
M13Checkbox *customFrame = [[M13Checkbox alloc] initWithFrame:CGRectMake(, disabledChecked.frame.origin.y + disabledChecked.frame.size.height + , , ) title:@"Custom control frame and multiple lines of text." checkHeight:M13CheckboxDefaultHeight];
customFrame.backgroundColor = [UIColor lightGrayColor];
customFrame.titleLabel.numberOfLines = ;
customFrame.titleLabel.lineBreakMode = NSLineBreakByWordWrapping;
[self.view addSubview:customFrame];
} - (void)checkChangedValue:(id)sender
{
NSLog(@"Changed Value");
} @end
XCode7.1.0备份更新的源代码百度云备份链接: http://pan.baidu.com/s/1ntzX3GP 密码: qvmx
关于第三方IOS的checkBox框架的使用的更多相关文章
- [转载]iOS 10 UserNotifications 框架解析
活久见的重构 - iOS 10 UserNotifications 框架解析 TL;DR iOS 10 中以前杂乱的和通知相关的 API 都被统一了,现在开发者可以使用独立的 UserNotifica ...
- 漫谈iOS Crash收集框架
漫谈iOS Crash收集框架 Crash日志收集 为了能够第一时间发现程序问题,应用程序需要实现自己的崩溃日志收集服务,成熟的开源项目很多,如 KSCrash,plcrashreporter,C ...
- 手把手教你如何搭建iOS项目基本框架
手把手教你如何搭建iOS项目基本框架 今天我们来谈谈如何搭建框架,框架需要做一些什么. 第一步:找到我们的目标我们的目标是让其他开发人员拿到手后即可写页面,不再需要考虑其他的问题. 第二步:我们需要做 ...
- 使用iOS原生sqlite3框架对sqlite数据库进行操作
摘要: iOS中sqlite3框架可以很好的对sqlite数据库进行支持,通过面向对象的封装,可以更易于开发者使用. 使用iOS原生sqlite3框架对sqlite数据库进行操作 一.引言 sqlit ...
- ios开发——实用技术篇OC篇&iOS的主要框架
iOS的主要框架 阅读目录 Foundation框架为所有的应用程序提供基本系统服务 UIKit框架提供创建基于触摸用户界面的类 Core Data框架管着理应用程序数据模型 Core ...
- IOS 与ANDROID框架及应用开发模式对照一
IOS 和ANDROID操作系统都是眼下流行的移动操作系统,被移动终端和智能设备大量採用,两者都採用了先进的软件技术进行设计,为了方便应用开发两者都採用了先进的设计模式. 两者在框架设计上都採用了什么 ...
- <iOS 组件与框架> -- UIKit Dynamics
UIKit Dynamics 结合 『iOS 组件与框架 』一书.总结的知识点与demo demo 地址: GitHub地址 一.概述 1.UIKit Dynamics 是 iOS 7 新增的内容.其 ...
- IOS 与ANDROID框架及应用开发模式对比一
IOS 和ANDROID操作系统都是目前流行的移动操作系统,被移动终端和智能设备大量采用,两者都采用了先进的软件技术进行设计,为了方便应用开发两者都采用了先进的设计模式.两者在框架设计上都采用了什么技 ...
- 实用的IOS应用程序框架
实用的IOS应用程序框架 目录 概述 概述
随机推荐
- 简单学ES6 - class
前言 随着ES6标准的定稿,众多的特性也趋于稳定,各大浏览器也在逐步实现这些特性,那么对ES6有更多的了解就无可厚非了. 准备 在学习ES6之前,我们需要有一个环境来测试ES6代码.在这里我推荐使用n ...
- Windows7下的Java运行环境搭建过程图解
第一步:下载JDK 地址:http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html,(由于Sun于20 ...
- Mac常用基本命令/常用Git命令
Git地址: https://github.com/mancongiOS/command-line基本命令 目录/文件的操作 mkdir "目录名" 在当前路径下创建一个文件夹 m ...
- iOS-定时器
一.定时器的作用 在软件开发过程中,我们常常需要在某个时间后执行某个方法,或者是按照某个周期一直执行某个方法.在这个时候,我们就需要用到定时器. 二.定时器的种类 大概有三种方法:NSTimer.CA ...
- js实现页面a向页面b传参的方法
方法一:使用HTML5本地化存储(localStorage) 组件(本地最大能存储5M数据)localStorage是本地永久存储数据,是cookie的优化 方法二:使用cookie将数据存放在客户的 ...
- jquery选中下拉列表的某个值
$('#villageToiletAnn').val('xxx'); id是select的ID,不是option的ID
- [JS] JavaScript框架(2) D3
D3(Data-Driven Documents)是一个用于网页作图.生成互动图形的JavaScript函数库. 官网:http://d3js.org/ 下载: cdn:<script src= ...
- 浅谈Struts2拦截器的原理与实现
拦截器与过滤器 拦截器是对调用的Action起作用,它提供了一种机制可以使开发者定义在一个action执行的前后执行的代码,也可以在一个action执行前阻止其执行.同时也是提供了 ...
- (一)JAVA项目(非web项目)部署到windows服务器运行
[转]http://blog.csdn.net/tracy19880727/article/details/11205063 一般服务器运行的几乎都是web项目,今天遇到一个问题,把写好的Java项目 ...
- 数据库一次性插入10w条数据,怎么插入效率快
在SQL Server 中插入一条数据使用Insert语句,但是如果想要批量插入一堆数据的话,循环使用Insert不仅效率低,而且会导致SQL一系统性能问题 下面介绍SQL Server支持的两种批量 ...