こんにちは私は3つのUIButtonを含むnibファイルを持っています。nibからロードした後、実行時にボタンの属性を変更する必要がありますが、何が間違っているのかわかりません。ブール値を変更した後もNSlogがありますが、出力には常に「0」が表示されます。ヘルプthx
-(void)SettingBtnPressed:(id)sender
{
UIButton *btn =(UIButton*)sender;
UITableViewCell *btncell =(UITableViewCell *)[btn superview];
if ([[recentActivities objectAtIndex:btn.tag] isKindOfClass:[MeetingSummary class]]) {
[MainManager getSharedInstance].Summary = [recentActivities objectAtIndex:btn.tag];
MeetingSummary *ms=[recentActivities objectAtIndex:btn.tag];
Meeting *m=ms.meeting;
if(![popoverController isPopoverVisible]){
lastPoint = sender;
if (![m.endedDate isEqualToString:@"1/1/0001"]) {
if (settingpop) {
[settingpop release];
}
settingpop = [[SettingsPopViewController alloc] initWithNibName:@"SettingsPopViewController" bundle:nil];
settingpop.start.hidden=YES;
settingpop.start.enabled=NO;
NSLog(@"%i",settingpop.start.hidden);
NSLog(@"%i",settingpop.start.enabled);
settingpop.btnShowDetail.enabled=NO;
settingpop.btnShowDetail.hidden=YES;
// [settingpop.start removeFromSuperview];
// [settingpop.btnShowDetail removeFromSuperview];
settingpop.view.frame=CGRectMake(0, 0, 250, 54);
}
else
{
settingpop = [[SettingsPopViewController alloc] initWithNibName:@"SettingsPopViewController" bundle:nil];
}
settingpop.delegate = self;
[settingpop setActivityView:self.view];
popoverController = [[[UIPopoverController alloc] initWithContentViewController:settingpop] retain];
[popoverController setPopoverContentSize:CGSizeMake(250.0f, 162.0f)];
[popoverController presentPopoverFromRect:btn.frame inView:btncell
permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}else{
[popoverController dismissPopoverAnimated:YES];
}
}
}