Skip to content
This repository
Browse code

Fixed alignment of carousels on iPad in Multiple Carousels example

  • Loading branch information...
commit 2d7e5d4f206c595b2dde72ebfea7ea3825e4a072 1 parent f67bf5b
Nick Lockwood authored
25 Examples/Multiple Carousels/en.lproj/iCarouselExampleViewController.xib
@@ -57,11 +57,11 @@
57 57 </object>
58 58 <object class="IBUIView" id="474539717">
59 59 <reference key="NSNextResponder" ref="774585933"/>
60   - <int key="NSvFlags">274</int>
  60 + <int key="NSvFlags">306</int>
61 61 <string key="NSFrameSize">{320, 230}</string>
62 62 <reference key="NSSuperview" ref="774585933"/>
63 63 <reference key="NSWindow"/>
64   - <reference key="NSNextKeyView" ref="192313258"/>
  64 + <reference key="NSNextKeyView" ref="372534735"/>
65 65 <object class="NSColor" key="IBUIBackgroundColor">
66 66 <int key="NSColorSpace">3</int>
67 67 <bytes key="NSWhite">MSAwAA</bytes>
@@ -71,9 +71,9 @@
71 71 </object>
72 72 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
73 73 </object>
74   - <object class="IBUIView" id="192313258">
  74 + <object class="IBUIView" id="372534735">
75 75 <reference key="NSNextResponder" ref="774585933"/>
76   - <int key="NSvFlags">274</int>
  76 + <int key="NSvFlags">266</int>
77 77 <string key="NSFrame">{{0, 230}, {320, 230}}</string>
78 78 <reference key="NSSuperview" ref="774585933"/>
79 79 <reference key="NSWindow"/>
@@ -123,7 +123,7 @@
123 123 <object class="IBCocoaTouchOutletConnection" key="connection">
124 124 <string key="label">carousel2</string>
125 125 <reference key="source" ref="372490531"/>
126   - <reference key="destination" ref="192313258"/>
  126 + <reference key="destination" ref="372534735"/>
127 127 </object>
128 128 <int key="connectionID">42</int>
129 129 </object>
@@ -146,7 +146,7 @@
146 146 <object class="IBConnectionRecord">
147 147 <object class="IBCocoaTouchOutletConnection" key="connection">
148 148 <string key="label">dataSource</string>
149   - <reference key="source" ref="192313258"/>
  149 + <reference key="source" ref="372534735"/>
150 150 <reference key="destination" ref="372490531"/>
151 151 </object>
152 152 <int key="connectionID">39</int>
@@ -154,7 +154,7 @@
154 154 <object class="IBConnectionRecord">
155 155 <object class="IBCocoaTouchOutletConnection" key="connection">
156 156 <string key="label">delegate</string>
157   - <reference key="source" ref="192313258"/>
  157 + <reference key="source" ref="372534735"/>
158 158 <reference key="destination" ref="372490531"/>
159 159 </object>
160 160 <int key="connectionID">40</int>
@@ -189,7 +189,7 @@
189 189 <bool key="EncodedWithXMLCoder">YES</bool>
190 190 <reference ref="28049241"/>
191 191 <reference ref="474539717"/>
192   - <reference ref="192313258"/>
  192 + <reference ref="372534735"/>
193 193 </object>
194 194 <reference key="parent" ref="0"/>
195 195 </object>
@@ -209,7 +209,7 @@
209 209 </object>
210 210 <object class="IBObjectRecord">
211 211 <int key="objectID">38</int>
212   - <reference key="object" ref="192313258"/>
  212 + <reference key="object" ref="372534735"/>
213 213 <reference key="parent" ref="774585933"/>
214 214 <string key="objectName">iCarousel 2</string>
215 215 </object>
@@ -308,7 +308,6 @@
308 308 <bool key="EncodedWithXMLCoder">YES</bool>
309 309 <object class="NSArray" key="dict.sortedKeys">
310 310 <bool key="EncodedWithXMLCoder">YES</bool>
311   - <string>carousel</string>
312 311 <string>carousel1</string>
313 312 <string>carousel2</string>
314 313 </object>
@@ -316,24 +315,18 @@
316 315 <bool key="EncodedWithXMLCoder">YES</bool>
317 316 <string>iCarousel</string>
318 317 <string>iCarousel</string>
319   - <string>iCarousel</string>
320 318 </object>
321 319 </object>
322 320 <object class="NSMutableDictionary" key="toOneOutletInfosByName">
323 321 <bool key="EncodedWithXMLCoder">YES</bool>
324 322 <object class="NSArray" key="dict.sortedKeys">
325 323 <bool key="EncodedWithXMLCoder">YES</bool>
326   - <string>carousel</string>
327 324 <string>carousel1</string>
328 325 <string>carousel2</string>
329 326 </object>
330 327 <object class="NSArray" key="dict.values">
331 328 <bool key="EncodedWithXMLCoder">YES</bool>
332 329 <object class="IBToOneOutletInfo">
333   - <string key="name">carousel</string>
334   - <string key="candidateClassName">iCarousel</string>
335   - </object>
336   - <object class="IBToOneOutletInfo">
337 330 <string key="name">carousel1</string>
338 331 <string key="candidateClassName">iCarousel</string>
339 332 </object>
2  iCarousel/iCarousel.m
@@ -1230,7 +1230,7 @@ - (CGFloat)clampedOffset:(CGFloat)offset
1230 1230 {
1231 1231 if (numberOfItems == 0)
1232 1232 {
1233   - return 0;
  1233 + return 0.0f;
1234 1234 }
1235 1235 CGFloat contentWidth = numberOfItems * itemWidth;
1236 1236 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.