Oct 24
Cocoa Tip: Turning Off Wordwrap
Posted by Kevin in Hot Cocoa on Oct 24th, 2008| icon3No Comments »

Ever wanted to have a textview that didn’t automatically have text wrap to the next line? You’d think it just be a checkbox option in Interface Builder, but it isn’t. (Hint hint, Apple) Luckily though all you need to do to turn it off is cut and paste some code.

[[myTextView enclosingScrollView] setHasHorizontalScroller:TRUE];
[myTextView setHorizontallyResizable:TRUE];
NSSize layoutSize = [myTextView maxSize];
layoutSize.width = layoutSize.height;
[myTextView setMaxSize:layoutSize];
[[myTextView textContainer] setWidthTracksTextView:FALSE];
[[myTextView textContainer] setContainerSize:layoutSize];

Just cut and paste that code into your awakeFromNib method and replace myTextView with the outlet for your textview and voila, no more wordwrap!

Oct 23
Hot Cocoa 2: What is Cocoa?
Posted by Kevin in Hot Cocoa on Oct 23rd, 2008| icon31 Comment »

In this weeks episode: We take a look at the history of Apple, and give you an introduction to Cocoa and Objective-C.

Hot Cocoa Episode 2 – Portable / iPod: Download
Hot Cocoa Episode 2 – HD: Download

Questions or comments? Post them here, or e-mail them to: kevin [AT] lastedit.com Thanks!

Oct 18
Hot Cocoa 1: Introduction to Xcode
Posted by Kevin in Hot Cocoa on Oct 18th, 2008| icon34 Comments »

Welcome to the first episode of the weekly programming tutorial podcast Hot Cocoa.

In this week’s episode: We give you the tour around Xcode and Interface builder, play with some buttons, and let you in on the secret that Apple doesn’t want you to know about its documentation.

 

Hot Cocoa Episode 1 – Portable / iPod: Download
Hot Cocoa Episode 1 – HD: Download

Questions or comments? Post them here, or e-mail them to: kevin [AT] lastedit.com Thanks!