• 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: [iPhone] CFAttributedStringRef autorelease - not possible?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [iPhone] CFAttributedStringRef autorelease - not possible?


  • Subject: Re: [iPhone] CFAttributedStringRef autorelease - not possible?
  • From: Dave Camp <email@hidden>
  • Date: Tue, 21 Jul 2009 08:20:07 -0700

On Jul 19, 2009, at 9:13 AM, Michael Hoy wrote:

NSString *m_scanString = @"This is a test.";
CFDictionaryRef emptyDic = (CFDictionaryRef)[NSDictionary dictionary];
CFAttributedStringRef attString = CFAttributedStringCreate(kCFAllocatorDefault, (CFStringRef)m_scanString, emptyDic);
CFMutableAttributedStringRef linkifiedString = CFAttributedStringCreateMutableCopy(kCFAllocatorDefault, 0, attString);
NSLog(@"%@", (NSString *)CFAttributedStringGetString(linkifiedString));
[(id)linkifiedString autorelease];


Testing in a Mac OS 10.5 SDK, this code works. In the iPhone 3.1 SDK, the last line of code (calling autorelease on CFMutableAttributedStringRef) gives EXC_BAD_ACCESS. Everything else works as expected.

Is CFAttributedStringRef not castable to id or NSObject* in the iPhone environment?

Attributed strings are not supported on the iPhone.

Dave
_______________________________________________

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: [iPhone] CFAttributedStringRef autorelease - not possible?
      • From: Michael Hoy <email@hidden>
References: 
 >[iPhone] CFAttributedStringRef autorelease - not possible? (From: Michael Hoy <email@hidden>)

  • Prev by Date: Re: What are the finer points to programatically loading a view from a NIB and attaching to the default window in MainMenu.xib?
  • Next by Date: Re: iPhone Question: UIScrollView
  • Previous by thread: [iPhone] CFAttributedStringRef autorelease - not possible?
  • Next by thread: Re: [iPhone] CFAttributedStringRef autorelease - not possible?
  • Index(es):
    • Date
    • Thread