Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6176639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:08:11+00:00 2026-05-24T00:08:11+00:00

I have this weird problem.. I’m building an in-house app that should register all

  • 0

I have this weird problem.. I’m building an in-house app that should register all touch events inside the app and, when a touch occurs, reset a timer. The timer checks if the user is inactive for more than 60 seconds and then logs him/her out of the system.

Now… I want to subclass UIWindow and steal all touch-events through there BUT it’s impossible! This is the great tutorial I’m following, (the downloadable sample works) but implemented in my project, the code doesn’t work…

Here is my AppDelegate.h file:

#import <UIKit/UIKit.h>
#import "TouchWindow.h"

@interface StureplansHLMAppDelegate : UIResponder <UIApplicationDelegate> {
TouchWindow *window;
Settings *appSettings;
}

@property (nonatomic, retain) TouchWindow *window;
@property (nonatomic, retain) Settings *appSettings;

@end

And here is the .m file

#import "StureplansHLMAppDelegate.h"
#import "TouchWindow.h"
#import "WelcomeScreen.h"

@implementation StureplansHLMAppDelegate

@synthesize window;
@synthesize appSettings;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[TouchWindow alloc] init];
self.window = [[TouchWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
WelcomeScreen *startScreen = [[WelcomeScreen alloc] init];
[self.window addSubview:startScreen.view];
[self.window makeKeyAndVisible];

return YES;
}

When i instantiate with my custom UIWindow class the app is just black and never loads the view…

I’m using XCode 4.2 iOS 5 and storyboard. Can someone help me? How do I get it to work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T00:08:12+00:00Added an answer on May 24, 2026 at 12:08 am

    You need to retain startScreen somewhere. Instead of adding startScreen’s view to the window with addSubview, simply set it as the rootViewController of the window

    self.window.rootViewController = startScreen
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this weird problem that's killing us. I have a widely used app
I have this weird crash that only happens when running the app on the
I have this weird problem that a convert of a string on my machine
This is the second time that I have this really weird problem with WCF
I have this weird problem with setting up cookies with PHP. Everything worked fine
This is a weird problem. I have a solution for it, but I don't
I have a weird problem. I create this window, but its blank until i
I have a weird problem, and I don't know if this is the default
I have this weird problem where my Google Maps API script doesn't work, no
I have this weird problem as to how to name objects of a class.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.