Mac Cocoa |
Author |
Message |
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Mon Sep 22, 2008 11:19 pm Post subject: Collections - Arrays & Dictionaries |
|
|
SO - Best way to remove from NSMutableArray while iterating?
"In Cocoa, if I want to loop through an NSMutableArray and remove multiple
objects that fit a certain criteria, what's the best way to do this without restar-
ting the loop each time I remove an object?" |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Sat Sep 27, 2008 1:44 pm Post subject: |
|
|
MF - What Is NSCollectionView?
"Apps like iPhoto, where you can drag and drop images into some other
window's array grid; is this done using NSCollectionView?" |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Mon Oct 13, 2008 8:33 pm Post subject: |
|
|
MF - How to copy NSMutableDictionary
"
Remember that you can't put an NSArray into a dictionary. You only put an NSArray*
into a dictionary. When you use [dictionaryWithDictionary:] or [initWithDictionary:],
the new dictionary has copies of all of the values in the original array, including
COPIES OF THE POINTERS. Both pointers still refer to the same array object, so
operating on the array* in one of the dictionaries will will modify the 'array' in both
dictionaries." |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Sun Aug 23, 2009 10:53 pm Post subject: |
|
|
mikeash.com - Key-Value Observing Done Right
"Cocoa's Key-Value Observing facilities are extremely powerful and useful.
Unfortunately they have a really terrible API that's inherently broken in a co-
uple of different ways. I want to discuss how it's broken, and a way to make
it better." |
|
Back to top |
|
|
Ike Kapetan
Joined: 17 Jun 2006 Posts: 3136 Location: Europe
|
Posted: Thu Dec 10, 2009 7:03 pm Post subject: |
|
|
Shannon Appelcline - NSSet, Part One: The Basics
"In NSArray and NSDictionary you've already got two perfectly acceptable
data storage classes. So, why do you need another? The answer is effici-
ency." |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Sun Jul 03, 2011 4:57 pm Post subject: |
|
|
borkware.com - Binary Searching in a sorted NSArray
"How do you binary search a sorted NSArray? Use toll free bridging to
CFArray which actually has a binary search function..." |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Sun Aug 21, 2011 11:11 pm Post subject: |
|
|
mf - How to enumerate and clear all my app's preferences?
"NSUserDefaults supports dictionary values. You could store your per-book
preferences in a dictionary, then store that dictionary using NSUserDefaults
with a key unique to the book." |
|
Back to top |
|
|
Ike Kapetan
Joined: 17 Jun 2006 Posts: 3136 Location: Europe
|
Posted: Sat Oct 01, 2011 7:40 pm Post subject: |
|
|
Walking Smarts - WSCoreLaziness
"WSCoreLaziness is a shot at making ActiveSupport for Cocoa frameworks.
The idea is simple - create a collection of (as of this writing) Foundation
framework categories that aim to shorten the amount of your typing and
increase the amount of hitting Esc and Tab keys, provide familiar API and
sensible defaults." |
|
Back to top |
|
|
Ike Kapetan
Joined: 17 Jun 2006 Posts: 3136 Location: Europe
|
Posted: Wed Feb 27, 2013 7:37 pm Post subject: |
|
|
Ash - UICollectionView Example
"We're going to take a look at the new UICollectionView class Apple
introduced in iOS 6. It's used to display a grid of cells, and what better
to display in those cells than some beautiful photos from 500px?" |
|
Back to top |
|
|
|