1. Xib 만들기
File - New - File - User Interface - Application
"Sample.xib"를 생성
2. File's owner 변경
Sample.xib를 클릭
File's owner 클릭
Identity Ispector 클릭
Custom Class의 Class를 대화상자를 호출할 클래스로 변경
3.
{
}
@property (assign) IBOutlet NSWindow * calibration;
4.
@implementation MyController
@synthesize calibration = _calibration;
- (IBAction)onButtonCalibration:(id)sender;
{
}
{
// Show Dialog Box
if(!_calibration)
[NSBundle loadNibNamed:@"calibration" owner:self];
[NSApp beginSheet:self.calibration
modalForWindow:[[NSApp delegate] window]
modalDelegate:self
didEndSelector:NULL
contextInfo:NULL];
댓글 없음:
댓글 쓰기