tips记录
来源:互联网 发布:如何根据数据做柱状图 编辑:程序博客网 时间:2024/06/12 21:22
1. URL转码,传中文字符串时使用,光靠stringByAddingPercentEscapesUsingEncoding是不够滴,特殊字符还需要处理。
+(NSString *)encodeURL:(NSString*)unescapedString{ NSString* escapedUrlString= (__bridge NSString*)CFURLCreateStringByAddingPercentEscapes(NULL,(CFStringRef)unescapedString, NULL, (CFStringRef)@"!*'();:@&=+$,/?%#[]", kCFStringEncodingUTF8 ); escapedUrlString = [escapedUrlString stringByAddingPercentEscapesUsingEncoding:kCFStringEncodingUTF8]; return escapedUrlString;}
2. how to make the section header of tableView not always floating on that section?
Use group TableView.
or:
- (void)scrollViewDidScroll:(UIScrollView *)scrollView{ if ([scrollView isEqual:self.tableView]) { CGFloat sectionHeaderHeight = sizeHeightTableHeader; if (scrollView.contentOffset.y<=sectionHeaderHeight&&scrollView.contentOffset.y>=0) { scrollView.contentInset = UIEdgeInsetsMake(-scrollView.contentOffset.y, 0, 0, 0); } else if (scrollView.contentOffset.y>=sectionHeaderHeight) { scrollView.contentInset = UIEdgeInsetsMake(-sectionHeaderHeight, 0, 10.0, 0); } }}
- tips记录
- Android 调试tips 记录
- markdown tips记录
- Terminal tips记录
- MySQL,记录一些tips以备用
- ASP.NET MVC/C#开发Tips记录。
- 记录一下oracle培训的一些Tips
- Tips
- Tips
- Tips
- Tips
- > tips
- Tips
- Tips
- Tips
- Tips
- Tips
- Tips
- 介绍GLSurfaceView 相关
- Oracle Spatial
- QT下的几种透明效果
- as3 内容自适应容器大小
- array
- tips记录
- 跟我一起写Makefile
- Solaris下修改主机名Host Name
- Ajax 之二: XMLHttpRequest之POST传递XML
- 大数的c++实现,包括加减乘法
- android WebView 控件之返回
- 两个在线查毒网站
- JAVA 异常处理
- Jquery_1.7_01