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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:49:02+00:00 2026-05-24T01:49:02+00:00

I am newbie working on iOS application for iPad. I have successfully implemented a

  • 0

I am newbie working on iOS application for iPad. I have successfully implemented a children’s book app using UIImageView. I have also implemented swipe gestures to traverse across the pages. Each page is loaded as single image inside UIImageView and plays an audio narrating the scene.

Now I would like to add some interactivity to my pages. For example, I have a single image loaded in UIImageView which contains few animal characters and some dialect for that particular scene… I want whenever user tap on a particular animal, it should show some movement (may be as if lion is roaring) and my app should play a audio file containing that animal’s sound… how can I achieve this functionality? I need to understand the concept so I can implement it. Should I be having separate images for all animals and load them in their own UIImageView and have all these UIImageViews inside main (or background) UIImageView? I would appreciate if someone can explain me the concept of how such functionality should be implemented.

I think for touches on animals I can define a list of CGRects that will act as hot-spots for each animal on the screen and then play sound files for touched animals but how can I define these hot-spots dynamically? because these would very on each page based on animal’s position on a particular page/image. Also this might not help me with implementing some movement/animation for a particular animal.

  • 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-24T01:49:03+00:00Added an answer on May 24, 2026 at 1:49 am

    An invisible button should work. Use a 1 pixel transparent png, and then size the button dynamically to fit the area you want tapped:

            UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
            btn.frame = CGRectMake(7, 5, 73, 30);
            [btn setImage:[UIImage imageNamed:@"btn_pixel.png"] forState:UIControlStateNormal];
            [btn addTarget:self action:@selector(doSomething) forControlEvents:UIControlEventTouchUpInside];
            [self.view addSubview:btn];
    

    (you don’t need to dealloc the button, because it was not alloc’ed in the first place)

    Then, just create a function called “doSomething” that…does what you want. In your example, it would play the animal sound.

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

Sidebar

Related Questions

I am a newbie working in a simple Rails app that translates a document
I'm admittedly a straight-C newbie, but this has got me stumped. I'm working on
Newbie question. I have a NSMutableArray that holds multiple objects (objects that stores Bezier
Newbie here...can I write one program which incorporates .NET LINQ and also various Java
Java Newbie here. I have a JFrame that I added to my netbeans project,
I'm a newbie to pgsql. I have few questionss on it: 1) I know
C# newbie working off some tutorials. Is there a way to run an identical
I am a newbie working towards developing an IE extension that would appear as
I'm a PHP newbie working a some scripts to display some news articles from
Forum; I am a newbie working out a bit of code. I would like

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.