Skip to content
Browse files

Fixed alignment of carousels on iPad in Multiple Carousels example

  • Loading branch information...
1 parent f67bf5b commit 2d7e5d4f206c595b2dde72ebfea7ea3825e4a072 @nicklockwood committed Apr 25, 2012
Showing with 10 additions and 17 deletions.
  1. +9 −16 Examples/Multiple Carousels/en.lproj/iCarouselExampleViewController.xib
  2. +1 −1 iCarousel/iCarousel.m
View
25 Examples/Multiple Carousels/en.lproj/iCarouselExampleViewController.xib
@@ -57,11 +57,11 @@
</object>
<object class="IBUIView" id="474539717">
<reference key="NSNextResponder" ref="774585933"/>
- <int key="NSvFlags">274</int>
+ <int key="NSvFlags">306</int>
<string key="NSFrameSize">{320, 230}</string>
<reference key="NSSuperview" ref="774585933"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="192313258"/>
+ <reference key="NSNextKeyView" ref="372534735"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MSAwAA</bytes>
@@ -71,9 +71,9 @@
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
- <object class="IBUIView" id="192313258">
+ <object class="IBUIView" id="372534735">
<reference key="NSNextResponder" ref="774585933"/>
- <int key="NSvFlags">274</int>
+ <int key="NSvFlags">266</int>
<string key="NSFrame">{{0, 230}, {320, 230}}</string>
<reference key="NSSuperview" ref="774585933"/>
<reference key="NSWindow"/>
@@ -123,7 +123,7 @@
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">carousel2</string>
<reference key="source" ref="372490531"/>
- <reference key="destination" ref="192313258"/>
+ <reference key="destination" ref="372534735"/>
</object>
<int key="connectionID">42</int>
</object>
@@ -146,15 +146,15 @@
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">dataSource</string>
- <reference key="source" ref="192313258"/>
+ <reference key="source" ref="372534735"/>
<reference key="destination" ref="372490531"/>
</object>
<int key="connectionID">39</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">delegate</string>
- <reference key="source" ref="192313258"/>
+ <reference key="source" ref="372534735"/>
<reference key="destination" ref="372490531"/>
</object>
<int key="connectionID">40</int>
@@ -189,7 +189,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="28049241"/>
<reference ref="474539717"/>
- <reference ref="192313258"/>
+ <reference ref="372534735"/>
</object>
<reference key="parent" ref="0"/>
</object>
@@ -209,7 +209,7 @@
</object>
<object class="IBObjectRecord">
<int key="objectID">38</int>
- <reference key="object" ref="192313258"/>
+ <reference key="object" ref="372534735"/>
<reference key="parent" ref="774585933"/>
<string key="objectName">iCarousel 2</string>
</object>
@@ -308,32 +308,25 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>carousel</string>
<string>carousel1</string>
<string>carousel2</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>iCarousel</string>
<string>iCarousel</string>
- <string>iCarousel</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>carousel</string>
<string>carousel1</string>
<string>carousel2</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
- <string key="name">carousel</string>
- <string key="candidateClassName">iCarousel</string>
- </object>
- <object class="IBToOneOutletInfo">
<string key="name">carousel1</string>
<string key="candidateClassName">iCarousel</string>
</object>
View
2 iCarousel/iCarousel.m
@@ -1230,7 +1230,7 @@ - (CGFloat)clampedOffset:(CGFloat)offset
{
if (numberOfItems == 0)
{
- return 0;
+ return 0.0f;
}
CGFloat contentWidth = numberOfItems * itemWidth;
CGFloat clampedOffset = contentWidth? (offset - floorf(offset / contentWidth) * contentWidth): 0.0f;

0 comments on commit 2d7e5d4

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