Skip to content
Browse files

removed the assert and replaced it by just returning from the method

  • Loading branch information...
1 parent 9542139 commit 85a5959e36803bd1d2fe2cce0476f988d1fbb18a Karsten Kusche committed Aug 10, 2010
Showing with 8 additions and 2 deletions.
  1. +7 −1 BSUIViewRearranger.m
  2. +1 −1 BSUIViewRearranger.xcodeproj/project.pbxproj
View
8 BSUIViewRearranger.m
@@ -20,7 +20,13 @@ + (void)rearrangeView:(UIView*)targetView accordingTo:(UIView*)sourceView
NSArray* targetViews = [targetView subviews];
NSArray* sourceViews = [sourceView subviews];
NSInteger i;
- NSAssert([targetViews count] == [sourceViews count],@"The view's structures don't match!!");
+
+ if ([targetViews count] != [sourceViews count])
+ {
+ // one could assert here and yell, but returning silently seems the most sane solution
+ return;
+ }
+
NSInteger count = [targetViews count];
for (i = 0; i < count; i++)
{
View
2 BSUIViewRearranger.xcodeproj/project.pbxproj
@@ -25,7 +25,7 @@
isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
proxyType = 1;
- remoteGlobalIDString = D2AAC07D0554694100DB518D /* BSUIViewRearranger */;
+ remoteGlobalIDString = D2AAC07D0554694100DB518D;
remoteInfo = BSUIViewRearranger;
};
/* End PBXContainerItemProxy section */

0 comments on commit 85a5959

Please sign in to comment.
Something went wrong with that request. Please try again.