Hi all.
I made a mess of my App.
all my buttons are created in Window. which also has a xib.
I have a UIView to interpret Shakes.
BUT ! everything works fine. All the buttons work, shake and gestures.
but I want to do things "right" and tried to implement a ViewController.
Where I add the shakeView.
in Delegate gameMainDelegate:
in Controller shakeViewController:
But nothing happens when. also all my buttons I created don't trigger.
including the xib ones. but if I just slap the view on the window everything is copacetic.
ala from gameMainDelegate:
everything works fine.
I know I have to pass the gesture back up the chain or something. Is there a good example of this ? apple developer docs make my brain bleed...
Basically I'm piling all my views on top of one another on the window.
I don't need to switch views, I want my swipe gestures and shakes feed to the model and my buttons to be updated when those gestures/shakes are triggered.
How would someone (you) smarter than me structure this?
thanks in advance.
Ian
I made a mess of my App.
all my buttons are created in Window. which also has a xib.
I have a UIView to interpret Shakes.
BUT ! everything works fine. All the buttons work, shake and gestures.
but I want to do things "right" and tried to implement a ViewController.
Where I add the shakeView.
in Delegate gameMainDelegate:
Code:
UIViewController *shakeViewControll = [shakeViewController alloc] init];
[[self window] addSubview:shakeViewControll.view];
[shakeViewControll release];
in Controller shakeViewController:
Code:
- (id)init
{
// initlize my view controller //
NSLog(@"starting controller");
return self;
}
-(void)viewDidLoad
{
[super viewDidLoad];
self.wantsFullScreenLayout = YES;
shakeView *VD = [[shakeView alloc] init];
[self.view addSubview:VD];
NSLog(@"view did load");
}
-(void)loadview
{
// creates the view //
NSLog(@"load View");
}
But nothing happens when. also all my buttons I created don't trigger.
including the xib ones. but if I just slap the view on the window everything is copacetic.
ala from gameMainDelegate:
Code:
shakeItView = [[shakeView alloc]initWithFrame:wholeWindow];
[shakeItView setBackgroundColor:[UIColor clearColor]];
[[self window] addSubview:shakeItView];
everything works fine.
I know I have to pass the gesture back up the chain or something. Is there a good example of this ? apple developer docs make my brain bleed...
Basically I'm piling all my views on top of one another on the window.
I don't need to switch views, I want my swipe gestures and shakes feed to the model and my buttons to be updated when those gestures/shakes are triggered.
How would someone (you) smarter than me structure this?
thanks in advance.
Ian
Last edited: