<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: One More Thing - CoverFlow updated for 2.2</title>
	<link>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/</link>
	<description>Erica Sadun</description>
	<pubDate>Thu, 17 May 2012 06:27:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.2</generator>

	<item>
		<title>By: Erica Sadun</title>
		<link>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2705</link>
		<author>Erica Sadun</author>
		<pubDate>Fri, 10 Apr 2009 16:54:02 +0000</pubDate>
		<guid>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2705</guid>
		<description>- (CoverFlowView *) initWithFrame: (CGRect) aRect andCount: (int) count
{
	self = [super initWithFrame:aRect];
	cfLayer = [[UICoverFlowLayer alloc] initWithFrame:[[UIScreen mainScreen] bounds] numberOfCovers:count numberOfPlaceholders:1];
	[[self layer] addSublayer: (CALayer *) cfLayer];
	
	// Add the placeholder (image stand-in) layer
	CGRect phrect = CGRectMake(0.0f, 0.0f, 200.0f, 200.0f);
	UIImageView *phimg = [[UIImageView alloc] initWithFrame:phrect];
	[cfLayer setPlaceholderImage: [phimg layer] atPlaceholderIndex:0];
	
	unsigned int *pharray = malloc(count * sizeof(int));
	for (int i = 0; i &lt; count; i++) pharray[i] = 0;;
	[cfLayer setPlaceholderIndicesForCovers:pharray];
	
	// Add its info (label) layer
	label = [[UILabel alloc] init];
	[label setTextAlignment:UITextAlignmentCenter];
	[label setFont:[UIFont boldSystemFontOfSize:20.0f]];
	[label setBackgroundColor:[UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.0f]];
	[label setTextColor:[UIColor colorWithRed:1.0f green:1.0f blue:1.0f alpha:0.75f]];
	[label setNumberOfLines:2];
	[label setLineBreakMode:UILineBreakModeWordWrap];
	[cfLayer setInfoLayer:[label layer]];
	
	return self;
}

