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

  • Home
  • SEARCH
  • 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 8877773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:32:56+00:00 2026-06-14T19:32:56+00:00

I’m having problems with my code, it worked ok before I started to add

  • 0

I’m having problems with my code, it worked ok before I started to add the myImageView code, but the appDelegate incomplete implementation warning has existed for a long time.

my appDelegate.h

//
//  AppDelegate.h
//  drawern
//
//  Created by Marin Jelica on 2012-11-21.
//  Copyright (c) 2012 Marin Jelica. All rights reserved.
//


#import <UIKit/UIKit.h>

@class ViewController;

@interface AppDelegate : UIResponder <UIApplicationDelegate/*, UIScrollViewDelegate*/>
/*{
 //   IBOutlet UIScrollView *myScrollView;
 //   UIImageView *myImageView;
}*/

@property (strong, nonatomic) UIWindow *window;

@property (strong, nonatomic) ViewController *viewController;
/*
@property (strong, nonatomic) UIScrollView *myScrollView;

@property (strong, nonatomic) UIImageView *myImageView;
*/
-(void)setRed;
-(void)setGreen;
-(void)setBlue;
@end

my appDelegate.M

//
//  AppDelegate.m
//  drawern
//
//  Created by Marin Jelica on 2012-11-21.
//  Copyright (c) 2012 Marin Jelica. All rights reserved.
//

#import "AppDelegate.h"

#import "ViewController.h"


@implementation AppDelegate

//@synthesize myImageView;
//@synthesize myScrollView;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
   /* UIImage *myImage = [UIImage imageNamed:@"de_dust2.png"];
    myImageView = [[UIImageView alloc] initWithImage:myImage];

    myScrollView.contentSize = CGSizeMake(myImageView.frame.size.width, myImageView.frame.size.height);
    myScrollView.maximumZoomScale = 4.0;
    myScrollView.minimumZoomScale = 0.75;
    myScrollView.clipsToBounds = YES;
    myScrollView.delegate = self;
    // [myScrollView addSubview:myImageView];*/

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];
    [self.viewController setRed:1];
    [self.viewController setGreen:0];
    [self.viewController setBlue:0];
    [self.viewController setAlpha:1];
    [self.viewController checkRotation];
    return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application
{
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application
{
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

- (void)applicationWillEnterForeground:(UIApplication *)application
{
    // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application
{
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

@end

my viewController.h

//
//  ViewController.h
//  drawern
//
//  Created by Marin Jelica on 2012-11-21.
//  Copyright (c) 2012 Marin Jelica. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface ViewController : UIViewController {

    CGPoint lastPoint;
    CGPoint moveBackTo;
    CGPoint currentPoint;
    CGPoint location;
    NSDate *lastClick;
    BOOL mouseSwiped;
    UIImageView *drawImage;
    UIImageView *frontImage;
}
- (IBAction)blueButton:(id)sender;
- (IBAction)greenButton:(id)sender;
- (void)checkRotation;

@property int red;
@property int green;
@property int blue;
@property int alpha;
@property int height;
@property int width;

@end

my viewController.m

//
//  ViewController.m
//  drawern
//
//  Created by Marin Jelica on 2012-11-21.
//  Copyright (c) 2012 Marin Jelica. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

@synthesize red;
@synthesize green;
@synthesize blue;
@synthesize alpha;
@synthesize height;
@synthesize width;


- (void)viewDidLoad
{
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    drawImage.image = [defaults objectForKey:@"drawImageKey"];
    drawImage = [[UIImageView alloc] initWithImage:nil];
    drawImage.frame = self.view.frame;
    [self.view addSubview:drawImage];

    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    width=3000;
    height=3000;
    // UIImage *image = [[UIImage alloc] init]


   /*
    UIImage *myImage = [UIImage imageNamed:@"de_dust2.png"];
    myImageView = [[UIImageView alloc] initWithImage:myImage];

    myScrollView.contentSize = CGSizeMake(myImageView.frame.size.width, myImageView.frame.size.height);
    myScrollView.maximumZoomScale = 4.0;
    myScrollView.minimumZoomScale = 0.75;
    myScrollView.clipsToBounds = YES;
    myScrollView.delegate = self;
    // [myScrollView addSubview:myImageView];*/
}

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    UITouch *touch = [[event allTouches] anyObject];

    if ([touch tapCount] == 2) {
        drawImage.image = nil;
    }


    location = [touch locationInView:touch.view];
    lastClick = [NSDate date];

    lastPoint = [touch locationInView:self.view];
    lastPoint.y -= 0;

    [super touchesBegan: touches withEvent: event];
}


- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
    mouseSwiped = YES;

    UITouch *touch = [touches anyObject];
    currentPoint = [touch locationInView:self.view];

    UIGraphicsBeginImageContext(CGSizeMake(width , height));
    [drawImage.image drawInRect:CGRectMake(0, 0, width, height)];
    CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);
    CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 2.0);
    CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), red, green, blue, alpha);
    CGContextBeginPath(UIGraphicsGetCurrentContext());
    CGContextMoveToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y);
    CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), currentPoint.x, currentPoint.y);
    CGContextStrokePath(UIGraphicsGetCurrentContext());


    [drawImage setFrame:CGRectMake(0, 0, width, height)];
    drawImage.image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    lastPoint = currentPoint;

    [self.view addSubview:drawImage];
}


- (IBAction)blueButton:(id)sender {
    blue=1;
    red=0;
    green=0;
}


- (IBAction)greenButton:(id)sender {
 green=1;
    blue=0;
    red=0;   
}

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
    [self checkRotation];
}


-(void)checkRotation{

    NSLog(@"Width:%i", width);
    NSLog(@"Height:%i", height);


    UIInterfaceOrientation orientation = self.interfaceOrientation;
    if (orientation==UIInterfaceOrientationLandscapeRight || orientation == UIInterfaceOrientationLandscapeLeft) {
     //   width = 3000;
     //   height = 3000;


        [drawImage setFrame:CGRectMake(0, 0, width, height)];
     //   drawImage.image = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();
        lastPoint = currentPoint;

        [self.view addSubview:drawImage];
    }

    if (UIInterfaceOrientationIsPortrait(orientation)) {
     //   width = 3000;
     //   height = 3000;


        [drawImage setFrame:CGRectMake(0, 0, width, height)];
   //     drawImage.image = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();
        lastPoint = currentPoint;

        [self.view addSubview:drawImage];
    }
}

@end

Heres an image of what happens when it crashes at startup

http://imgur.com/7uDTa

  • 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-06-14T19:32:57+00:00Added an answer on June 14, 2026 at 7:32 pm

    Since you have added the following method definitions in appdelegate.h file, it is expecting it’s implementation in appdelegate.m but the compiler is not able to find it there. That is why it is showing that warning.

    -(void)setRed;
    -(void)setGreen;
    -(void)setBlue;
    

    You can either remove these lines or implement the same in .m file.

    - (void)setRed {
      //set red color here
    }
    
    - (void)setGreen {
      //set green color here
    }
    
    - (void)setBlue {
      //set blue color here
    }
    

    You need to change this line,

    drawImage.image = [defaults objectForKey:@"drawImageKey"];
    drawImage = [[UIImageView alloc] initWithImage:nil];
    

    Use it as,

    UIImage *image = //get the image from defaults.. Is [defaults objectForKey:@"drawImageKey"] returning NSData of UIImage object? If not create UIImage object using the return name from this key
    //if it returns a string, you can do the following
    UIImage *image = [UIImage imageNamed:[defaults objectForKey:@"drawImageKey"]];
    
    drawImage = [[UIImageView alloc] initWithImage:image];    
    

    Always make sure that [super viewDidLoad]; is the first call in a method.

    - (void)viewDidLoad 
      {
         [super viewDidLoad];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
In my XML file chapters tag has more chapter tag.i need to display chapters
We're building an app, our first using Rails 3, and we're having to build

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.