2014年1月15日

ios point 和 pixel的含义

摘要: 在stackoverflow上看到的@property(nonatomic,readonly)CGSize size DiscussionIn iOS 4.0and later,this value reflects the logical size of the image andis measured in points.In iOS 3.xand earlier,this value always reflects the dimensions of the image measured in pixels.A point is a standard length equivalent 阅读全文

posted @ 2014-01-15 09:35 小白说我是2B 阅读(532) 评论(0) 推荐(0) 编辑

2014年1月14日

uilabel 顶端显示一条细线

摘要: 这是因为text 字体相对label的size 过大,调小一点会解决 阅读全文

posted @ 2014-01-14 14:11 小白说我是2B 阅读(242) 评论(0) 推荐(0) 编辑

NSRange

摘要: NSString 查找子串可以使用NSRange[NSString substringWithRange:range]; 阅读全文

posted @ 2014-01-14 12:41 小白说我是2B 阅读(116) 评论(0) 推荐(0) 编辑

NSString字符串相加连接的三种方法

摘要: 这三种方法都会将string1和string2 合并,但是第二个方法更有效率.NSString* string; // 结果字符串 NSString* string1, string2; //已存在的字符串,需要将string1和string2连接起来//方法1. string = [NSString initWithFormat:@"%@,%@", string1, string2 ];//方法2. string = [string1 stringByAppendingString:string2];//方法3 . string = [string stringByApp 阅读全文

posted @ 2014-01-14 12:38 小白说我是2B 阅读(710) 评论(0) 推荐(0) 编辑

2014年1月13日

UIImage 从URL下载图片显示

摘要: NSURl * url=[NSUrl urlwithstring:@".."]'uiimage.imege=[uiimage imagewithdata:[nsdata datacontentofurl:url]]; 阅读全文

posted @ 2014-01-13 11:05 小白说我是2B 阅读(168) 评论(0) 推荐(0) 编辑

点击cell UIimegeView控件闪烁

摘要: 设置[cell setSelectionStyle:UITableViewCellSelectionStyleNone]; 阅读全文

posted @ 2014-01-13 11:03 小白说我是2B 阅读(172) 评论(0) 推荐(0) 编辑

2014年1月12日

转 weather api

摘要: Google Weather API 只支持美国地区使用邮政编码进行查询,例如: http://www.google.com/ig/api?hl=zh-cn&weather=94043 (94043 为 山景城, 美国加州 的邮政编码) 而除了美国以外的地区需要使用经纬度坐标作为参数才能执行 Google Weather API, 例如: http://www.google.com/ig/api?hl=zh-cn&weather=,,,30670000,104019996 (30670000,104019996 为 成都, 中国大陆 的经纬度坐标) 当然,也可能通行城市名称的汉 阅读全文

posted @ 2014-01-12 17:15 小白说我是2B 阅读(471) 评论(0) 推荐(0) 编辑

2014年1月10日

CALayer 画边界线

摘要: 声明一个CALayer 变量@property(strong,nonatomtic) CALayer *border;在viewDidLoad()函数中添加一下:self.border=[[CALayer alloc] init];self.border.frame=CGRectMake[x,y,width];//设置边线的位置 宽度self.border.backgroundColor=[UIColor grayColor].CGColor;[self.layer addSublayer:self.border];//将border添加到当前的layer边线的宽度注意最好是.05f的整数, 阅读全文

posted @ 2014-01-10 13:22 小白说我是2B 阅读(495) 评论(0) 推荐(0) 编辑

ios Fast Image Cache

摘要: 针对ios 图片缓存 阅读全文

posted @ 2014-01-10 10:21 小白说我是2B 阅读(126) 评论(0) 推荐(0) 编辑

2014年1月9日

ios 添加本地通知

摘要: 在Appdelegate.m的回调函数- (void)applicationDidEnterBackground:(UIApplication *)application{ NSDate *alertTime = [[NSDate date] dateByAddingTimeInterval:10]; UIApplication* app = [UIApplication sharedApplication]; UILocalNotification* notify = [[UILocalNotification alloc] init]; if (notify) { notify.fireD 阅读全文

posted @ 2014-01-09 10:26 小白说我是2B 阅读(277) 评论(0) 推荐(0) 编辑

导航