• 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: Drawing text?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing text?


  • Subject: Re: Drawing text?
  • From: "Timothy J. Wood" <email@hidden>
  • Date: Mon, 8 Jul 2002 18:31:29 -0700

The simplest way is to use IB and just put a NSTextField where you want and than call -setStringValue: on it. Another alternative is to use the methods in <AppKit/NSStringDrawing.h>. There are various other alternatives with using the window's fieldEditor, using a NSTextFieldCell, etc, but the first two are certainly the easiest.

-tim



On Monday, July 8, 2002, at 05:49 PM, Ernst Persson wrote:
I'm working on a game (with Obj-C, Cocoa) and.....
I can't figure out how to draw text in my NSView!

What's the simple way to draw an NSString to a custom NSView (in the drawRect method)?
_______________________________________________
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.

  • Follow-Ups:
    • Re: Drawing text?
      • From: Stéphane Sudre <email@hidden>
References: 
 >Drawing text? (From: Ernst Persson <email@hidden>)

  • Prev by Date: Re: OT: Categories and alloc.
  • Next by Date: Re: OT: Categories and alloc.
  • Previous by thread: Re: Drawing text?
  • Next by thread: Re: Drawing text?
  • Index(es):
    • Date
    • Thread