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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:33:51+00:00 2026-05-30T15:33:51+00:00

I have an NSCollectionView that lists items from a Core Data source. Each item

  • 0

I have an NSCollectionView that lists items from a Core Data source. Each item has a button that when fired slides down an action view. When this view slides down, the collection view shrinks so that both views fit on top of each other in the same window space.

To provide a good user experience I want the NSCollectionViewItem that fired the action to be completely visible. I have it’s frame – which I got from -frameForItemAtIndex:.

How can I – using the NSRect frame variable and my scrollView outlet – check if frame is visible in the scrollView and, if it isn’t, scroll scrollView so that it is?

  • 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-30T15:33:52+00:00Added an answer on May 30, 2026 at 3:33 pm

    You should be able to do something like this:

    NSRect selectionRect = [self.collectionView frameForItemAtIndex:[[self.collectionView selectionIndexes] firstIndex]];
    [self.collectionView scrollRectToVisible:selectionRect];
    

    Note that you’re sending scrollRectToVisible: to the collectionView, not to the scrollView. If the selectionRect is already visible, the call won’t do anything.

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

Sidebar

Related Questions

I'm facing the following problems: We have meta data for items, each item can
I have a NSCollectionView is bound to an NSArrayController that has an NSMutableArray as
I have a NSCollectionView that I populate using [collectionView setContent:data]; where data is a
I have an NSCollectionView that contains a collection of CustomViews . Initially it tiled
I have the following set-up: A Window that has a splitView in which I
I have a list view class that just like NSCollectionView requires an additional prototype
In my setup I have an NSCollectionView of volumes connected to the mac. For
I have a working NSCollectionView with one minor, but critical, exception. Getting and highlighting
Have you guys had any experiences (positive or negative) by placing your source code/solution
I have an NSCollectionView and the view is an NSBox with a label and

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.