Re: Creating a Big and Resizable Question Mark in the Middle of a View
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