Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-29-2011, 10:20 PM   #16 (permalink)
BrianSlick
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

Quote:
Originally Posted by CBGraham View Post
Elegant is a dirty word. makeObjectsPerformSelector says in the docs that you shouldn't give it something that modifies the array. removeFromSuperview does. Make a copy of the subviews array and work on it and stop trying to write one line solutions. (Same problem as a vanilla For loop affecting the array it is working over.)
If you had actually read the documentation before posting, then you would know that this is unnecessary, since subviews is a copy property. Plus it is an NSArray, not an NSMutableArray, therefore it cannot be modified. So if this solution didn't work, it would crash very quickly, and this would have been noted here in this thread quite some time ago.
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,605
Threads: 94,084
Posts: 402,783
Top Poster: BrianSlick (7,990)
Welcome to our newest member, champa812
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:14 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.