• 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: NSTextView with irregular shape
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView with irregular shape


  • Subject: Re: NSTextView with irregular shape
  • From: Keary Suska <email@hidden>
  • Date: Thu, 14 Feb 2013 09:56:19 -0700

On Feb 14, 2013, at 4:11 AM, Vyacheslav Karamov wrote:

> I need to implement NSTextView descendant similar to one used in Mac iMessages App.
> I have implemented live resizing, but how to set resizable image as its custom shape?

AFAIK, custom text box geometry is really a function of NSTextContainer. I am pretty sure there are examples of this somewhere, but I don't expect it to be trivial. I have been neck-deep in the Cocoa text system and the documentation is somewhat less than desirable and requires having as full an understanding as possible of multiple documents that are not well cross-referenced. A good place to start is here: http://developer.apple.com/library/Mac/#documentation/Cocoa/Conceptual/TextStorageLayer/Concepts/LayoutGeometry.html

Chances are, the work will be similar for most simple shapes, so googling for drawing text in a circle, for instance, might show enough sample code that you can figure out what is happening.

Good luck,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

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

  • Follow-Ups:
    • Re: NSTextView with irregular shape
      • From: Vyacheslav Karamov <email@hidden>
References: 
 >NSTextView with irregular shape (From: Vyacheslav Karamov <email@hidden>)

  • Prev by Date: Re: faster deep copies?
  • Next by Date: Re: Is CoreData on iOS ready for prime time for serious work?
  • Previous by thread: NSTextView with irregular shape
  • Next by thread: Re: NSTextView with irregular shape
  • Index(es):
    • Date
    • Thread