2014年8月1日

摘要: CATextLayer*txtLayer=[CATextLayerlayer];txtLayer.string=@"地球";txtLayer.foregroundColor=[[UIColorredColor]CGColor];txtLayer.bounds=CGRectMake(0,0,200,5... 阅读全文
posted @ 2014-08-01 20:24 恒山之阳 阅读(244) 评论(0) 推荐(0)
摘要: //调用短信-(void)callMsg:(id)sender{[[UIApplicationsharedApplication]openURL:[NSURLURLWithString:@"sms://135587"]];}//调用电话-(void)callTel:(id)sender{[[UIAp... 阅读全文
posted @ 2014-08-01 20:07 恒山之阳 阅读(354) 评论(0) 推荐(0)
摘要: //反射(假设对CodingVo类进行反射)Class myClass =NSClassFromString(@"CodingVo");idobj=[[myClass alloc]init];SELselector=NSSelectorFromString(@"test1");//调用CodingV... 阅读全文
posted @ 2014-08-01 20:04 恒山之阳 阅读(314) 评论(0) 推荐(0)
摘要: //1.等比率缩放-(UIImage*)scaleImage:(UIImage*)imagetoScale:(float)scaleSize{UIGraphicsBeginImageContext(CGSizeMake(image.size.width*scaleSize,image.size.he... 阅读全文
posted @ 2014-08-01 20:00 恒山之阳 阅读(863) 评论(0) 推荐(0)
摘要: ///////////注flowView为UIView////////////添加滑动手势事件UIPanGestureRecognizer*gestureRecognizer=[[UIPanGestureRecognizeralloc]initWithTarget:flowViewaction:@s... 阅读全文
posted @ 2014-08-01 19:57 恒山之阳 阅读(2560) 评论(0) 推荐(0)
摘要: 前段时间做了一个UISearchBar相关的需求,今天也总结以下。1、UISearchBar自定义背景、取消按钮中文设置UISearchBar*seachBar=[[UISearchBaralloc]init];//修改搜索框背景seachBar.backgroundColor=[UIColorcl... 阅读全文
posted @ 2014-08-01 18:08 恒山之阳 阅读(190) 评论(0) 推荐(0)
摘要: 第一种方式: MyViewController *my=[[MyViewController alloc] init]; [self.navigationController pushViewController:my animated:NO]; //因为一个事件循环机制中 ... 阅读全文
posted @ 2014-08-01 11:33 恒山之阳 阅读(283) 评论(0) 推荐(0)
摘要: 开发中经常需要对数据进行排序再使用,排序的数组往往是较复杂的对象,比如字典、自定义类型等,对这一类数组的排序方法如下:(以字典数组为例)(注:result为待排序数组,newResult为排序后的数组)1、排序参考为数字NSArray*newResult =[resultsortedArrayUsi... 阅读全文
posted @ 2014-08-01 10:54 恒山之阳 阅读(237) 评论(0) 推荐(0)
摘要: 视图翻转切换效果12345678910111213141516@implementation FlipView- (void) touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event {// Start Animation BlockCGCont... 阅读全文
posted @ 2014-08-01 10:03 恒山之阳 阅读(193) 评论(0) 推荐(0)
摘要: 使用POP实现按下/弹起效果的按钮分类。1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697... 阅读全文
posted @ 2014-08-01 09:50 恒山之阳 阅读(564) 评论(0) 推荐(0)

导航