It looks like you're new here. If you want to get involved, click one of these buttons!
- (void)applicationDidFinishLaunching:(UIApplication *)application {
// Override point for customization after app launch
[application setStatusBarHidden:YES animated:NO];
viewController = [[MenuController alloc] init];
[window addSubview:viewController.view];
[window makeKeyAndVisible];
application.statusBarOrientation = UIInterfaceOrientationLandscapeRight;
//application.statusBarHidden = YES;
CGAffineTransform transform = CGAffineTransformMakeRotation(3.14159/2);
viewController.view.transform = transform;
CGRect contentRect = CGRectMake(0, 0, 480, 320);
viewController.view.bounds = contentRect;
}
CGRect appFrame = [[UIScreen mainScreen] applicationFrame];
UIView *view = [[UIView alloc] initWithFrame:appFrame];
view.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
self.view = view;
[view release];
UIImage *image = [UIImage imageWithContentsOfFile:[self getPathFromFilename:@\"startScreen.Background.png\"]];
menuBackground = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,480,320)];
menuBackground.image = image;
[self.view addSubview:menuBackground];
// ==== TUTORIAL IMAGE ====
UIImage *imgTutorial = [UIImage imageWithContentsOfFile:[self getPathFromFilename:@\"startScreen.tutorial.png\"]];
UIImage *imgTutorialTouch = [UIImage imageWithContentsOfFile:[self getPathFromFilename:@\"startScreen.tutorial.touch.png\"]];
UIButton *btnTutorial = [[UIButton alloc] initWithFrame:CGRectMake(-16, 215, imgTutorial.size.width, imgTutorial.size.height)];
[btnTutorial setImage:imgTutorial forState:UIControlStateNormal];
[btnTutorial setImage:imgTutorialTouch forState:UIControlEventTouchDown];
[btnTutorial addTarget:self action:@selector(eventShowTutorial) forControlEvents:UIControlEventTouchUpInside];
//[self.view addSubview:btnTutorial];
[menuBackground addSubview:btnTutorial];
[btnTutorial release];
Replies
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like AwesomeIt's nothing fancy, and I have other buttons with methods just like this, some of which perform more complex things.
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like AwesomeInstead of -
- (void) eventShowTutorial {Put this -
- (IBAction) eventShowTutorial:(id)sender {- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like AwesomeThanks!
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like AwesomeHope this helps!
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like Awesome