- 博客(6)
- 收藏
- 关注
原创 UICollectionView recieved layout attributes for a cell with an index path that does not exist 解决办法
-(NSArray*)layoutAttributesForElementsInRect:(CGRect)rect { NSMutableArray* attributes = [NSMutableArray array]; for(NSInteger i=0 ; i < self.collectionView.numberOfSections; i++) { f
2016-09-23 10:12:59
1784
原创 重绘机制 导致绘制的控件重叠
1.- (void)setNeedsDisplayInRect:(CGRect)invalidRect 2.dispatch_semaphore_tdispatch_queue_t queue = dispatch_get_global_queue(0, 0); dispatch_semaphore_t semaphore = dispatch_semapho
2016-05-28 17:40:29
776
原创 如何判断一个view 是否在另外一个view 范围内?
CGRect rect = [_testButton convertRect:_testButton.frame toView:self.view]; if (CGRectIntersectsRect(self.view.frame, rect)) { NSLog(@"true"); }else{ NSLog(@"false");
2016-05-26 20:42:28
1628
1
转载 view发光阴影效果
UIView *v=[[UIView alloc]initWithFrame:CGRectMake(10, 10, 100, 100)]; v.backgroundColor=[UIColor yellowColor]; //v.layer.masksToBounds=YES;这行去掉 v.layer.cornerRadius=10; v.layer.sha
2016-05-19 16:26:39
782
转载 视图弹出后放大又缩小的动画实现、类似于alertView效果
- (void) shakeToShow:(UIView*)aView{CAKeyframeAnimation* animation = [CAKeyframeAnimation animationWithKeyPath:@"transform"];animation.duration = 0.5;NSMutableArray *values = [NSMutableA
2016-05-19 15:17:07
676
原创 ios-touch无效的解决办法
touch 的方法中 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event这个方法无效,原因可能是没有设置该view的交互 [viewsetUserInteractionEnabled:YES];
2015-03-21 17:52:58
1426
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