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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:48:29+00:00 2026-05-18T12:48:29+00:00

I have four tabViewItems, with identifiers 1, 2, 3, and 4 assigned in IB,

  • 0

I have four tabViewItems, with identifiers 1, 2, 3, and 4 assigned in IB, and then set up as constants, i.e.:

#define kTabViewSubject     1

When testing which tabViewItem is selected, it works to treat the identifiers as NSNumbers, like this:

if ([self.drawerTabView selectedTabViewItem] identifier] intValue]]] == kTabViewSubject])
// do something

But when selecting a tabViewItem, if I treat the same identifier as an NSNumber, like this…

[self.drawerTabView selectTabViewItemWithIdentifier:[NSNumber numberWithInt:kTabViewSubject]];

… the identifier is evaluated as a huge address-like number and I get a “beyond bounds” exception.

What works is to treat the identifier as an NSString, like this:

#define kTabViewSubjectX        @"1"
// --
[self.drawerTabView selectTabViewItemWithIdentifier:kTabViewSubjectX];

I understand NSTabViewItem’s identifier property is set up as a generic “id.” But why is it inconsistently classed?

  • 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-18T12:48:30+00:00Added an answer on May 18, 2026 at 12:48 pm

    intValue is a method of NSString as well as NSNumber. The identifiers were strings all along.

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

Sidebar

Related Questions

I have four imageviews which are set to invisible at activity start (or rather
i have four radio buttons , and i want to set a text for
I have four classes which share some arrangement of four properties. I have currently
I have four UINavigationControllers assigned each to a tab in a UITabBarController. Each UINavigationController
I have four buttons which has click able property. Clicking on button will make
I have four folders which contain text files (tab delimited) of the same names,
I have four branches in my git repository, which is managed using GitHub: Production
I have four buttons, which have to push the same uiTableViewController, with different data
I have four tables, namely countries,states,cities,areas which will be the best feasible solution for
I have four activities namely, Demo_tabActivity.java [main activity] Tabhost.java The below two activities are

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.