摘要: 当我们看到如下方法时,我们怎么判断这个方法时普通对方法还是委托对方法呢?- (BMKAnnotationView *)mapView:(BMKMapView *)mapView viewForAnnotation:(id <BMKAnnotation>)annotation我们只要看这个方法对第一个参数就好了。如果这个方法对第一个参数时一个类对对象,那么,这个方法多数就是这个类对delegate方法了。上面对这个方法,就是BMKMapViewDeletate类的一个方法。 阅读全文
posted @ 2013-02-28 13:32 ygm900 阅读(175) 评论(0) 推荐(0) 编辑
摘要: - (CGSize)sizeThatFits:(CGSize)size; // return 'best' size to fit given size. does not actually resize view. Default is return existing view size- (v... 阅读全文
posted @ 2013-02-28 10:45 ygm900 阅读(2232) 评论(0) 推荐(0) 编辑
摘要: 当内容不足以将整个Label占满的时候,可以将Label中的内容顶部对齐显示,并自适应大小。1、给myLabel标签内填充文本Ios代码myLabel.text=@"thetextwillfillthelabel";2、设置myLabel的最大显示行数(0表示不限)Ios代码myLabel.numberOfLines=0;3、设置myLabel框架的最大尺寸Ios代码myLabel.frame=CGRectMake(50,80,60,150);4、调用sizeToFit减小frame框架的尺寸,以使得myLabel框架的大小适应其中填充的内容Ios代码myLabel.siz 阅读全文
posted @ 2013-02-28 10:43 ygm900 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 转自:http://unmi.cc/use-uiscrollview 阅读全文
posted @ 2013-02-28 10:26 ygm900 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 目标效果:样式代码: UILabel *labJzmcTitle = [[UILabel alloc]init]; [labJzmcTitle setBackgroundColor:[UIColor clearColor]]; labJzmcTitle.text=@"基站名称:"; [labJzmcTitle setTextColor:[UIColor whiteColor]]; labJzmcTitle.frame = CGRectMake(6, i*210+45, 80, 30)... 阅读全文
posted @ 2013-02-28 09:42 ygm900 阅读(533) 评论(0) 推荐(0) 编辑