ダウンロードしたコントロールに問題があります。ボタンが押されたときに背景を変更したいのですが、ボタンが押されたときに、現在のイベントが終了するまでアプリはイベントをリッスンしないようです。ここに私のコードがあります
-(void) menuItem:(RRCircularItem *)item didChangeActive:(BOOL)active {
[menu progress];
[menu setBackgroundColor1:[UIColor colorWithPatternImage:[UIImage imageNamed:@"menuabiertoloadingretina.png"]]];
[menu hideWithAnimationBlock:^{
self.view.backgroundColor = [UIColor whiteColor];
}];
[menu release], menu = nil;
self.viewCarga.hidden = NO;
[menu setBackgroundColor1:[UIColor colorWithPatternImage:[UIImage imageNamed:@"menuabiertoloadingretina.png"]]];
NSLog(@"Item %@ did change state to %d", item.text, active);
if ([item.text isEqualToString:@"EDITORIALES"]){
ViewController *viewControler = [[ViewController alloc] initWithNibName:@"EditorialesViewController" bundle:nil];
[self presentViewController:viewControler animated:YES completion:nil];
[menu setBackgroundColor1:[UIColor colorWithPatternImage:[UIImage imageNamed:@"menuabiertoloadingretina.png"]]];
}else if ([item.text isEqualToString:@"GOLES"]){
GolViewController *viewControler = [[GolViewController alloc] initWithNibName:@"GolViewController" bundle:nil];
[self presentViewController:viewControler animated:YES completion:nil];
}else if ([item.text isEqualToString:@"TABLA"]){
WebViewController *viewControler = [[WebViewController alloc] initWithNibName:@"WebViewController" bundle:nil];
[self presentViewController:viewControler animated:YES completion:nil];
}else if ([item.text isEqualToString:@"AUNLI"]){
AUNLIViewController *viewControler = [[AUNLIViewController alloc] initWithNibName:@"AUNLIViewController" bundle:nil];
[self presentViewController:viewControler animated:YES completion:nil];
}else if ([item.text isEqualToString:@"HORARIOS"]){
HorariosViewController *viewControler = [[HorariosViewController alloc] initWithNibName:@"HorariosViewController" bundle:nil];
[self presentViewController:viewControler animated:YES completion:nil];
}
if (active && ![menu isLabelActive]) {
[menu setLabelActive:YES];
[menu setSliderValue:1];
} else if (!active && [menu isLabelActive]) {
BOOL hasActive = NO;
for (int i = 0; i < 6; i++) hasActive |= [menu isItemActive:i];
if (!hasActive) {
[menu setLabelActive:NO];
[menu setSliderValue:0 animated:NO];
}
}
}
すべての前にこのイベントを使用したいのです[menu progress];
が、機能していません。