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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:53:38+00:00 2026-05-23T12:53:38+00:00

I have two Objects, one is called CollidableController and the other is Collidable. Collidable

  • 0

I have two Objects, one is called CollidableController and the other is Collidable. Collidable controller creates Collidables and adds them to an array (which in this case is acting like a queue) but I’m struggling to add the UIImageView of the Collidable to the current View. It works fine before I add it to the array but I can’t add the one that’s in the array

 Collidable  *collidable = [[Collidable alloc] init:0];

[leftMovingBytesQueue enqueue:collidable];
//used a category to add this to NSMutableArray so it can act as a queue, this adds the 'collidable' object to the end of the array

[view addSubview:collidable.spriteImage];
collidable.spriteImage.center=CGPointMake(200, 200);
//adding the original collidable object's uiimageview to a view works fine

int length=[leftMovingBytesQueue count]-1;

[view addSubView:[leftMovingBytesQueue objectAtIndex:length].spriteImage];
 //this line doesn't work, I get the error Semantic Issue: Property 'spriteImage' not found on object of type 'id'
  • 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-23T12:53:38+00:00Added an answer on May 23, 2026 at 12:53 pm

    Use “addSubview” not “addSubView”. Mind the lowercase ‘v’.
    Try This:

    Collidable  *collidableObj=(Collidable*)[leftMovingBytesQueue objectAtIndex:0];
    UIImageView* imView=collidableObj.spriteImage; //just checking
    [view addSubview:imView];
    

    You are enqueing the collidable object. try with [leftMovingBytesQueue objectAtIndex:0]. The last element of the array might not be what you want.

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

Sidebar

Related Questions

If I have two objects, one being the list of items, and the other
I have inherited two complicated COM objects. One was derived from the other and
I have two similar methods. One is intended to handle objects, the other vectors:
I display some objects that have thumbnails in two ways: one in a DataGridView,
I have two objects, let's call them Input and Output Input has properties Input_ID
If I have two objects on the heap referring to each other but they
I have two LINQ objects which have exactly the same columns and I would
Let's say I have two tables one called Customers and one called CustomerAddresses. Then
So I have two objects, Invoice and InvoiceLineItem. InvoiceLineItem has a property called cost
I have two data structures in Java: One is called DebateAssignment and has 5

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.