Hey guys,
I coded a simple cocoa webbrowser app with WebView, this Browser loads only an homepage, wihtout browser navigation or address line.. so basicly a simple fullscreen webbrowser. It resize to an fullscreen app:
the Problem is when I use: NSBorderlessWindowMask I loose the Keyfunktion and also the html css onmouseover styles dosn't work... if I change it to an: NSTitledWindowMask everything works fine.. bun not in Fullscreen... can anyone help my out.. please notice that I'm bloody beginner in Xcode.
here is my .h file
here is my .m file
greetz Noli ;-)
I coded a simple cocoa webbrowser app with WebView, this Browser loads only an homepage, wihtout browser navigation or address line.. so basicly a simple fullscreen webbrowser. It resize to an fullscreen app:
Code:
styleMask:NSBorderlessWindowMask
the Problem is when I use: NSBorderlessWindowMask I loose the Keyfunktion and also the html css onmouseover styles dosn't work... if I change it to an: NSTitledWindowMask everything works fine.. bun not in Fullscreen... can anyone help my out.. please notice that I'm bloody beginner in Xcode.
here is my .h file
Code:
#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
@interface TimeWarpAppDelegate : NSObject <NSApplicationDelegate> {
NSWindow *window;
IBOutlet WebView*webview;
}
@property (assign) IBOutlet NSWindow *window;
@end
here is my .m file
Code:
#import "TimeWarpAppDelegate.h"
@implementation TimeWarpAppDelegate
@synthesize window;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
// Insert code here to initialize your application
[webview setDrawsBackground:NO];
[window orderOut:self];
NSRect screenRect = [[NSScreen mainScreen] frame];
NSView * iv = [window contentView];
self.window = [[NSWindow alloc] initWithContentRect:screenRect
// styleMask:NSTitledWindowMask
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO screen:[NSScreen mainScreen]];
[self.window setContentView:iv];
[self.window setLevel:CGShieldingWindowLevel()];
[self.window makeKeyAndOrderFront:nil];
NSURL*url=[NSURL URLWithString:@"http://localhost/"];
NSURLRequest*request=[NSURLRequest requestWithURL:url];
[[webview mainFrame] loadRequest:request];
}
- (BOOL)canBecomeKeyWindow
{
return YES;
}
@end
greetz Noli ;-)