Fork me on GitHub
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 125 下一页

2012年4月20日

摘要: http://stackoverflow.com/questions/990221/multiple-lines-of-text-in-uilabelMultiple lines of text in UILabeltextLabel.lineBreakMode = UILineBreakModeWordWrap;textLabel.numberOfLines = 0;it does't work in my case. I'm doing like this:- (CGFloat)tableView:(UITableView *)tableView heightForRowA 阅读全文
posted @ 2012-04-20 14:22 pengyingh 阅读(1475) 评论(0) 推荐(0)

2012年4月19日

摘要: http://www.jisuxz.com/news/5604.htmlHTML 行间距的设置方法与问题 我们可以用:<p style="line-height:100%"> 来设定一段文字内的行距. 但我们怎么设定两段文字之间的行距呢? 即 1 < p >一段文字</ p > 2 < p >第二段文字</ p > 之间的行距怎么设定呢?我可以设成单倍间距吗? 另外,line-height:100%是不是就是我们在Word中的单倍行距啊? 段与段距: 1 < p style = "margin:20 阅读全文
posted @ 2012-04-19 20:21 pengyingh 阅读(2395) 评论(0) 推荐(0)
摘要: UIColor *color = [UIColor redColor];[color colorWithAlphaComponent:0.5f];当设置完红色后,调用此方法设置颜色透明度,为啥不起作用;它是返回新的包含透明度的颜色, 而不是设置color的颜色。这样用:UIColor *color = [UIColor redColor];UIColor *cl = [color colorWithAlphaComponent:0.5f];color没有透明度,cl有透明度。不知道你明白没。看文档Creates and returns a color objectthat has the sa 阅读全文
posted @ 2012-04-19 08:30 pengyingh 阅读(3952) 评论(0) 推荐(0)

2012年4月17日

摘要: #import <UIKit/UIKit.h>@interface DTGlowingLabel : UILabel{ UIColor *_outLineColor; UIColor *_insideColor; UIColor *b_lurColor;}@property (nonatomic, retain) UIColor *outLineColor;@property (nonatomic, retain) UIColor *insideColor;@property (nonatomic, retain) UIColor *blurColor;@end.m#impo... 阅读全文
posted @ 2012-04-17 13:45 pengyingh 阅读(2230) 评论(0) 推荐(0)

2012年4月16日

摘要: http://longtimenoc.com/archives/ios如何避免图像解压缩的时间开销#more-722这是一篇译文,(原文"Avoiding Image Decompression Sickness"在此),原文是我看过的非常不错的一篇关于iOS图片显示的一些文章,解决了我的一些疑惑和问题,因此翻译过来分享,为保证一定的通顺性其中一部分内容与原文有些许出入,但我尽量保证了意思的一致性,欢迎指正批评,横线之间为译文,略挫,见谅:当开始iCatalog.framework的工作时,我发现使用大尺寸图片会引起一些恼人的问题,“大”意味着这个图片有足够大的分辨率(10 阅读全文
posted @ 2012-04-16 11:25 pengyingh 阅读(2710) 评论(1) 推荐(0)
摘要: http://www.vckbase.com/document/viewdoc/?id=1397相信一定有不少的程序开发人员时常会遇到字符编码的问题,而这个问题也是非常让人头痛的。因为这些都是潜在的错误,要找出这些错误也得要有这方面的开发经验才行。特别是在处理xml文档时 ,该问题的出现就更加的频繁了,有一次用java写服务器端程序,用vc写客户端与之交互。交互的协议都是用xml写的。结果在通讯时老是发现数据接受不正确。纳闷!于是用抓取网络数据包工具抓取数据,后来才发现原来是java上xml的头是这样的<?xml version="1.0" encoding=&quo 阅读全文
posted @ 2012-04-16 11:22 pengyingh 阅读(4465) 评论(0) 推荐(0)
摘要: 原文地址:iphone之unichar和初始化作者:飞舞的鸡毛在iphone/mac开发中,unichar是两字节长的char,代表unicode的一个字符。但在xcode中,初始化unichar是个问题。如果像下面这样声明,会有warning"Multi-character character constant"。unichar a = '国';这是因为C语言中两个单引号只能用于char。可以采用直接写文字编码的方式来初始化。unichar a = 0x0100;如果有很多个unichar怎么办?一个个去查表太麻烦了。可以采取变通的方法:unichar a 阅读全文
posted @ 2012-04-16 11:17 pengyingh 阅读(212) 评论(0) 推荐(0)
摘要: http://stackoverflow.com/questions/1775859/how-to-convert-a-unichar-value-to-an-nsstring-in-objective-cI've got an international character stored in a unichar variable. This character does not come from a file or url. The variable itself only stores an unsigned short(0xce91) which is in UTF-8 fo 阅读全文
posted @ 2012-04-16 11:12 pengyingh 阅读(817) 评论(0) 推荐(0)
摘要: NSString *abcString=@"AAAA";想将abString中的4字节读出来,转化成10进制的一个数。当abcString=@"A"即[abcString length]==1时,[abcString characterAtIndex:0]得到了65;所以对于abcString=@"AAAA",[abcString characterAtIndex:0~3]均是65,AAAA在16进制中的数是43690=65*16*16*16+65*16*16+65*16+65*1但这样比较麻烦,我看到还有个方法getCharacte 阅读全文
posted @ 2012-04-16 10:46 pengyingh 阅读(1284) 评论(0) 推荐(0)
摘要: 版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明http://iphonedevelopment.blogbus.com/logs/58282161.html本文转载自www.madhome.org开发论坛当谈到NSString方法时,你会发现许多都涉及到NSRange。不必担心,它其实只不过是一种C语言结构用来帮助描述一系列的条款,包括一个起点位置和一个计数方法。例如,一个行列通过从另一个字符串中摘取一个子字符串的方法是很有效的。你可以对其指定起始位置以及所需的元素数量(下面会向你具体阐述)。NSRange 定义关于NSRange的结构,定义如下:typedef struct 阅读全文
posted @ 2012-04-16 10:25 pengyingh 阅读(7256) 评论(2) 推荐(1)
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 125 下一页

导航