您的位置:首页 > 其它

SWFTools pdf2swf 参数详解 及中文乱码问题

2015-02-02 09:06 267 查看
1.去掉 App Store 内图标上部高亮效果的办法
如果您要去掉这一高亮特效,可以在程序的 info.plist 里添加一个值类型为 boolean 的字段:UIPrerenderedIcon,然后选中。

2.cocos2D新旧类与方法
旧:
CCBitmapFontAtlas
新:CCLabelBMFont

3.box2d的初学最好打开GLESDebugDraw

4.在Xcode下作iPhone应用开发,创建一个unit test,如果所以test函数是正确的则build正常,但如果有一个test结果失败,build时就遇到 Command /bin/sh failed with exit code 1的错误提示。
解决:修改Run Script的内容"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests" 为"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests" 1> /tmp/RunUnitTests.out

5.写unit test时,如果test case里有类似空引用的错误会报exit code 1的错误提示

6.将NSString转换编码集为gb2312或者gbk的方法
NSURL *url = [NSURL URLWithString:urlStr];
NSData *data = [NSData dataWithContentsOfURL:url];
NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000);
NSString *retStr = [[NSString alloc] initWithData:data encoding:enc];

7.隐藏UITableViewController的Title
self.navigationController.navigationBarHidden = YES;

8.UITableView排序

- (void) tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)targetIndexPath

9.UIPopoverController 的nav push controllerview的时间不要自动大小
- (void)viewWillAppear:(BOOL)animated {

CGSize size = {320, 480}; // size of view in popover
self.contentSizeForViewInPopover = size;

[super viewWillAppear:animated];

}

10.让 UILabel 根据字体自动调整大小的方法
CGSize maximumLabelSize = CGSizeMake(250 ,MAXFLOAT);
CGSize expectedLabelSize = [LABEL.text sizeWithFont:[UIFont systemFontOfSize:UILabel.font]
constrainedToSize:maximumLabelSize
lineBreakMode:UILineBreakModeWordWrap];

然后你可以根据 expectedLabelSize 值来调整控件的宽了

11.用 Quartz 画聊天对话框背景实例 http://donbe.blog.163.com/blog/static/13804802120106302487518/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: