开发者

@ creating modal window

开发者 https://www.devze.com 2023-02-24 02:13 出处:网络
Below is my code on button click i have crated window but i want that window modal . i do not want to use nspanel..

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

;)

0

精彩评论

暂无评论...
验证码 换一张
取 消