代碼很簡單 主要看看
讓客戶滿意是我們工作的目標(biāo),不斷超越客戶的期望值來自于我們對(duì)這個(gè)行業(yè)的熱愛。我們立志把好的技術(shù)通過有效、簡單的方式提供給客戶,將通過不懈努力成為客戶在信息化領(lǐng)域值得信任、有價(jià)值的長期合作伙伴,公司提供的服務(wù)項(xiàng)目有:主機(jī)域名、虛擬主機(jī)、營銷軟件、網(wǎng)站建設(shè)、靜寧網(wǎng)站維護(hù)、網(wǎng)站推廣。
+ (void)animateWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion
方法的使用
代碼如下:
- (void)viewDidLoad
{
[superviewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
arr=[[NSMutableArrayalloc]init];
CGSize size=[[UIScreen mainScreen] bounds].size;
float x=size.width/3.0;
float y=size.height/3.0;
for (int i=0; i<9; i++) {
UIButton *button=[[UIButtonalloc]initWithFrame:CGRectZero];
button.backgroundColor=[UIColorredColor];
int d=i%3;
int t=i/3;
button.frame=CGRectMake(0+x*d, 0+y*t,x-20, y-10);
button.tag=i;
[self.view addSubview:button];
[arr addObject:button];
}
[self showIn];
}
-(void)showIn{
int r=arc4random()%9;
UIButton *button=[arr objectAtIndex:r];
[UIViewanimateWithDuration:0.1delay:1.0options:UIViewAnimationOptionCurveLinearanimations:^{
button.backgroundColor=[UIColorclearColor];
} completion:^(BOOL finished) {
button.backgroundColor=[UIColorredColor];
[self showIn];
}];
}