UIView
共 7 篇文章
方便设置view的frame
Use view.x = 15; view.width = 167; instead of CGRect newFrame = view.frame; newFrame.origin.x = 15; newFrame.size.width = 167; view.frame = newFrame;
2013-06-04 08:25 · UIView
用UIBezierPath给view添加阴影
bgForListView.layer.shadowOffset = CGSizeZero; bgForListView.layer.shadowRadius = 10.0f; bgForListView.layer.shadowOpacity = 1.0f; bgForListView.layer.shadowPath = [UIBezierPath bezierPathWithRect:bgForListView.bounds].CGPath;
2012-12-17 10:55 · UIView
Create rounded UIViews with shadow
[roundedView setBackgroundColor:[UIColor blackColor]]; [[roundedView layer] setCornerRadius:8]; [[roundedView layer] setMasksToBounds:NO]; [[roundedView layer] setShadowColor:[UIColor blackColor].CGColor]; [[roundedView layer] setShadowOpacity:1.0f]; [[roundedView layer] setShadowRadius:6.0f]; [[se…
2011-10-22 21:46 · UIView
Pop a view animation similar to the presentation of UIAlertView
float pulsesteps[3] = { 0.2, 1/15., 1/7.5 }; - (void) pulse { self.transform = CGAffineTransformMakeScale(0.6, 0.6); [UIView beginAnimations:nil context:nil]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDuration:pulsesteps[0]]; [UIView setAnimationDelegate:self]; […
2011-08-16 13:47 · UIView
UIView annimatio重复动画的代码
[UIView beginAnimations:@"testAnimation" context:NULL]; [UIView setAnimationDuration:8.8f]; [UIView setAnimationCurve:UIViewAnimationCurveLinear]; [UIView setAnimationDelegate:self]; [UIView setAnimationRepeatAutoreverses:NO]; [UIView setAnimationRepeatCount:999999]; frame = labelShow.frame; frame.…
2011-06-22 11:02 · UIView
UIView的[convertRect: toView:]方法使用
CGRect rr = [cell convertRect:cell.jingduBtn.frame toView:self.view]; 意思是:把UITableViewCell的subview(jingduBtn)的frame convert 到 controller的View中, 这里的controller view 包含一个UITableView, UITableView里有多行UITableVieCell
2011-06-02 17:26 · UIView