PowenKo, Mac APP tutorial 001- begin hello world

November 15, 2011   ·   0 Comments

http://developer.apple.com/library/ios/#documentation/IDEs/Conceptual/xcode_quick_start/010-Tutorial_Using_Xcode_to_Write_Hello_World/hello_world_tutorial.html

//
//  HelloView.m
//  Hello
//
//  Created by JON MOODY on 11/15/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "HelloView.h"

@implementation HelloView

- (id)initWithFrame:(NSRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code here.
    }
    
    return self;
}

- (void)drawRect:(NSRect)dirtyRect
{
    // Drawing code here.
    NSString * t_string=@"Hi! this is HelloView";
    NSPoint point=NSMakePoint(100,100);
    NSMutableDictionary*  t_font_attributes=[[NSMutableDictionary alloc] init];
    NSFont *t_font=[NSFont fontWithName:@"Futura-MediumItalic" size:42];
    [t_font_attributes setObject:t_font forKey:NSFontAttributeName];
    
    [t_string drawAtPoint:point withAttributes:t_font_attributes];
    
    
    
}

@end

sample code:
001-Begin-Hello

shareShare on FacebookShare on Google+Share on LinkedInEmail this to someonePrint this pageBuffer this pageDigg thisFlattr the authorShare on RedditPin on PinterestShare on StumbleUponShare on TumblrTweet about this on Twitter

By


Readers Comments (0)


You must be logged in to post a comment.

PowenKo’s Online Store

powenko_arduinoBook
MAC AP Tutorial50

MAC AP Tutorial

Amazon

adsbygoogle

Recent Posts

Categories

Amazon