• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Subviews in IB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subviews in IB


  • Subject: Re: Subviews in IB
  • From: Quentin Mathé <email@hidden>
  • Date: Wed, 14 May 2003 03:05:25 +0200

Le mardi, 13 mai 2003, ` 16:42 Europe/Paris, Steve Roy a icrit :

email@hidden (Quentin Mathi) wrote:

You need to flip the document view coordinates in the scroll view, and
I think you should create a separate custom view in the instance panel
of Interface Builder (you can edit the custom view instance by
double-clicking it), then connect the document view outlet of the
scroll view to it and that's it, just run to see what it looks.

Hum, I'm having trouble doing what you describe. As you mention I discovered
that I can make a custom view in the Instances tab by dragging CustomView to it,
that's great.

Now how do I create a scroll view in the window? There are no scroll view widget
in the floating palette. I tried using an NSTextView but I don't see a document
outlet for it.

Sorry, I should have explained the solution in the a more detailed fashion. Here it is :
- drag a custom view in the instance panel, edit it in order to have it the wanted look
- drag a custom view in your window, select it, go to the custom class panel in the inspector and choose NSClipView
- package the NSClipView inside your window in a NSScrollView
- double-click the NSScrollView to have the NSClipView selected
- connect the outlet documentView of the NSClipView to the custom view instance
- subclass NSView in the classes panel, give it the name FlippedView
- in the instances panel, select your custom view, and set the class to FlippedView in the custom classes panel of the inspector
- create the FlippedView files to have them in Project Builder
- add the following code in the FlippedView.m :
- (BOOL)isFlipped {
return YES;
}
- let's compile and let's run

It should be ok if I'm correct on the flip problem.

Quentin.

--
Quentin Mathi
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: prepareSavePanel woes...
  • Next by Date: Re: Extracting a (smooth) rect from an NSImageView displaying PDF?
  • Previous by thread: Project Windows open in Wrong Position, wrong screen
  • Next by thread: Re: Extracting a (smooth) rect from an NSImageView displaying PDF?
  • Index(es):
    • Date
    • Thread