+ (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];
}
1、打开ThisService,进行以下配置
Name:右键菜单中的名字
Script:将Doxygen.rb拖拽到这里
2、打开系统偏好设置,找到键盘,进行以下配置
这里我将快速文档注释的快捷键设置成了Command + option + /
3、使用
选中需要注释的函数名,包括所有的参数,右键点击快速文档注释,或者直接按快捷键即可。
<!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; }