Tôi có giao diện người dùng có chứa hai UIButton.Slide phụ trong hoạt ảnh, iphone
-(void)ViewDidLoad
{
geopointView = [[UIView alloc] initWithFrame:CGRectMake(0, 350, 120, 80)];
geopointView.backgroundColor = [UIColor greenColor];
UIButton *showGeoPointButton = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain];
showGeoPointButton.frame = CGRectMake(0, 0, 120, 40);
showGeoPointButton.titleLabel.font = [UIFont systemFontOfSize:13.0];
[showGeoPointButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[showGeoPointButton addTarget:self action:@selector(showPlaces:) forControlEvents:UIControlEventTouchUpInside];
UIButton *SaveButton = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain]
SaveButton.frame = CGRectMake(0, 40, 120, 40);
SaveButton.titleLabel.font = [UIFont systemFontOfSize: 15.0];
[SaveButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[SaveButton addTarget:self action:@selector(savePlacePopUp) forControlEvents:UIControlEventTouchUpInside];
[geopointView addSubview:showGeoPointButton];
[geopointView addSubview:SaveButton];
}
Tôi muốn tạo hiệu ứng động trong chế độ xem UI khi phương pháp sau được gọi.
-(void) showAnimation
Tôi đã cố gắng thực hiện bằng cách làm theo nhưng tôi không thể thấy hoạt ảnh. Tôi làm nó như thế nào?
-(void) showAnimation{
[UIView animateWithDuration:10.0 animations:^{
[self.view addSubview:geopointView];
}];
}
Hướng dẫn để được trợ giúp trước.
Cảm ơn rất nhiều .. Nó hoạt động chính xác theo yêu cầu .. – alekhine
đầu ra là gì ?? bạn có thể chỉ cho tôi một số ... tôi cần phải thực hiện điều đó – magid