【发布时间】:2011-08-21 23:26:34
【问题描述】:
大家好,我是法国人,所以请原谅我的英语,所以这是我的问题:我们如何定义视图的高度和宽度。这里它的名字是 flakeView。这是代码:
UIImageView* flakeView = [[[UIImageView alloc] initWithImage:flakeImage] autorelease];
// use the random() function to randomize up our flake attributes
int startY = round(random() % 320);
// set the flake start position
flakeView.center = CGPointMake(490, startY);
flakeView.alpha = 1;
// put the flake in our main view
[self.view addSubview:flakeView];
[UIView animateWithDuration:7
animations:^{
// set the postion where flake will move to
flakeView.center = viewToRotate.center;
}];
【问题讨论】:
标签: iphone uiimageview height width