How to convert an immutable array to a mutable array


            

[snippets_intro text=”to convert an immutable array to a mutable array”]

When you have an immutable NSArray and want an NSMutableArray try this:

// converting from an immutable array to a mutable array:
NSArray *myArray = methodToReturnAnNSArray();
NSMutableArray *myMutableArray = [myArray mutableCopy];
[myArray release];

See also the reverse process here.

How to create Arduino brush for Syntax Highlighter

For my Arduino lessons I needed to add WordPress support for Arduino syntax highlighting. A custom brush for SyntaxHighlighter plugin that would format and color my Arduino syntax similar to the application (see here an example). This is what I did.

Leave a Reply

Your email address will not be published. Required fields are marked *