摘要:
NSLog(@"%@",[NSStringstringWithFormat:@"%@",nil]); NSArray* array = [NSArrayarrayWithObjects:[NSNullnull],[NSStringstringWithFormat:@"%@",nil], nil]; NSObject* o1 = [array objectAtIndex:0]; NSObject* o2 = [array objectAtIndex:1]; BOOL inull = (NSNull*)responsibility == 阅读全文
摘要:
- (NSString *)stringByTrimmingCharactersInSet:(NSCharacterSet *)set//Use whitespaceCharacterSet or whitespaceAndNewlineCharacterSet to remove whitespace around strings. 阅读全文
摘要:
UITableView隐藏多余的分割线转自http://blog.sina.com.cn/s/blog_6f453dd601018o1z.html看了好多东西,觉得隐藏多余的分割线,基本两个各思路,一个是通过代码,一个是代码配合背景图片。第一种比较常见,在网上到处都是,我这也是抄别人的。主要就是说自己定义一个view,弄成透明的,然后盖在TableView的上部和下部,这样就“隐藏”了。- (void)setExtraCellLineHidden: (UITableView*)tableView{UIView*view =[ [UIView alloc]init];view.backgroun 阅读全文
摘要:
//模拟器上 (快10 倍)2013-02-09 17:44:46.091 Fuel Monitor[10185:15203] ------------------2013-02-09 17:44:46.092 Fuel Monitor[10185:15203] date::2013-02-09 09:44:45 +00002013-02-09 17:44:46.092 Fuel Monitor[10185:15203] date::2013-02-09 09:44:46 +00002013-02-09 17:44:46.093 Fuel Monitor[10185:15203] [NSDat 阅读全文
摘要:
1. .h 文件中1) @class 引入 NSSet* 类型的外键也要引入2) 添加对应的属性@property (nonatomic, retain) NSString * 外键属性名;2. . m文件中1)#import "外键的className.h"2)添加对应的@dynamic外键属性名; 阅读全文
摘要:
1.需求主线现弄清晰 (便于数据库的创建,确保正确的外键关系) 阅读全文
摘要:
1.如何定义一个应用之间调用的ios 本地URL一下博客详解http://www.cnblogs.com/supercheng/archive/2012/11/05/AppInvoke.html2. 检测 定义的URL是否可以连接NSLog(@"isOK:%d",[[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"TheURLDefinedByYou://"]] ); 阅读全文
摘要:
- (NSIndexPath *) tableView:(UITableView *)tableView targetIndexPathForMoveFromRowAtIndexPath:(NSIndexPath *)sourceIndexPath toProposedIndexPath:(NSIndexPath *)proposedDestinationIndexPath {return sourceIndexPath.section == proposedDestinationIndexPath.section ? proposedDestinationIndexPath : source 阅读全文
摘要:
一 . Plain类型的:做法cell 的backgroupView 是设置的 57 pix,在此基础上 在方法willDisplayCell 中cell.backgroundView添加一个高为55Pix的view 作为背景这样就有了 2pix的 cell 下边框了-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ return 57.0;}-(void)tableView:(UITableView *)tableView willDisplayCell. 阅读全文
摘要:
UIWebView*webView =[[UIWebView alloc] initWithFrame:CGRectMake(10,10,200,200)];NSURL *targetURL =[NSURL URLWithString:@"http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIWebView_Class/UIWebView_Class.pdf"];NSURLRequest*request =[NSURLRequest requestWithURL:targetURL 阅读全文