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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:51:16+00:00 2026-06-06T08:51:16+00:00

I’ve used the debugger and break points to pin point down what line of

  • 0

I’ve used the debugger and break points to pin point down what line of code I receive the error on which I will show you…

for (NSString *s in golferFourIconCounter) {

        if(s != nil) {
            int sint = [s intValue];
            switch (sint) {
                case 1:
                    iconNum = @"Num1.png";
                    break;
                case 2:
                    iconNum = @"Num2.png";
                    break;
                case 3:
                    iconNum = @"Num3.png";
                    break;
                case 4:
                    iconNum = @"Num4.png";
                    break;
                case 5:
                    iconNum = @"Num5.png";
                    break;
                case 6:
                    iconNum = @"Num6.png";
                    break;
                case 7:
                    iconNum = @"Num7.png";
                    break;
                case 8:
                    iconNum = @"Num8.png";
                    break;
                case 9:
                    iconNum = @"Num9.png";
                    break;

                default:
                    break;
            }

            switch (ids) {
                case 0:
                    imageTitle = @"GolfEagle.jpg";
                    break;
                case 1:
                    imageTitle = @"Birdie.png";
                    break;
                case 2:
                    imageTitle = @"Par.png";
                    break;
                case 3:
                    imageTitle = @"Bogey.png";
                    break;
                case 4:
                    imageTitle = @"Double-Bogey.png";
                    break;
                case 5:
                    imageTitle = @"Triple-Bogey.png";
                    break;
                case 6:
                    imageTitle = @"GolfSandie.png";
                    break;
                case 7:
                    imageTitle = @"Greenie.png";
                    break;
                case 8:
                    imageTitle = @"Polie.png";
                    break;
                case 9:
                    imageTitle = @"Dart.png";
                    break;
                case 10:
                    imageTitle = @"Three-Jack.png";
                    break;
                case 11:
                    imageTitle = @"Arnie.png";
                    break;
                case 12:
                    imageTitle = @"Ladie.png";
                    break;
                case 13:
                    imageTitle = @"Barkie.png";
                    break;
                case 14:
                    imageTitle = @"Hole-In-One.png";
                    break;
                case 15:
                    imageTitle = @"Fairway.png";
                    break;
                default:
                    break;
            }

            iid = iid+41;

            NSLog(@"%d --- %@",iid, iconNum);
            [(UIImageView*)[self.view viewWithTag:iid] setImage:[UIImage imageNamed:iconNum]];

            iid = iid-41;
            int rr = 401900;
            rr++;
            rr = rr+iid;

            [(UIImageView*)[self.view viewWithTag:rr] setImage:[UIImage imageNamed:imageTitle]];
            iid++;
        }

        ids++;
    }

The code fails on this specific line of code… (towards the end of the for loop)

[(UIImageView*)[self.view viewWithTag:iid] setImage:[UIImage imageNamed:iconNum]];

It doesn’t make any sense because I get the error – (UILabel setImage) when I’m clearly using on UIImageView’s in my code???

Here is what gets nsloged in the debugger…

2012-06-24 21:41:58.518 Dot Golf Scoring[2811:15203] 57 --- (null)
2012-06-24 21:41:58.519 Dot Golf Scoring[2811:15203] 58 --- (null)
2012-06-24 21:41:58.520 Dot Golf Scoring[2811:15203] 59 --- (null)
2012-06-24 21:41:58.522 Dot Golf Scoring[2811:15203] 60 --- (null)
2012-06-24 21:41:58.549 Dot Golf Scoring[2811:15203] 61 --- (null)
2012-06-24 21:41:58.561 Dot Golf Scoring[2811:15203] 62 --- (null)
2012-06-24 21:41:58.562 Dot Golf Scoring[2811:15203] 63 --- (null)
2012-06-24 21:41:58.563 Dot Golf Scoring[2811:15203] 64 --- (null)
2012-06-24 21:41:58.564 Dot Golf Scoring[2811:15203] 65 --- (null)
2012-06-24 21:41:58.565 Dot Golf Scoring[2811:15203] 66 --- (null)
2012-06-24 21:41:58.566 Dot Golf Scoring[2811:15203] 67 --- (null)
2012-06-24 21:41:58.567 Dot Golf Scoring[2811:15203] 68 --- (null)
2012-06-24 21:41:58.567 Dot Golf Scoring[2811:15203] 69 --- (null)
2012-06-24 21:41:58.568 Dot Golf Scoring[2811:15203] 70 --- (null)
2012-06-24 21:41:58.569 Dot Golf Scoring[2811:15203] 71 --- (null)
2012-06-24 21:41:58.569 Dot Golf Scoring[2811:15203] -[UILabel setImage:]: unrecognized selector sent to instance 0x7f98b30
2012-06-24 21:41:58.570 Dot Golf Scoring[2811:15203] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UILabel setImage:]: unrecognized selector sent to instance 0x7f98b30'
*** First throw call stack:
(0x153b022 0x30e2cd6 0x153ccbd 0x14a1ed0 0x14a1cb2 0xcbcd 0xabce 0x1c4a1e 0x1cd9bc 0x1c8818 0x3e4565 0x1cb857 0x1cb9bc 0x1cb9fc 0x533f4a 0x5284d0 0x153ce99 0x10014e 0x33ea0e 0x153ce99 0x10014e 0x1000e6 0x1a6ade 0x1a6fa7 0x1a6266 0x1253c0 0x1255e6 0x10bdc4 0xff634 0x16ceef5 0x150f195 0x1473ff2 0x14728da 0x1471d84 0x1471c9b 0x16cd7d8 0x16cd88a 0xfd626 0x288d 0x27f5 0x1)
terminate called throwing an exception(lldb) 
  • 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-06T08:51:22+00:00Added an answer on June 6, 2026 at 8:51 am

    I’d check your storyboard or nib for a UILabel with the tag 71 or 72. If you’re really having trouble, you can also track it down programatically so that it’s easier to find:

    UILabel *labelToChange = (UILabel *)[self.view viewWithTag:71];
    labelToChange.backgroundColor = [UIColor greenColor];
    

    While you’re at it, why not change that first big long switch to a simple one-liner?

    if (sint > 0 && sint < 10) iconNum = [NSString stringWithFormat:@"Num%d.png", sint];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I used javascript for loading a picture on my website depending on which small
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a text area in my form which accepts all possible characters from
I need a function that will clean a strings' special characters. I do NOT

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.