iphone - creating a bar with core animation -
So I'm trying to use Apple Core animation to an animated bar graph. The bar is basically a rectangular shape, which is 0-100%. When it first appears, I wanted to show it the animation going from 0 to x%. How can I create a rectangular form like this?
Update: Most likely I will have an image once, so I need to enliven this image at a certain height ...
It should do exactly what you want:
- (UIImageView *) Create New Bar with Float ) Percentage: Location (CP point) Location {UIImageView * newBar = [[[UIImageView alloc] initWithFrame: CGRectMake (location.x, location.y, 50, 200)] autorelease]; NewBar.image = [UIImage imageNamed: @ "Bar Page"]; Kyabsiknimsn * Skletvlua = [Kyabsiknimsn Animsnvithkeypth: @ "Tronsformkskelky"]; ScaleToValue.toValue = [NSNumber Number explosion: percent]; ScaleToValue.fromValue = [NSNumber Number explosion: 0]; ScaleToValue.duration = 1.0f; ScaleToValue.delegate = self; NewBar.layer.anchorPoint = CPPointmake (0.5, 1); [Nvbrkleyr Addnimsn: Skletvlua Forky: @ "Skleup"]; CGAffineTransform scaleTo = CZP Transformmaskel (1.0 F, Percent); NewBar.transform = scaleTo; Return to Newbara; }
Comments
Post a Comment