-- Erica</description>
		<content:encoded><![CDATA[<p>- (CoverFlowView *) initWithFrame: (CGRect) aRect andCount: (int) count<br />
{<br />
	self = [super initWithFrame:aRect];<br />
	cfLayer = [[UICoverFlowLayer alloc] initWithFrame:[[UIScreen mainScreen] bounds] numberOfCovers:count numberOfPlaceholders:1];<br />
	[[self layer] addSublayer: (CALayer *) cfLayer];</p>
<p>	// Add the placeholder (image stand-in) layer<br />
	CGRect phrect = CGRectMake(0.0f, 0.0f, 200.0f, 200.0f);<br />
	UIImageView *phimg = [[UIImageView alloc] initWithFrame:phrect];<br />
	[cfLayer setPlaceholderImage: [phimg layer] atPlaceholderIndex:0];</p>
<p>	unsigned int *pharray = malloc(count * sizeof(int));<br />
	for (int i = 0; i < count; i++) pharray[i] = 0;;<br />
	[cfLayer setPlaceholderIndicesForCovers:pharray];</p>
<p>	// Add its info (label) layer<br />
	label = [[UILabel alloc] init];<br />
	[label setTextAlignment:UITextAlignmentCenter];<br />
	[label setFont:[UIFont boldSystemFontOfSize:20.0f]];<br />
	[label setBackgroundColor:[UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.0f]];<br />
	[label setTextColor:[UIColor colorWithRed:1.0f green:1.0f blue:1.0f alpha:0.75f]];<br />
	[label setNumberOfLines:2];<br />
	[label setLineBreakMode:UILineBreakModeWordWrap];<br />
	[cfLayer setInfoLayer:[label layer]];</p>
<p>	return self;<br />
}</p>
<p>&#8211; Erica</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gracion</title>
		<link>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2695</link>
		<author>gracion</author>
		<pubDate>Thu, 26 Feb 2009 21:59:47 +0000</pubDate>
		<guid>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2695</guid>
		<description>I also crashed in [UICoverFlowLayer _setNewSelectedIndex]. I had modified Erica's 2.2 sample project (which runs ok) to use some jpegs instead of the rendered color circles. I tried scaling them to 200x200, and ran under NSZombie but didn't see anything. Anyway, after seeing robertanton's rejection notice, I'll have to wait for Apple to publish this anyway.

It's still a great book! :-)</description>
		<content:encoded><![CDATA[<p>I also crashed in [UICoverFlowLayer _setNewSelectedIndex]. I had modified Erica&#8217;s 2.2 sample project (which runs ok) to use some jpegs instead of the rendered color circles. I tried scaling them to 200&#215;200, and ran under NSZombie but didn&#8217;t see anything. Anyway, after seeing robertanton&#8217;s rejection notice, I&#8217;ll have to wait for Apple to publish this anyway.</p>
<p>It&#8217;s still a great book! <img src='http://ericasadun.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ngheungyu</title>
		<link>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2686</link>
		<author>ngheungyu</author>
		<pubDate>Sat, 07 Feb 2009 13:45:42 +0000</pubDate>
		<guid>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2686</guid>
		<description>I am having the same problem as "Comment by slingkid &#124; December 2, 2008 &#124; 3:40 pm"

I can run the original sample code smoothly, however it became quite unstable after I embedded the codes into my own project. Would you kindly help? Thanks</description>
		<content:encoded><![CDATA[<p>I am having the same problem as &#8220;Comment by slingkid | December 2, 2008 | 3:40 pm&#8221;</p>
<p>I can run the original sample code smoothly, however it became quite unstable after I embedded the codes into my own project. Would you kindly help? Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: StringFoo :: Web Development Resources&#187; Blog Archive &#187; ? Private</title>
		<link>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2679</link>
		<author>StringFoo :: Web Development Resources&#187; Blog Archive &#187; ? Private</author>
		<pubDate>Sat, 31 Jan 2009 16:02:14 +0000</pubDate>
		<guid>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2679</guid>
		<description>[...] unreasonable. Bookbag was not the only iPhone app that was caught in this framework change. Here’s a comment on Erica Sadun’s weblog from a developer who used Sadun’s Cover Flow code for an application named Yoga Trainer Pro. The [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] unreasonable. Bookbag was not the only iPhone app that was caught in this framework change. Here’s a comment on Erica Sadun’s weblog from a developer who used Sadun’s Cover Flow code for an application named Yoga Trainer Pro. The [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: robertanton</title>
		<link>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2636</link>
		<author>robertanton</author>
		<pubDate>Tue, 09 Dec 2008 18:22:37 +0000</pubDate>
		<guid>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2636</guid>
		<description>We built Yoga Trainer PRO on iTunes with implementation of Coverflow.

When we resubmitted with updates for 2.2 - the application was rejected.

See email from Apple - thought you might find this interesting.

Hello NexStudios Japan,

Upon further review of your applications, Yoga Trainer PRO and Yoga Trainer LITE cannot be posted to the App Store due to their usage of unpublished API.  Usage of such non-public API, as outlined in the iPhone SDK Agreement section 3.3.1, is prohibited:

"3.3.1 Applications may only use Published APIs in the manner prescribed by Apple and must not use or call any unpublished or private APIs. "

The non-public API that is included in your application comes from the CoverFlow API set.

Very frustrating.</description>
		<content:encoded><![CDATA[<p>We built Yoga Trainer PRO on iTunes with implementation of Coverflow.</p>
<p>When we resubmitted with updates for 2.2 - the application was rejected.</p>
<p>See email from Apple - thought you might find this interesting.</p>
<p>Hello NexStudios Japan,</p>
<p>Upon further review of your applications, Yoga Trainer PRO and Yoga Trainer LITE cannot be posted to the App Store due to their usage of unpublished API.  Usage of such non-public API, as outlined in the iPhone SDK Agreement section 3.3.1, is prohibited:</p>
<p>&#8220;3.3.1 Applications may only use Published APIs in the manner prescribed by Apple and must not use or call any unpublished or private APIs. &#8221;</p>
<p>The non-public API that is included in your application comes from the CoverFlow API set.</p>
<p>Very frustrating.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alan</title>
		<link>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2633</link>
		<author>alan</author>
		<pubDate>Mon, 08 Dec 2008 23:30:31 +0000</pubDate>
		<guid>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2633</guid>
		<description>Oddly enough, now this no longer works for me.  I keep getting a 'bad access' error when trying to run on my iphone.  In the simulator it runs, but only if I turn on 'enable guard malloc'...I just don't have enough objc experience to know where to look!</description>
		<content:encoded><![CDATA[<p>Oddly enough, now this no longer works for me.  I keep getting a &#8216;bad access&#8217; error when trying to run on my iphone.  In the simulator it runs, but only if I turn on &#8216;enable guard malloc&#8217;&#8230;I just don&#8217;t have enough objc experience to know where to look!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: russhill</title>
		<link>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2626</link>
		<author>russhill</author>
		<pubDate>Wed, 03 Dec 2008 17:25:10 +0000</pubDate>
		<guid>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2626</guid>
		<description>Erica, can you answer what is possibly a silly question: I had thought this would only work on a jailbroken device, but my 2.2 iPod touch is not, and it works fine.

I want desperately to use coverflow in an app I am writing but need to know if I use this code if it will be accepted in the app store?</description>
		<content:encoded><![CDATA[<p>Erica, can you answer what is possibly a silly question: I had thought this would only work on a jailbroken device, but my 2.2 iPod touch is not, and it works fine.</p>
<p>I want desperately to use coverflow in an app I am writing but need to know if I use this code if it will be accepted in the app store?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: slingkid</title>
		<link>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2624</link>
		<author>slingkid</author>
		<pubDate>Tue, 02 Dec 2008 21:42:45 +0000</pubDate>
		<guid>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2624</guid>
		<description>Also is there a way to dynamically change the number of items in the coverflow after the coverflow layer is constructed?</description>
		<content:encoded><![CDATA[<p>Also is there a way to dynamically change the number of items in the coverflow after the coverflow layer is constructed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: slingkid</title>
		<link>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2623</link>
		<author>slingkid</author>
		<pubDate>Tue, 02 Dec 2008 21:40:41 +0000</pubDate>
		<guid>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2623</guid>
		<description>I would like  to use coverflow in this manner - start app - app is in portrait mode - when rotated to landscape mode - show coverflow - when rotated to portrait mode - coverflow view is removed 

I tried using your code - it works the first time I turn to landscape mode - on the 2nd turn to landscape mode - it always fail on the line [self.cfView.cfLayer transitionIn:1.0f];

Stack Trace:
#0	0x931752d4 in CFRetain
#1	0x31dcfb9f in -[CALayer setContents:]
#2	0x30b41b4b in -[UICoverFlowLayer _setNewSelectedIndex:]
#3	0x30b45c7c in -[UICoverFlowLayer _updateTick]
#4	0x30b423e1 in -[UICoverFlowLayer transition:withCoverFrame:]
#5	0x30b42a5e in -[UICoverFlowLayer transitionIn:]</description>
		<content:encoded><![CDATA[<p>I would like  to use coverflow in this manner - start app - app is in portrait mode - when rotated to landscape mode - show coverflow - when rotated to portrait mode - coverflow view is removed </p>
<p>I tried using your code - it works the first time I turn to landscape mode - on the 2nd turn to landscape mode - it always fail on the line [self.cfView.cfLayer transitionIn:1.0f];</p>
<p>Stack Trace:<br />
#0	0&#215;931752d4 in CFRetain<br />
#1	0&#215;31dcfb9f in -[CALayer setContents:]<br />
#2	0&#215;30b41b4b in -[UICoverFlowLayer _setNewSelectedIndex:]<br />
#3	0&#215;30b45c7c in -[UICoverFlowLayer _updateTick]<br />
#4	0&#215;30b423e1 in -[UICoverFlowLayer transition:withCoverFrame:]<br />
#5	0&#215;30b42a5e in -[UICoverFlowLayer transitionIn:]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erica Sadun</title>
		<link>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2612</link>
		<author>Erica Sadun</author>
		<pubDate>Tue, 25 Nov 2008 15:45:44 +0000</pubDate>
		<guid>http://ericasadun.com/2008/11/one-more-thing-coverflow-updated-for-22/#comment-2612</guid>
		<description>Forsword: Make sure both the Simulator and XCode are set to 2.2</description>
		<content:encoded><![CDATA[<p>Forsword: Make sure both the Simulator and XCode are set to 2.2</p>
]]></content:encoded>
	</item>
</channel>
</rss>

