• 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: Static text over an image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Static text over an image


  • Subject: Re: Static text over an image
  • From: Andre Masse <email@hidden>
  • Date: Thu, 30 Oct 2008 09:45:19 -0400

On Oct 30, 2008, at 01:32, Andrew Merenbach wrote:

What operating system are you deploying to, and which SDK are you linking against? If you're using anything before Leopard, you're out of luck with your present method, as clipping was not enforced among sibling views prior to 10.5. There might possibly be caveats using 10.5, as well, although I'm not versed enough to know what they are -- hopefully someone with more experience, in this particular issue, will be able to chime in.


I'm linking against 10.5. Thanks for pointing that issue.


On Oct 30, 2008, at 01:44, Rob Keniger wrote:

Try double-clicking the Image view in IB, which will move IB's "active selection" to the view itself. If you now drag a text field to the image, it will be placed as a subview of the NSImageView and always display in front.

Thanks for your suggestion Rob, but I tried that but couldn't make it work when the image is in an NSView.


Here's what i did:

- created a new Cocoa application project,
- opened the xib,
- dragged an NSApplication image from the media tab in IB to the window,
- dragged a label (NSTextField) on top of the image,
- saved, build and run.

The label is correctly drawn over the image. Then I:

- dragged a custom view (NSView),
- dragged an NSApplication image in the custom view,
- double-clicked the image, the white frame comes up to show that I'm inside the image's view,
- dragged a label (NSTextField) on top of the image and couldn't put it *in* the image's view. No matter what I do, IB doesn't let me. I tried to moved it inside by switching to list view in IB and dragging the label inside the image view but no luck.
- saved, build and run.


The label is drawn behind...

Thanks to both Brandon and Mark who suggested to reverse the order. That solves the problem! Now, for what I currently need (having a label over a gradient background), this is a small issue. When you want an entire layout build on top of an image background, this becomes much more involving. Sure, there's a workaround but I think it's better to file a bug on radar so that this *behavior* is fixed, and I'll do that :-)

Thanks to all for your suggestions,

Andre Masse
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Static text over an image (From: Andre Masse <email@hidden>)
 >Re: Static text over an image (From: Andrew Merenbach <email@hidden>)

  • Prev by Date: RE: Re: Static text over an image
  • Next by Date: Re: Static text over an image
  • Previous by thread: Re: Static text over an image
  • Next by thread: Re: Static text over an image
  • Index(es):
    • Date
    • Thread