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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:31:02+00:00 2026-05-26T14:31:02+00:00

I am reading Apple’s sample codes at: http://developer.apple.com/library/mac/#samplecode/CocoaSlides/Introduction/Intro.html it works on a NSView #import

  • 0

I am reading Apple’s sample codes at:

http://developer.apple.com/library/mac/#samplecode/CocoaSlides/Introduction/Intro.html

it works on a NSView

#import <Cocoa/Cocoa.h>

@class Asset;
@class AssetCollection;

// An AssetCollectionView displays the contents of an AssetCollection

@interface AssetCollectionView :NSView
{
    // Model
    AssetCollection *assetCollection;

    // Controller Glue
    NSMutableArray *nodes;

    // Appearance Attributes
    NSGradient *backgroundGradient;

    // UI State
    BOOL autoCyclesLayout;
    NSTimeInterval layoutCycleInterval;
    NSTimer *layoutTimer;
    int subviewsLayoutType;
    NSArray *sortDescriptors;
    BOOL slidesHaveShadows;
    BOOL usesQuartzCompositionBackground;
}

- (AssetCollection *)assetCollection;
- (void)setAssetCollection:(AssetCollection *)newAssetCollection;

- (BOOL)autoCyclesLayout;
- (void)setAutoCyclesLayout:(BOOL)flag;

- (NSTimeInterval)layoutCycleInterval;
- (void)setLayoutCycleInterval:(NSTimeInterval)newLayoutCycleInterval;

- (int)subviewsLayoutType;
- (void)setSubviewsLayoutType:(int)layoutType;

- (NSArray *)sortDescriptors;
- (void)setSortDescriptors:(NSArray *)newSortDescriptors;

- (BOOL)slidesHaveShadows;
- (void)setSlidesHaveShadows:(BOOL)flag;

- (BOOL)usesQuartzCompositionBackground;
- (void)setUsesQuartzCompositionBackground:(BOOL)flag;

- (void)reloadData;
@end

but I prefer to change NSView to NSScrollView that I can see the thumbnail outside the window.

But if I change the codes from

@interface AssetCollectionView :NSView

to

   @interface AssetCollectionView :NSScrollView

AssetCollectionView will display nothing.

Welcome any comment

  • 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-26T14:31:03+00:00Added an answer on May 26, 2026 at 2:31 pm

    An NSScrollView does nothing on its own. It is merely a wrapper around another NSView. Simply put your AssetCollectionView inside an NSScrollView to achieve the desired scrolling.

    To do this use:

    [[scrollView contentView]addSubview: myView];
    

    which will add your view to the scroll view’s view, or

    [scrollView setContentView:myView];
    

    which will set your view as the scroll view’s content view.

    Or, in Interface Builder, you can create a scroll view and drag your custom view into it.

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

Sidebar

Related Questions

I was reading this paper from Apple: http://developer.apple.com/library/mac/documentation/cocoa/conceptual/OOP_ObjC/OOP_ObjC.pdf where it talks about OOP which
Reading the documentation and going through the Apple sample codes (and most of the
As a Java developer who is reading Apple's Objective-C 2.0 documentation: I wonder what
I have been reading about exception handling on the Apple developer docs , but
From reading the Apple Docs on Core Data, I've learned that you should not
I was reading the apple documentation for memory management , and came across something
I was reading at an apple site that shark captures everything that is running
Apple strongly recommends using the binary plist format when reading large XML-based data sets
I was reading on a blog that there's a GLImageProcessing example from apple. I
I am trying to apply styles to HTML tags dynamically by reading in the

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.