下面是我点击按钮的代码我有crated窗口,但我想要那个窗口模态。 我不想使用nspanel .. 如果您有任何示例代码,请使用表格代码
- (IBAction)createWindow:(id)pId;
{
MyWindowControler *zWindowController = [[MyWindowControler alloc]initWithWindowNibName:@"MyExtraWindow"];
nsPointWindowOrigin.x += 20.0;
nsPointWindowOrigin.y += 15.0;
[zWindowController.window setFrameOrigin:nsPointWindowOrigin];
[(MyCustomView *)[zWindowController idWidowCustomView] makeColourRed:(nsPointWindowOrigin.x/1200.0)
green:(nsPointWindowOrigin.y/400.0)
blue:(1.0 - ((nsPointWindowOrigin.x/600.0)))];
[zWindowController showWindow:self];
[array addObject:zWindowController];
}
答案 0 :(得分:0)
检查此功能,它可以帮助您: - (void)presentModalViewController:(UIViewController *)modalViewController动画:(BOOL)动画
)