当前位置:  编程技术>移动开发
本页文章导读:
    ▪色彩转换        颜色转换 + (UIColor *) colorWithHexString: (NSString *) stringToConvert {       NSString *cString = [[stringToConvert stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] uppercaseString];       // String shou.........
    ▪ Xcode4中高速进行Doxygen文档注释        Xcode4中快速进行Doxygen文档注释 1、打开ThisService,进行以下配置   Name:右键菜单中的名字 Script:将Doxygen.rb拖拽到这里   2、打开系统偏好设置,找到键盘,进行以下配置 这里我将快速文档.........
    ▪ 手风琴上拉列表框       手风琴下拉列表框<!DOCTYPE html> <html> <head> <!-- Article: http://www.paulrhayes.com/2009-06/accordion-using-only-css/ --> <!-- Demo: http://www.paulrhayes.com/experiments/accordion/ --> <!-- Originally pos.........

[1]色彩转换
    来源: 互联网  发布时间: 2014-02-18
颜色转换

+ (UIColor *) colorWithHexString: (NSString *) stringToConvert

{

 

    NSString *cString = [[stringToConvert stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] uppercaseString];

 

    // String should be 6 or 8 characters

    if ([cString length] < 6) return nil;

 

    // strip 0X if it appears

    if ([cString hasPrefix:@"0X"]) cString = [cString substringFromIndex:2];

    if ([cString hasPrefix:@"#"]) cString = [cString substringFromIndex:1];

    if ([cString length] != 6) return nil;

    // Separate into r, g, b substrings

    NSRange range;

    range.location = 0;

    range.length = 2;

    NSString *rString = [cString substringWithRange:range];

 

    range.location = 2;

    NSString *gString = [cString substringWithRange:range];

 

    range.location = 4;

    NSString *bString = [cString substringWithRange:range];

 

    // Scan values

    unsigned int r, g, b;

    [[NSScanner scannerWithString:rString] scanHexInt:&r];

    [[NSScanner scannerWithString:gString] scanHexInt:&g];

    [[NSScanner scannerWithString:bString] scanHexInt:&b];

 

    return [UIColor colorWithRed:((float) r / 255.0f)

                           green:((float) g / 255.0f)

                            blue:((float) b / 255.0f)

                           alpha:1.0f];

}



    
[2] Xcode4中高速进行Doxygen文档注释
    来源: 互联网  发布时间: 2014-02-18
Xcode4中快速进行Doxygen文档注释

1、打开ThisService,进行以下配置


 

Name:右键菜单中的名字

Script:将Doxygen.rb拖拽到这里

 

2、打开系统偏好设置,找到键盘,进行以下配置


这里我将快速文档注释的快捷键设置成了Command + option + /

 

3、使用

 

选中需要注释的函数名,包括所有的参数,右键点击快速文档注释,或者直接按快捷键即可。



    
[3] 手风琴上拉列表框
    来源: 互联网  发布时间: 2014-02-18
手风琴下拉列表框
<!DOCTYPE html>
<html>
<head>
	<!-- Article: http://www.paulrhayes.com/2009-06/accordion-using-only-css/ -->
	<!-- Demo: http://www.paulrhayes.com/experiments/accordion/ -->
	<!-- Originally posted: 25th June 2009 -->
	<meta charset="UTF-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<title>CSS3 Accordion — Paul Hayes</title>
	<meta name="author" content="Paul Hayes" />
	<link rel="stylesheet" href="/experiment-styles.css" />

	<link rel="stylesheet" href="/blog_article/css/experiment.css" />		
	<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
</head>
<body >
	<div id="wrapper">
		<p id="learn">
			This is a demo, <a href="http://www.paulrhayes.com/2009-06/accordion-using-only-css/">learn how it works</a>.
		</p>
	<div id="experiment">
		<div >
			<h2>Accordion Demo</h2>
			<div id="one" >
				<h3>
					<a href="#one">Heading 1</a>
				</h3>
				<div>
					<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
				</div>
			</div>
			<div id="two" >
				<h3>
					<a href="#two">Heading 2</a>
				</h3>
				<div>
					<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
				</div>
			</div>
			<div id="three" >
				<h3>
					<a href="#three">Heading 3</a>
				</h3>
				<div>
					<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse.</p>
				</div>
			</div>
			<div id="four" >
				<h3>
					<a href="#four">Heading 4</a>
				</h3>
				<div>
					<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse.</p>

					<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>

					<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
				</div>
			</div>
			<div id="five" >
				<h3>
					<a href="#five">Heading 5</a>
				</h3>
				<div>
					<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
				</div>
			</div>
			<div id="six" >
				<h3>
					<a href="#six">Heading 6</a>
				</h3>
				<div>
					<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
				</div>
			</div>
		</div>
	</div>
	</div>
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
		</body>
</html>


/* 
CSS3 Accordion Experiment
Date: 25th June 2009
Author: Paul Hayes
*/
 
.accordion {
 	background: #eee;
 	border: 1px solid #999;
	padding: 0 1em 24px;
	width: 500px;
	margin: 2em auto;
}

.accordion h2 {
	margin: 12px 0;
}
 
.accordion .section {
 	border-bottom: 1px solid #ccc;
	padding: 0 1em;
	background: #fff;
}
 
.accordion h3 a {
	display: block;
	font-weight: normal;
	padding: 1em 0;
}

.accordion h3 a:hover {
	text-decoration: none;
}
 
.accordion h3 + div {
	height: 0;
	overflow: hidden;
	-webkit-transition: height 0.3s ease-in;
	-moz-transition: height 0.3s ease-in;
	-o-transition: height 0.3s ease-in;
	-ms-transition: height 0.3s ease-in;
	transition: height 0.3s ease-in;
}

.accordion :target h3 a {
	text-decoration: none;
	font-weight: bold;
}

.accordion :target h3 + div {
	height: 100px;
}

.accordion .section.large:target h3 + div {
	overflow: auto;
}




    
最新技术文章:
▪Android开发之登录验证实例教程
▪Android开发之注册登录方法示例
▪Android获取手机SIM卡运营商信息的方法
▪Android实现将已发送的短信写入短信数据库的...
▪Android发送短信功能代码
▪Android根据电话号码获得联系人头像实例代码
▪Android中GPS定位的用法实例
▪Android实现退出时关闭所有Activity的方法
▪Android实现文件的分割和组装
▪Android录音应用实例教程
▪Android双击返回键退出程序的实现方法
▪Android实现侦听电池状态显示、电量及充电动...
▪Android获取当前已连接的wifi信号强度的方法
▪Android实现动态显示或隐藏密码输入框的内容
▪根据USER-AGENT判断手机类型并跳转到相应的app...
▪Android Touch事件分发过程详解
▪Android中实现为TextView添加多个可点击的文本
▪Android程序设计之AIDL实例详解
▪Android显式启动与隐式启动Activity的区别介绍
▪Android按钮单击事件的四种常用写法总结
▪Android消息处理机制Looper和Handler详解
▪Android实现Back功能代码片段总结
▪Android实用的代码片段 常用代码总结
▪Android实现弹出键盘的方法
▪Android中通过view方式获取当前Activity的屏幕截...
▪Android提高之自定义Menu(TabMenu)实现方法
▪Android提高之多方向抽屉实现方法
▪Android提高之MediaPlayer播放网络音频的实现方法...
▪Android提高之MediaPlayer播放网络视频的实现方法...
▪Android提高之手游转电视游戏的模拟操控
 


站内导航:


特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

©2012-2021,,E-mail:www_#163.com(请将#改为@)

浙ICP备11055608号-3