• 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: Creating a Big and Resizable Question Mark in the Middle of a View
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating a Big and Resizable Question Mark in the Middle of a View


  • Subject: Re: Creating a Big and Resizable Question Mark in the Middle of a View
  • From: Georg Seifert <email@hidden>
  • Date: Sun, 15 Aug 2010 13:03:31 +0200

Or draw an attributed string in drawRect:
calculate the font size from to the view size...

Georg

Am 15.08.2010 um 06:55 schrieb Peter Zegelin:

> Yep that worked:
>
> 	NSString *file = [[NSBundle mainBundle]pathForResource:@"Question Mark" ofType:@"pdf"];
> 	NSData	*data = [NSData dataWithContentsOfFile:file];
> 	NSImage *image = [[NSImage alloc] initWithData:(NSData *)data];
> 	[imageView setImage:image];
>
> (I'm using GC).
>
> thanks!
>
>
>
> On 15/08/2010, at 2:08 PM, Quincey Morris wrote:
>
>> On Aug 14, 2010, at 20:28, Peter Zegelin wrote:
>>
>>> I would like the view to just have a large and resizable question mark in the middle but am not sure how to create one. None of the IB controls seem to fit the bill and before I get into using an NSTextView - which I haven't used before and it looks complicated and overkill - I was wondering if there is a simpler way to do this.
>>
>> Sounds like a job for NSImageView (with the appropriate scaling option), with content supplied by a PDF file.
>>
>
> kind regards,
>
> Peter Zegelin
> www.fracturedsoftware.com
>
> _______________________________________________
>
> 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

_______________________________________________

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: 
 >Creating a Big and Resizable Question Mark in the Middle of a View (From: Peter Zegelin <email@hidden>)
 >Re: Creating a Big and Resizable Question Mark in the Middle of a View (From: Quincey Morris <email@hidden>)
 >Re: Creating a Big and Resizable Question Mark in the Middle of a View (From: Peter Zegelin <email@hidden>)

  • Prev by Date: Re: Creating a Big and Resizable Question Mark in the Middle of a View
  • Next by Date: Re: Recursive file remove
  • Previous by thread: Re: Creating a Big and Resizable Question Mark in the Middle of a View
  • Next by thread: Re: Creating a Big and Resizable Question Mark in the Middle of a View
  • Index(es):
    • Date
    • Thread