2011 年文章归档
共 11 篇文章
ios UITableViewCell 文字缩进
【前提】 UITableViewCell 原本就有他自己的imageView ,希望在这个imageView上再添加一个icon, textLabel要缩进 icon 寛的大小。 【解决方案】 UIImage *icon = [uiimage imagenamed:item.icon]; UIImageView *imgview = [[uiimageview alloc]initWithImage:icon]; imgview.frame = CGRectMake(5, 10, 15, 21); [cell.contentview addsubview:imgview]; cell.ind…
2011-12-02 12:00
xcode 4.2后 release问题的解决
【release问题的解决】 TARGETS -> Compile Sources 找到包含 release的文件 双击 弹出对话框 在对话框里 添加 -fno-objc-arc ; 问题就解决了~ :)
2011-11-24 14:27 · iphone 开发
iphone UIWebView 的使用
【UIWebView 的使用】 1:引用外部连接 [super viewdidload]; CGRect webFrame = CGRectMake(0.0, 0.0, 320.0, 460.0); UIWebView *webView = [[uiwebview alloc] initWithFrame:webFrame]; [webview setbackgroundcolor:[uicolor whitecolor]]; NSString *urlAddress = @"http://www.baidu.com"; NSURL *url = [nsurl urlwithstring:u…
2011-11-23 14:05 · iphone 开发
收藏 iphone开发站
收藏一个iphone开发的站 http://mobiforge.com/developing/story/build-web-apps-iphone-using-dashcode http://www.iphoneexamples.com/
2011-11-23 13:45 · iphone 开发
ios iphone UILabel 多行文字自动换行 (自动折行)
【UILabel 自动换行】: UIView *footerView = [[uiview alloc] initWithFrame:CGRectMake(10, 100, 300, 180)]; UILabel *label = [[uilabel alloc] initWithFrame:CGRectMake(10, 100, 300, 150)]; label.text = @"where are you? where are you? where are you? where are you? where are you? where are you? where are you? …
2011-11-23 11:29 · iphone 开发
iphone UINavigationController 设置背景图片
【UINavigationController 设置背景图片的方法】 下列代码测试通过,可以显示背景图片 self.navController.navigationBar.tintColor = [uicolor blackcolor]; 下列代码测试 没有出背景颜色 self.navController.navigationBar.backGroundColor = [uicolor blackcolor];
2011-11-23 11:18 · iphone 开发
ios iphone UITableView
UITableView 1:如果一个类继承了 UITableView 那么怎么处理这个UITableView的背景图片呢? self.backgroundView = [[uiimageview alloc] initWithImage:[uiimage imagenamed:imagename]]; 原来是这样处理的 self.backgroundColor = [uicolor colorwithpatternimage:[uiimage imagenamed:imagename]]; 但是一旦这样处理背景图片 当这个表格和屏幕顶部有间距的时候 背景图片会串位置。 self.backgr…
2011-11-23 00:32 · iphone 开发
正则表达式
String envPattern = "学校环境 ( ?)<ul id="huanjing">( ?) (*?) "; 用这个表达式解决 带换行的数据抓取问题
2011-09-21 16:32 · java
netbeans 的swing程序 中加 JFreechart
netbeans里图形界面画出来的swing程序 如果想在某个panel上加jfreechart 需要注意布局问题。 一个工业上的朋友 想需要显示一些列机床上刀具的状态 、例如温度啊 角度啊 等等的需要出 图显示 让我帮着写一个小软件 挺有意思 结果用上了jfreechart 但是使用netbeans画出来的界 面 在panel里添加jfreechart 的时候不出图 、后来才发现 将那个panel的layout设置成 borderlayout,然后再panel.add(freechart,BorderLayout.CENTER),就OK了 此博为了记录这个问题 以免以后遗忘。
2011-02-26 11:50 · swing
swing jtable 添加多选框
n年没有碰swing开发了 Jtable中加一个下checkbox 多选框 这个还真的记录一下 ~ import java.awt.BorderLayout; import java.util.Vector; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.table.AbstractTableModel; public class ChecBoxTest { public static void main(String[] arg…
2011-02-10 10:32 · swing
手机浏览器的请求头
原文在这里 http://www.zytrax.com/tech/web/mobile_ids.html 做一个 记号 方便用 手机浏览器模拟做一些事情的时候 这些头文件就有用了 AvantGo Not strictly a browser but a service for PalmOS and Windows CE users which uses a special browser to optimize content presentation. Mozilla/5.0 (Danger hiptop 3.4; U; AvantGo 3.2) Explanation: Browser …
2011-01-22 21:24 · 标签