Jump to content

Xcode And Cocoa Development (Learning)


Guest Deleted_Account

Recommended Posts

Guest Deleted_Account

I just got a macbook Air so I could start Developing for iOS and MacOS X. So far I have gone through several tutorials and books and notice there are vast deference between Windows programming and MacOS X Cocoa programming. Any ways just wanted to share the basic app I made right off the bat and see if anyone else is learning XCode or knows XCode on hak5. Maybe we could get a segment on it! ;)

This is a VERY basic application as I haven't touched C in years (python FTW):

//
//  MyController.h
//  MyfirstCocoaApp
//
//  Created by x942  on 11-05-02.
//  RELEASED UNDER GPLV3 http://creativecommons.org/licenses/by/3.0/
//

#import <Cocoa/Cocoa.h>


@interface MyController : NSObject {
	IBOutlet NSTextField* myField;
	IBOutlet NSButton* myButton;
}
- (IBAction) doSomething:(id)sender;
@end

//
//  MyController.m
//  MyfirstCocoaApp
//
//  Created by x942 on 11-05-02.
//  RELEASED UNDER GPLV3 http://creativecommons.org/licenses/by/3.0/
//

#import "MyController.h"


@implementation MyController

- (id) init
{
	self = [super init];
	if (self != nil) {
		NSLog(@"Initialize MyController!");
		NSLog(@"myField: %@, myButton: %@", myField, myButton);
		[myField setDelegate:self];
	}
	return self;
}

- (void) awakeFromNib
{
	NSLog(@"awakeFromNib");
	NSLog(@"myField: %@, myButton: %@", myField, myButton);
}

- (IBAction) doSomething:(id)sender
{
	[myField setStringValue:@"Hello World!"];

}
- (BOOL) respondsToSelector:(SEL)asel
{
	NSLog(@"MyController respondsToSelector? %@",NSStringFromSelector(asel));
	return [super respondsToSelector:asel];
}
@end

http://dl.dropbox.com/u/3374394/MyfirstCocoaApp.zip for full source and XCode Project.

Anyone else want to share there tutorials or examples? making a Hak5 podcast downloader next :D

Edited by x942
Link to comment
Share on other sites

It's a very basic app indeed.

If you're interested in iOS development, I started using this book Head First iPhone Development.

I got the hang off the very basic stuff. This is also a very interesting blog http://iphonedevelopment.blogspot.com.

Beside that google will help you :lol: .

Good luck,

Regards Niels

If you have any thing to share, pm me or post it in this topic.

Link to comment
Share on other sites

Guest Deleted_Account

I found the 2009 iPhone Application Development course from Stanford on iTunes U to be extremely useful.

Thanks I will have to check that out later. I am currently working on a Hak5 app for Cydia. So far it just pulls the RSS feed for latest videos. I will be adding a Twitter Tab and maybe a feedback tab or forums tab. Here is a screen grab of it so far:

post-15260-0-28080900-1304646705_thumb.p

Will post Source and Deb for install in a bit!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...