michaelfox + cocoa 81
maccman/macgap · GitHub
9 weeks ago by michaelfox
Desktop WebKit wrapper for HTML/CSS/JS applications
cocoa
objective-c
osx
webview
webkit
cli
shell
tools
dialog
window
html
9 weeks ago by michaelfox
How to Take Webkit Screenshots with Cocoa and Objective-C
may 2011 by michaelfox
How to Take Webkit Screenshots with Cocoa and Objective-C
One thing that I was curious to learn was how to take website screenshots with cocoa. I knew there was a great command line for mac os x called webkit2png so I took its source code as an inspiration for what I needed.
In this article I’m going to start with the simplest thing that can possibly work, and then add more features as the code evolves.
cocoa
objective-c
webkit
screenshots
One thing that I was curious to learn was how to take website screenshots with cocoa. I knew there was a great command line for mac os x called webkit2png so I took its source code as an inspiration for what I needed.
In this article I’m going to start with the simplest thing that can possibly work, and then add more features as the code evolves.
may 2011 by michaelfox
sdegutis/SDKeychain - GitHub
march 2011 by michaelfox
A very simple way to set and retrieve passwords from the Keychain, using a convenient Cocoa class.
http://www.degutis.org/
objective-c
cocoa
api
library
example
sample
keychain
password
http://www.degutis.org/
march 2011 by michaelfox
sdegutis/SDGlobalShortcuts - GitHub
march 2011 by michaelfox
A very simple API to add global shortcuts to your application! — Read more
http://www.degutis.org/
objective-c
cocoa
api
shortcuts
library
keyboard
example
sample
http://www.degutis.org/
march 2011 by michaelfox
iPhone Application Development (Winter 2010) - Download free content from Stanford on iTunes
december 2010 by michaelfox
Tools and APIs required to build applications for the iPhone platform using the iPhone SDK. User interface designs for mobile devices and unique user interactions using multitouch technologies. Object-oriented design using model-view-controller pattern, memory management, Objective-C programming language. iPhone APIs and tools including Xcode, Interface Builder and Instruments on Mac OS X. Other topics include: core animation, bonjour networking, mobile device power management and performance considerations. Prerequisites: C language and programming experience at the level of 106B or X. Recommended: UNIX, object-oriented programming, graphical toolkits Offered by Stanford’s School of Engineering, the course will last ten weeks and include both the lecture videos and PDF documents. A new lecture will be posted a week after each class meeting. Subscribe to this course, and automatically receive new lectures as they become available. Released with a Creative Commons BY-NC-ND license.
iphone
programming
ios
ipad
osx
cocoa
objective-c
podcast
itunes
itunesu
stanford
courses
apple
december 2010 by michaelfox
probablycorey/seriously - GitHub
december 2010 by michaelfox
The Objective-C HTTP library that Apple should have created, seriously.
Seriously
---------
The iPhone needs a better way to make HTTP requests, specifically calls to
REST web services. Seriously mixes Blocks with NSURLConnection &
NSOperationQueue to do just that. It also will automatically parse the JSON
response into a dictionary if the response headers are set correctly.
Install
-------
Just drag the files from the "src" directory into your project. You can also try
using the included "Seriously.framework" file
Parse JSON EXAMPLE
------------------
NSString *url = @"http://api.twitter.com/1/users/show.json?screen_name=probablycorey;"
[Seriously get:url handler:^(id body, NSHTTPURLResponse *response, NSError *error) {
if (error) {
NSLog(@"Error: %@", error);
}
else {
NSLog(@"Look, JSON is parsed into a dictionary!");
NSLog(@"%@", [body objectForKey:@"profile_background_image_url"]);
}
}];
Simple Queue Example
--------------------
NSArray *urls = [NSArray arrayWithObjects:
@"http://farm5.static.flickr.com/4138/4744205956_1f08ae40e3_o.jpg",
@"http://farm5.static.flickr.com/4123/4744238252_d11d0df5a3_b.jpg",
@"http://farm5.static.flickr.com/4097/4743596319_50cce97d80_o.jpg",
@"http://farm5.static.flickr.com/4099/4743581287_7c50529b36_o.jpg",
@"http://farm5.static.flickr.com/4123/4743587437_78f0906e8a_o.jpg",
@"http://farm5.static.flickr.com/4136/4743562971_d5f5c6d5b1_o.jpg",
@"http://farm5.static.flickr.com/4073/4744205142_be44e64ab7_o.jpg",
nil];
// By default the NSOperation will only do 3 requests at a time
for (NSString *url in urls) {
NSOperation *o = [Seriously request:url options:nil handler:^(id body,
NSHTTPURLResponse *response, NSError *error) {
NSLog(@"got %d (%@)", [urls indexOfObject:url], url);
}];
}
Why Are You Using Blocks?
-------------------------
Welcome to the future dude!
TODO
----
- Document
- Add XML parsing
- Add more options for NSOperationQueue management
cocoa
http
ios
iphone
ipad
objective-c
rest
request
json
library
resources
Seriously
---------
The iPhone needs a better way to make HTTP requests, specifically calls to
REST web services. Seriously mixes Blocks with NSURLConnection &
NSOperationQueue to do just that. It also will automatically parse the JSON
response into a dictionary if the response headers are set correctly.
Install
-------
Just drag the files from the "src" directory into your project. You can also try
using the included "Seriously.framework" file
Parse JSON EXAMPLE
------------------
NSString *url = @"http://api.twitter.com/1/users/show.json?screen_name=probablycorey;"
[Seriously get:url handler:^(id body, NSHTTPURLResponse *response, NSError *error) {
if (error) {
NSLog(@"Error: %@", error);
}
else {
NSLog(@"Look, JSON is parsed into a dictionary!");
NSLog(@"%@", [body objectForKey:@"profile_background_image_url"]);
}
}];
Simple Queue Example
--------------------
NSArray *urls = [NSArray arrayWithObjects:
@"http://farm5.static.flickr.com/4138/4744205956_1f08ae40e3_o.jpg",
@"http://farm5.static.flickr.com/4123/4744238252_d11d0df5a3_b.jpg",
@"http://farm5.static.flickr.com/4097/4743596319_50cce97d80_o.jpg",
@"http://farm5.static.flickr.com/4099/4743581287_7c50529b36_o.jpg",
@"http://farm5.static.flickr.com/4123/4743587437_78f0906e8a_o.jpg",
@"http://farm5.static.flickr.com/4136/4743562971_d5f5c6d5b1_o.jpg",
@"http://farm5.static.flickr.com/4073/4744205142_be44e64ab7_o.jpg",
nil];
// By default the NSOperation will only do 3 requests at a time
for (NSString *url in urls) {
NSOperation *o = [Seriously request:url options:nil handler:^(id body,
NSHTTPURLResponse *response, NSError *error) {
NSLog(@"got %d (%@)", [urls indexOfObject:url], url);
}];
}
Why Are You Using Blocks?
-------------------------
Welcome to the future dude!
TODO
----
- Document
- Add XML parsing
- Add more options for NSOperationQueue management
december 2010 by michaelfox
BWToolkit - Interface Builder Plugin for Cocoa on Mac OS X
december 2010 by michaelfox
BWToolkit is an Interface Builder plugin that contains commonly used UI elements and other objects designed to simplify Mac development.
cocoa
development
programming
mac
interfacebuilder
december 2010 by michaelfox
Information Property List Key Reference: Introduction
december 2010 by michaelfox
“About Information Property List Files” provides an overview of information property list files and how you configure them.
“Core Foundation Keys” describes the keys that provide basic information about the bundle configuration.
“Launch Services Keys” describes the keys used by Launch Services to obtain information about a bundle.
“Cocoa Keys” describes the keys supported by Cocoa and Cocoa Touch applications.
“Mac OS X Keys” describes keys supported by Mac OS X bundles.
“UIKit Keys” describes the keys specific to iOS applications.
propertylist
plist
osx
cocoa
objective-c
environment
settings
config
reference
“Core Foundation Keys” describes the keys that provide basic information about the bundle configuration.
“Launch Services Keys” describes the keys used by Launch Services to obtain information about a bundle.
“Cocoa Keys” describes the keys supported by Cocoa and Cocoa Touch applications.
“Mac OS X Keys” describes keys supported by Mac OS X bundles.
“UIKit Keys” describes the keys specific to iOS applications.
december 2010 by michaelfox
Cocoa Text System
october 2010 by michaelfox
Apple’s Cocoa text system is a complicated beast, but also extremely flexible, and with a bit of work, it can be molded to match many working styles. This how-to covers the 2 major ways of customizing the text input system: Default key bindings, and for still more control, input managers.
I’m writing this guide because nothing like it currently exists. There is incredible room for flexibility in customizing the Cocoa text environment, but most users—even power-users—have no idea of the available options. This is mostly because Apple’s documentation is 1) aimed at developers, and 2) often incomplete or ambiguous. Most users have no idea that they can look at a file which describes all of the shortcuts on the system, and that they can easily add their own shortcuts, or replace existing ones with differing functionality.
For instance, one of the most common complaints from new Windows and Linux/Unix switchers is that many of the shortcuts they are used to, such as using the Home and End keys to move to the beginning, respectively end, of a line or document, don’t work as they expect in OS X.
For new users, almost every text box you use is a Cocoa text box (or close enough to act the same as far as we’re concerned) — Safari web form boxes, the text field in iChat for sending new messages, the documents in Pages or TextEdit, the email composer in Mail, etc. Note: Some text boxes are not Cocoa however, so the tricks in this article still aren’t completely universal. Notably, Microsoft Word, Adobe applications, AppleWorks, and the text fields in Camino and Firefox won’t work with this hint.
I expect that all users of OS X can get something out of this guide. I’m starting with the basics, so that new users, unfamiliar with the terminal and the intricacies of OS X can be brought up to speed. But even the most experienced users should hopefully learn something from this article; I know I learned several new nifty things while writing it.
Disclaimer: it is possible, when mucking around with the text system, to send applications messages they aren’t expecting. This can cause them to crash. As long as you stick to standard text selectors, you should be fine, but I’m not responsible if your program crashes because of a binding you add.
bindings
cocoa
keybindings
keyboard
text
osx
mac
programming
development
textmate
input
editing
system
hack
productivity
editor
howto
tutorial
reference
★
I’m writing this guide because nothing like it currently exists. There is incredible room for flexibility in customizing the Cocoa text environment, but most users—even power-users—have no idea of the available options. This is mostly because Apple’s documentation is 1) aimed at developers, and 2) often incomplete or ambiguous. Most users have no idea that they can look at a file which describes all of the shortcuts on the system, and that they can easily add their own shortcuts, or replace existing ones with differing functionality.
For instance, one of the most common complaints from new Windows and Linux/Unix switchers is that many of the shortcuts they are used to, such as using the Home and End keys to move to the beginning, respectively end, of a line or document, don’t work as they expect in OS X.
For new users, almost every text box you use is a Cocoa text box (or close enough to act the same as far as we’re concerned) — Safari web form boxes, the text field in iChat for sending new messages, the documents in Pages or TextEdit, the email composer in Mail, etc. Note: Some text boxes are not Cocoa however, so the tricks in this article still aren’t completely universal. Notably, Microsoft Word, Adobe applications, AppleWorks, and the text fields in Camino and Firefox won’t work with this hint.
I expect that all users of OS X can get something out of this guide. I’m starting with the basics, so that new users, unfamiliar with the terminal and the intricacies of OS X can be brought up to speed. But even the most experienced users should hopefully learn something from this article; I know I learned several new nifty things while writing it.
Disclaimer: it is possible, when mucking around with the text system, to send applications messages they aren’t expecting. This can cause them to crash. As long as you stick to standard text selectors, you should be fine, but I’m not responsible if your program crashes because of a binding you add.
october 2010 by michaelfox
Completion Dictionary - Release Notes
june 2010 by michaelfox
Completion Dictionary is a free Xcode plugin that enhances Xcode’s built-in code completion mechanism. You simply type a few letters - either the abbreviation of a macro or the initials of a symbol name - and press the completion shortcut. Completion Dictionary will do the rest.
Macro Expansion
A set of user defined macros is searched for an entry matching the abbreviation you’ve typed in. The macros may also contain a number of placeholders. The text range of these placeholders will be preselected, ready to be replaced with your further input.
Code Completion
Completion Dictionary integrates the built-in code completion capabilities of Xcode. If there’s no macro found for a given abbreviation, Xcode’s code completion will be performed instead of macro expansion.
Features
* Seamless Xcode integration with configurable fallback to Xcode’s code completion
* Built-in Macro Editor for quickly adding custom macros
* Full Undo/Redo support
* Free definable placeholders within the macros
* Query placeholders for macros that require additional user input
* Automatic indentation of multi-line macros, allows to insert code snippets properly indented.
* Comprehensive set of default macros (includes more than 190 macros)
xcode
cocoa
development
mac
osx
iphone
code
completion
tools
snippets
macros
Macro Expansion
A set of user defined macros is searched for an entry matching the abbreviation you’ve typed in. The macros may also contain a number of placeholders. The text range of these placeholders will be preselected, ready to be replaced with your further input.
Code Completion
Completion Dictionary integrates the built-in code completion capabilities of Xcode. If there’s no macro found for a given abbreviation, Xcode’s code completion will be performed instead of macro expansion.
Features
* Seamless Xcode integration with configurable fallback to Xcode’s code completion
* Built-in Macro Editor for quickly adding custom macros
* Full Undo/Redo support
* Free definable placeholders within the macros
* Query placeholders for macros that require additional user input
* Automatic indentation of multi-line macros, allows to insert code snippets properly indented.
* Comprehensive set of default macros (includes more than 190 macros)
june 2010 by michaelfox
accessorizer
june 2010 by michaelfox
Xcode’s No.1 companion for Cocoa and Cocoa Touch!
cocoa
mac
osx
tools
xcode
accessorizer
objective-c
iphone
ipad
development
june 2010 by michaelfox
Programming Mac OS X with Cocoa for beginners - Wikibooks, collection of open-content textbooks
may 2010 by michaelfox
This wikibook aims to provide beginners with an introduction to programming Mac OS X with Cocoa, using Xcode, the free developer tools provided with the operating system. Some knowledge of another programming language, preferably C, is assumed. The main guide is aimed at users of Mac OS X 10.3 or 10.4, but programming techniques that can only be used with 10.4 are avoided until the end.
In general, this text is written to be followed in order from start to finish. As each topic develops, it builds on the code written previously to add complexity and functionality.
cocoa
programming
book
download
ebooks
In general, this text is written to be followed in order from start to finish. As each topic develops, it builds on the code written previously to add complexity and functionality.
may 2010 by michaelfox
Getting Started With Core Data, Bindings and NSViewController « carpeaqua by Justin Williams
march 2010 by michaelfox
* Core Data
* Cocoa Bindings
* NSViewController
* Unit testing
* And more!
One of the trends in Mac development in recent years is the prevalence of single window applications such as iPhoto, Aperture and Coda. Single window interfaces can be less complex in terms of user interaction, but it can also lead to a more complex underpinning if you don’t watch yourself where you have a single window controller with everything in it1. Apple has aimed to address this with the NSViewController class, which lets you manage portions of the user interface in their own separate class. If you have done any work on the iPhone it’s similar to UIViewController in many aspects.
cocoa
coredata
objc
tutorial
objective-c
unittesting
nsviewcontroller
bindings
* Cocoa Bindings
* NSViewController
* Unit testing
* And more!
One of the trends in Mac development in recent years is the prevalence of single window applications such as iPhoto, Aperture and Coda. Single window interfaces can be less complex in terms of user interaction, but it can also lead to a more complex underpinning if you don’t watch yourself where you have a single window controller with everything in it1. Apple has aimed to address this with the NSViewController class, which lets you manage portions of the user interface in their own separate class. If you have done any work on the iPhone it’s similar to UIViewController in many aspects.
march 2010 by michaelfox
Xcode Run Script Build Phase debugging
march 2010 by michaelfox
So I wanted to add a new build phase to my Xcode Project to run some shell script. It didn’t want to work and I’ve tried to find out why it didn’t work so I’ve tried some Logging. That turned out to be a bit tricky first as i’ve set Xcode to hide all messages and only show warnings and errors. To work around this you simply need to create warnings or errors. That’s pretty easy actually as you only need to write “warning: ohoh” or “error: meh” and Xcode will automatically annotate the message as warning or error:
xcode
build
shell
debugging
objective-c
cocoa
scripts
march 2010 by michaelfox
Cocoa with Love: Hidden Xcode build, debug and template settings
march 2010 by michaelfox
This is a collection of the most useful hidden and hard-to-find settings in Xcode related to building, debugging and file templates.
This post is about hard-to-find settings in Xcode that most programmers can't live without. I felt strange writing a post on this topic since most of this information is documented elsewhere. But I still find myself forgetting and needing to rediscover these tidbits (even though I've been using ProjectBuilder/Xcode for 7 years and should remember), so I think that it's probably information worth reinforcing.
I'll cover:
* Custom compiler flags for GCC
* Pre and post build scripts
* Changing the name of the built program
* Replacing the annoying "__MyCompanyName__" placeholder in file templates
* Completely customizing the file templates
* Customizing, altering and adding autocomplete "Text Macros"
* Configuring environment variables and executable arguments for Debugging
cocoa
xcode
iphone
development
This post is about hard-to-find settings in Xcode that most programmers can't live without. I felt strange writing a post on this topic since most of this information is documented elsewhere. But I still find myself forgetting and needing to rediscover these tidbits (even though I've been using ProjectBuilder/Xcode for 7 years and should remember), so I think that it's probably information worth reinforcing.
I'll cover:
* Custom compiler flags for GCC
* Pre and post build scripts
* Changing the name of the built program
* Replacing the annoying "__MyCompanyName__" placeholder in file templates
* Completely customizing the file templates
* Customizing, altering and adding autocomplete "Text Macros"
* Configuring environment variables and executable arguments for Debugging
march 2010 by michaelfox
QuartzCompositions.com the central source for Quartz Composer :: Index
development osx mac reference programming apple iphone objective-c wiki objectivec xcode cocoa macosx code tutorial quartz quartzcomposer composer video animation visualization screensaver graphics art resources
january 2010 by michaelfox
development osx mac reference programming apple iphone objective-c wiki objectivec xcode cocoa macosx code tutorial quartz quartzcomposer composer video animation visualization screensaver graphics art resources
january 2010 by michaelfox
related tags
accessorizer ⊕ animation ⊕ api ⊕ app ⊕ apple ⊕ applescript ⊕ apps ⊕ art ⊕ bash ⊕ bindings ⊕ book ⊕ build ⊕ c ⊕ calendar ⊕ cli ⊕ cocoa ⊖ code ⊕ codegenerator ⊕ coding ⊕ coherent ⊕ collection ⊕ completion ⊕ composer ⊕ config ⊕ core ⊕ coredata ⊕ courses ⊕ css ⊕ dashboard ⊕ data ⊕ database ⊕ date ⊕ debugging ⊕ deployment ⊕ design ⊕ desktop ⊕ development ⊕ dialog ⊕ documentation ⊕ download ⊕ ebooks ⊕ editing ⊕ editor ⊕ environment ⊕ example ⊕ f-script ⊕ framework ⊕ GIMP ⊕ github ⊕ graphics ⊕ gui ⊕ hack ⊕ helloworld ⊕ howto ⊕ html ⊕ http ⊕ hud ⊕ ical ⊕ icons ⊕ image ⊕ input ⊕ inspiration ⊕ interface ⊕ interfacebuilder ⊕ ios ⊕ ipad ⊕ iphone ⊕ itunes ⊕ itunesu ⊕ javascript ⊕ json ⊕ keybindings ⊕ keyboard ⊕ keychain ⊕ libraries ⊕ library ⊕ list ⊕ mac ⊕ macos ⊕ macosx ⊕ macros ⊕ mobile ⊕ models ⊕ mvc ⊕ nsviewcontroller ⊕ objc ⊕ objective-c ⊕ objectivec ⊕ omni ⊕ oop ⊕ opensource ⊕ osx ⊕ parser ⊕ parsing ⊕ password ⊕ php ⊕ plist ⊕ plugin ⊕ plugins ⊕ podcast ⊕ productivity ⊕ programming ⊕ projects ⊕ prompt ⊕ propertylist ⊕ pull-to-reload ⊕ quartz ⊕ quartzcomposer ⊕ quicklook ⊕ rails ⊕ reference ⊕ request ⊕ resources ⊕ rest ⊕ ruby ⊕ rubycocoa ⊕ sample ⊕ screensaver ⊕ screenshots ⊕ script ⊕ scripting ⊕ scripts ⊕ sdk ⊕ settings ⊕ shell ⊕ shortcuts ⊕ snippets ⊕ software ⊕ source ⊕ sourcecode ⊕ sprite ⊕ sproutcore ⊕ stanford ⊕ system ⊕ tableview ⊕ text ⊕ textmate ⊕ time ⊕ tools ⊕ tutorial ⊕ tutorials ⊕ tweetie ⊕ ui ⊕ uitableview ⊕ unittesting ⊕ userscripts ⊕ utilities ⊕ video ⊕ vim ⊕ visualization ⊕ webdev ⊕ webkit ⊕ webview ⊕ wiki ⊕ window ⊕ xcode ⊕ xib ⊕ xml ⊕ zsh ⊕ ★ ⊕Copy this bookmark: