Created
September 30, 2008 07:00
-
-
Save nickjs/13762 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)showLoginWindow:(id)sender | |
{ | |
if(!_loginView) | |
{ | |
_loginView = [[CPView alloc] initWithFrame:CGRectMake(0,0,600,600)]; | |
var email = [[CPTextField alloc] initWithFrame:CGRectMake(0,0,100,20)]; | |
[email setBordered:YES]; [email setBezeled:YES]; | |
[_loginView addSubview:email]; | |
} | |
if( [_window contentView] == _loginView ) | |
return; | |
var windowRect = [_window frame]; | |
var difference = ( [_loginView frame].size.height - [[_window contentView] frame].size.height ) | |
windowRect.origin.y -= difference; | |
windowRect.size.height += difference; | |
[_loginView setHidden: YES]; | |
[_window setContentView: _loginView]; | |
[_window setFrame: windowRect display: YES animate: YES]; | |
[_loginView setHidden: NO]; | |
[self showWindow:sender]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment