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 8684633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:21:26+00:00 2026-06-12T22:21:26+00:00

Im trying to get my head around Objective C and struggling fast. Im guessing

  • 0

Im trying to get my head around Objective C and struggling fast. Im guessing what I am asking here is fairly rudimentary, but I cant seem to find the answers to my problems anywhere on StackOverflow, the Mac Developer Library or the internet in general.

Im trying to use the code from here: http://snipplr.com/view/23024/ to import an Image and display it.

UIGraphicsBeginImageContext

and

[img drawInRect:...]

are kicking up errors, namely “Unknown name type UIImage” and “No visible @interface for ‘UIImage’ declares the selector ‘drawInRect'”

Looking here I can find that drawInRect is a method of UIImage. Im guessing my problem is that the UIImage class cannot be found in my code.

So Im trying to include it, or import it – and Im just drawing a blank here – these lines of code dont work:

#import "UIImage"
#import "UIImage.h"
#include "UIImage"
#include "UIImage.h"

They kick out “file not found” errors. I have no idea how to locate these files, Im sure I am missing something really fundamental and simple, but cant find anything online that sheds any light on how to stop UIImage from being an “Unknown name type”.

Can anyone help?

  • 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-12T22:21:27+00:00Added an answer on June 12, 2026 at 10:21 pm

    Go to your project settings – select the target – Build Phases – Link Binary With Libraries and make sure Core Graphics and UIKit are linked. And also that UIKit is included in the header file, like Martin suggested.

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get my head around WCF transactions but struggling with one concept.
trying to get my head around Feedzirra here. I have it all setup and
I'm trying to get my head around memory management in Objective - C. I've
I'm trying to get my head around Objective-C for the iPhone. My app is
Really trying to get my head around this but cannot see the light through
I am trying to get my head around how multicasting works in MSMQ but
I'm just trying to get my head around the Objective-C event model on iPhone,
I am just trying to get my head around MVC in Objective C and
Trying to get my head around how to integrate fancyBox with an aspx c#
Just trying to get my head around what can happen when things go wrong

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.