Below is my code on button click i have crated window but i want that window modal . i do not want to use nspanel.. If u have any sample code forword me also sheet code
- (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];
}
Check this function, which can help you : - (void)presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated
;)
精彩评论